Merge branch 'master' of ssh://git.code.sf.net/p/maxima/code
[maxima.git] / Makefile.am
blobcbb465907e962a4e5aef23a8ee199ecd27409c20
1 if ENABLE_GETTEXT
2    LOCALE_DIR = locale
3 endif
5 SUBDIRS = admin crosscompile-windows src lisp-utils tests doc interfaces share demo plotting $(LOCALE_DIR)
7 EXTRA_DIST = \
8   common.mk maxima.iss.in x-mac.xml\
9   README.lisps README.rpms README.i18n README.external README.developers-howto \
10   INSTALL.win32 INSTALL.lisp INSTALL.git INSTALL.win32nogcl \
11   configure.lisp  maxima-local.in xmaxima-local.in \
12   macosx/Makefile macosx/Readme.txt macosx/maxima.sh macosx/script \
13   macosx/xmaxima.sh macosx/appIcon.icns \
14   ChangeLog-5.9.2 ChangeLog-5.9.3 ChangeLog-5.10.0 ChangeLog-5.11.0 \
15   ChangeLog-5.12.0 ChangeLog-5.13.0 ChangeLog-5.14.0 ChangeLog-5.15.0 \
16   ChangeLog-5.16 ChangeLog-5.17 ChangeLog-5.17-special-functions \
17   ChangeLog-5.18 ChangeLog-5.19 ChangeLog-5.20 ChangeLog-5.21 ChangeLog-5.22 \
18   ChangeLog-5.23 ChangeLog-5.24 ChangeLog-5.25 ChangeLog-5.26 ChangeLog-5.27 \
19   ChangeLog-5.28 ChangeLog-5.29 ChangeLog-5.30 ChangeLog-5.31 ChangeLog-5.32 \
20   ChangeLog-5.33 ChangeLog-5.34 ChangeLog-5.35 ChangeLog-5.36.md ChangeLog-5.37.md \
21   ChangeLog-5.38.md ChangeLog-5.39.md LICENSES/getopt-license.txt
22   
23 include common.mk
25 extradocinstall:
26         test -d "$(DESTDIR)$(docdir)" || mkdir -p "$(DESTDIR)$(docdir)"
27         for file in AUTHORS COPYING INSTALL README README.lisps ; \
28             do \
29             $(INSTALL_DATA) $$file "$(DESTDIR)$(docdir)" ; \
30             done
32 $(distdir).tar.gz: Makefile.am
33         $(MAKE) dist
35 # Build the Maxima rpms. Optionally, use
36 #     make rpm SUDO=sudo
37 # to use sudo to wrap the commands. The user must have sudo permissions
38 # for rpm and cp.
39 rpm: $(distdir).tar.gz
40         $(SUDO) cp $(distdir).tar.gz /usr/src/redhat/SOURCES && \
41         $(SUDO) rpmbuild -ba maxima.spec
43 # windows installer rules
44 if WIN32
46 GNUPLOTDIR = "/c/programs/gnuplot"
47 WXMAXIMADIR = "/c/programs/wxMaxima"
49 # Install the gnuplot binary files
50 gnuplot: 
51         mkdir -p $(prefix)/gnuplot
52         cp -rf $(GNUPLOTDIR) $(prefix)/
54 # Install wxMaxima
55 wxmaxima:
56         test -d "$(prefix)/bin" || mkdir -p "$(prefix)/bin"
57         cp -rf $(WXMAXIMADIR) $(prefix)/wxMaxima
59 cclcopy:
60         test -d "$(prefix)/bin" || mkdir -p "$(prefix)/bin"
61         cp "$(OPENMCL_NAME)" "$(prefix)/bin/"
63 sbclcopy:
64         test -d "$(prefix)/bin" || mkdir -p "$(prefix)/bin"
65         cp "$(SBCL_NAME)" "$(prefix)/bin/"
67 RUNTIMECOPY = 
68 # Install files for lisp runtime support
69 if GCL
70 RUNTIMECOPY += gcccopy
71 endif
73 if OPENMCL
74 RUNTIMECOPY += cclcopy
75 endif
77 if SBCL
78 RUNTIMECOPY += sbclcopy
79 endif
81 # Install files for lisp runtime support
82 win32-lisp-runtime: $(RUNTIMECOPY)
84 MINGW=/mingw
85 if GCC331
86 GCCPREFIX=/usr/local
87 # Old gcc/mingw/msys install
88 gcccopy:
89         test -d "$(prefix)/bin" || mkdir -p "$(prefix)/bin"
90         test -d "$(prefix)/include" || mkdir -p "$(prefix)/include"
91         test -d "$(prefix)/include/sys" || mkdir -p "$(prefix)/include/sys"
92         test -d "$(prefix)/lib/gcc-lib/mingw32/$(GCCVER)/include" \
93                 || mkdir -p "$(prefix)/lib/gcc-lib/mingw32/$(GCCVER)/include"
94         cp $(GCCPREFIX)/bin/gcc.exe $(prefix)/bin
95         cp $(MINGW)/bin/mingwm10.dll $(prefix)/bin
96         cp $(MINGW)/bin/tclpip84.dll $(prefix)/bin
97         cp $(MINGW)/include/stdio.h $(prefix)/include
98         cp $(MINGW)/include/stdlib.h $(prefix)/include
99         cp $(MINGW)/include/setjmp.h $(prefix)/include
100         cp $(MINGW)/include/_mingw.h $(prefix)/include
101         cp $(MINGW)/include/math.h $(prefix)/include
102         cp $(MINGW)/include/unistd.h $(prefix)/include
103         cp $(MINGW)/include/io.h $(prefix)/include
104         cp $(MINGW)/include/process.h $(prefix)/include
105         cp $(MINGW)/include/getopt.h $(prefix)/include
106         cp $(MINGW)/include/stdint.h $(prefix)/include
107         cp $(MINGW)/include/sys/*.h $(prefix)/include/sys
108         cp $(MINGW)/include/varargs.h $(prefix)/include
109         cp $(MINGW)/include/stddef.h $(prefix)/include
110         cp $(GCCPREFIX)/lib/gcc-lib/mingw32/$(GCCVER)/cc1.exe \
111                 $(prefix)/lib/gcc-lib/mingw32/$(GCCVER)
112         cp $(MINGW)/bin/as.exe \
113                 $(prefix)/lib/gcc-lib/mingw32/$(GCCVER)
114         cp $(GCCPREFIX)/lib/gcc-lib/mingw32/$(GCCVER)/specs  \
115                 $(prefix)/lib/gcc-lib/mingw32/$(GCCVER)
116         cp $(GCCPREFIX)/lib/gcc-lib/mingw32/$(GCCVER)/include/*.h  \
117                 $(prefix)/lib/gcc-lib/mingw32/$(GCCVER)/include
119 else # GCC331
121 GCCPREFIX=$(MINGW)
122 # New (November 2013) gcc/mingw/msys install using gcc-4.8.1
123 gcccopy:
124         test -d "$(prefix)/bin" || mkdir -p "$(prefix)/bin"
125         test -d "$(prefix)/include" || mkdir -p "$(prefix)/include"
126         test -d "$(prefix)/include/sys" || mkdir -p "$(prefix)/include/sys"
127         test -d "$(prefix)/lib/gcc/mingw32/$(GCCVER)/include" \
128                 || mkdir -p "$(prefix)/lib/gcc/mingw32/$(GCCVER)/include"
129         test -d "$(prefix)/libexec/gcc/mingw32/$(GCCVER)" \
130                 || mkdir -p "$(prefix)/libexec/gcc/mingw32/$(GCCVER)"
131         cp $(GCCPREFIX)/bin/gcc.exe $(prefix)/bin
132         cp $(MINGW)/bin/mingwm10.dll $(prefix)/bin
133         cp $(GCCPREFIX)/bin/libgmp-10.dll $(prefix)/bin
134         cp $(GCCPREFIX)/bin/libmpc-3.dll $(prefix)/bin
135         cp $(GCCPREFIX)/bin/libmpfr-4.dll $(prefix)/bin
136         cp /c/tcl/bin/tclpip85.dll $(prefix)/bin
137         cp $(MINGW)/include/stdio.h $(prefix)/include
138         cp $(MINGW)/include/stdlib.h $(prefix)/include
139         cp $(MINGW)/include/setjmp.h $(prefix)/include
140         cp $(MINGW)/include/_mingw.h $(prefix)/include
141         cp $(MINGW)/include/math.h $(prefix)/include
142         cp $(MINGW)/include/unistd.h $(prefix)/include
143         cp $(MINGW)/include/io.h $(prefix)/include
144         cp $(MINGW)/include/process.h $(prefix)/include
145         cp $(MINGW)/include/getopt.h $(prefix)/include
146         cp $(MINGW)/include/stdint.h $(prefix)/include
147         cp $(MINGW)/include/sys/*.h $(prefix)/include/sys
148         cp $(GCCPREFIX)/libexec/gcc/mingw32/$(GCCVER)/cc1.exe \
149                 $(prefix)/libexec/gcc/mingw32/$(GCCVER)
150         cp $(GCCPREFIX)/libexec/gcc/mingw32/$(GCCVER)/liblto_plugin-0.dll \
151                 $(prefix)/libexec/gcc/mingw32/$(GCCVER)
152         cp $(MINGW)/bin/as.exe \
153                 $(prefix)/libexec/gcc
154         cp $(GCCPREFIX)/lib/gcc/mingw32/$(GCCVER)/include/*.h  \
155                 $(prefix)/lib/gcc/mingw32/$(GCCVER)/include
157 endif # GCC331
159 iss: win32-lisp-runtime wxmaxima gnuplot extradocinstall
161 endif # WIN32
163 mimedatadir = $(datarootdir)/mime/packages
164 dist_mimedata_DATA = x-mac.xml