Bug fix: compile was not actually compiling the correct functions
[maxima.git] / Makefile.am
blob28963d7200bd597546abdb560e6143d142aa0007
1 # On debian-based systems this makes us use the right gcl version out-of-the box.
2 # On other systems it doesn't hurt.
3 export GCL_ANSI=t
5 if ENABLE_GETTEXT
6    LOCALE_DIR = locale
7 endif
9 SUBDIRS = admin crosscompile-windows src lisp-utils tests doc interfaces share demo plotting desktopintegration $(LOCALE_DIR)
11 EXTRA_DIST = \
12   common.mk maxima.iss.in \
13   README.lisps README.rpms README.i18n README.external README.developers-howto \
14   INSTALL.win32 INSTALL.lisp INSTALL.git INSTALL.win32nogcl \
15   configure.lisp  maxima-local.in xmaxima-local.in \
16   macosx/Makefile macosx/Readme.md macosx/maxima.sh macosx/script \
17   macosx/xmaxima.sh macosx/appIcon.icns macosx/How_to_install.rtf \
18   ChangeLog-5.9.2 ChangeLog-5.9.3 ChangeLog-5.10.0 ChangeLog-5.11.0 \
19   ChangeLog-5.12.0 ChangeLog-5.13.0 ChangeLog-5.14.0 ChangeLog-5.15.0 \
20   ChangeLog-5.16 ChangeLog-5.17 ChangeLog-5.17-special-functions \
21   ChangeLog-5.18 ChangeLog-5.19 ChangeLog-5.20 ChangeLog-5.21 ChangeLog-5.22 \
22   ChangeLog-5.23 ChangeLog-5.24 ChangeLog-5.25 ChangeLog-5.26 ChangeLog-5.27 \
23   ChangeLog-5.28 ChangeLog-5.29 ChangeLog-5.30 ChangeLog-5.31 ChangeLog-5.32 \
24   ChangeLog-5.33 ChangeLog-5.34 ChangeLog-5.35 ChangeLog-5.36.md ChangeLog-5.37.md \
25   ChangeLog-5.38.md ChangeLog-5.39.md ChangeLog-5.40.md ChangeLog-5.41.md \
26   ChangeLog-5.42.md LICENSES/getopt-license.txt\
27   snap/snapcraft.yaml
29 include common.mk
31 extradocinstall:
32         test -d "$(DESTDIR)$(docdir)" || mkdir -p "$(DESTDIR)$(docdir)"
33         for file in AUTHORS COPYING INSTALL README README.lisps ; \
34             do \
35             $(INSTALL_DATA) $$file "$(DESTDIR)$(docdir)" ; \
36             done
38 $(distdir).tar.gz: Makefile.am
39         $(MAKE) dist
41 # Build the Maxima rpms. Optionally, use
42 #     make rpm SUDO=sudo
43 # to use sudo to wrap the commands. The user must have sudo permissions
44 # for rpm and cp.
45 rpm: $(distdir).tar.gz
46         $(SUDO) cp $(distdir).tar.gz /usr/src/redhat/SOURCES && \
47         $(SUDO) rpmbuild -ba maxima.spec
49 # windows installer rules
50 if WIN32
52 GNUPLOTDIR = "/c/programs/gnuplot"
53 WXMAXIMADIR = "/c/programs/wxMaxima"
55 # Install the gnuplot binary files
56 gnuplot: 
57         mkdir -p $(prefix)/gnuplot
58         cp -rf $(GNUPLOTDIR) $(prefix)/
60 # Install wxMaxima
61 wxmaxima:
62         test -d "$(prefix)/bin" || mkdir -p "$(prefix)/bin"
63         cp -rf $(WXMAXIMADIR) $(prefix)/wxMaxima
65 cclcopy:
66         test -d "$(prefix)/bin" || mkdir -p "$(prefix)/bin"
67         cp "$(OPENMCL_NAME)" "$(prefix)/bin/"
69 sbclcopy:
70         test -d "$(prefix)/bin" || mkdir -p "$(prefix)/bin"
71         cp "$(SBCL_NAME)" "$(prefix)/bin/"
73 RUNTIMECOPY = 
74 # Install files for lisp runtime support
75 if GCL
76 RUNTIMECOPY += gcccopy
77 endif
79 if OPENMCL
80 RUNTIMECOPY += cclcopy
81 endif
83 if SBCL
84 RUNTIMECOPY += sbclcopy
85 endif
87 # Install files for lisp runtime support
88 win32-lisp-runtime: $(RUNTIMECOPY)
90 MINGW=/mingw
91 if GCC331
92 GCCPREFIX=/usr/local
93 # Old gcc/mingw/msys install
94 gcccopy:
95         test -d "$(prefix)/bin" || mkdir -p "$(prefix)/bin"
96         test -d "$(prefix)/include" || mkdir -p "$(prefix)/include"
97         test -d "$(prefix)/include/sys" || mkdir -p "$(prefix)/include/sys"
98         test -d "$(prefix)/lib/gcc-lib/mingw32/$(GCCVER)/include" \
99                 || mkdir -p "$(prefix)/lib/gcc-lib/mingw32/$(GCCVER)/include"
100         cp $(GCCPREFIX)/bin/gcc.exe $(prefix)/bin
101         cp $(MINGW)/bin/mingwm10.dll $(prefix)/bin
102         cp $(MINGW)/bin/tclpip84.dll $(prefix)/bin
103         cp $(MINGW)/include/stdio.h $(prefix)/include
104         cp $(MINGW)/include/stdlib.h $(prefix)/include
105         cp $(MINGW)/include/setjmp.h $(prefix)/include
106         cp $(MINGW)/include/_mingw.h $(prefix)/include
107         cp $(MINGW)/include/math.h $(prefix)/include
108         cp $(MINGW)/include/unistd.h $(prefix)/include
109         cp $(MINGW)/include/io.h $(prefix)/include
110         cp $(MINGW)/include/process.h $(prefix)/include
111         cp $(MINGW)/include/getopt.h $(prefix)/include
112         cp $(MINGW)/include/stdint.h $(prefix)/include
113         cp $(MINGW)/include/sys/*.h $(prefix)/include/sys
114         cp $(MINGW)/include/varargs.h $(prefix)/include
115         cp $(MINGW)/include/stddef.h $(prefix)/include
116         cp $(GCCPREFIX)/lib/gcc-lib/mingw32/$(GCCVER)/cc1.exe \
117                 $(prefix)/lib/gcc-lib/mingw32/$(GCCVER)
118         cp $(MINGW)/bin/as.exe \
119                 $(prefix)/lib/gcc-lib/mingw32/$(GCCVER)
120         cp $(GCCPREFIX)/lib/gcc-lib/mingw32/$(GCCVER)/specs  \
121                 $(prefix)/lib/gcc-lib/mingw32/$(GCCVER)
122         cp $(GCCPREFIX)/lib/gcc-lib/mingw32/$(GCCVER)/include/*.h  \
123                 $(prefix)/lib/gcc-lib/mingw32/$(GCCVER)/include
125 else # GCC331
127 GCCPREFIX=$(MINGW)
128 # New (November 2013) gcc/mingw/msys install using gcc-4.8.1
129 gcccopy:
130         test -d "$(prefix)/bin" || mkdir -p "$(prefix)/bin"
131         test -d "$(prefix)/include" || mkdir -p "$(prefix)/include"
132         test -d "$(prefix)/include/sys" || mkdir -p "$(prefix)/include/sys"
133         test -d "$(prefix)/lib/gcc/mingw32/$(GCCVER)/include" \
134                 || mkdir -p "$(prefix)/lib/gcc/mingw32/$(GCCVER)/include"
135         test -d "$(prefix)/libexec/gcc/mingw32/$(GCCVER)" \
136                 || mkdir -p "$(prefix)/libexec/gcc/mingw32/$(GCCVER)"
137         cp $(GCCPREFIX)/bin/gcc.exe $(prefix)/bin
138         cp $(MINGW)/bin/mingwm10.dll $(prefix)/bin
139         cp $(GCCPREFIX)/bin/libgmp-10.dll $(prefix)/bin
140         cp $(GCCPREFIX)/bin/libmpc-3.dll $(prefix)/bin
141         cp $(GCCPREFIX)/bin/libmpfr-4.dll $(prefix)/bin
142         cp /c/tcl/bin/tclpip85.dll $(prefix)/bin
143         cp $(MINGW)/include/stdio.h $(prefix)/include
144         cp $(MINGW)/include/stdlib.h $(prefix)/include
145         cp $(MINGW)/include/setjmp.h $(prefix)/include
146         cp $(MINGW)/include/_mingw.h $(prefix)/include
147         cp $(MINGW)/include/math.h $(prefix)/include
148         cp $(MINGW)/include/unistd.h $(prefix)/include
149         cp $(MINGW)/include/io.h $(prefix)/include
150         cp $(MINGW)/include/process.h $(prefix)/include
151         cp $(MINGW)/include/getopt.h $(prefix)/include
152         cp $(MINGW)/include/stdint.h $(prefix)/include
153         cp $(MINGW)/include/sys/*.h $(prefix)/include/sys
154         cp $(GCCPREFIX)/libexec/gcc/mingw32/$(GCCVER)/cc1.exe \
155                 $(prefix)/libexec/gcc/mingw32/$(GCCVER)
156         cp $(GCCPREFIX)/libexec/gcc/mingw32/$(GCCVER)/liblto_plugin-0.dll \
157                 $(prefix)/libexec/gcc/mingw32/$(GCCVER)
158         cp $(MINGW)/bin/as.exe \
159                 $(prefix)/libexec/gcc
160         cp $(GCCPREFIX)/lib/gcc/mingw32/$(GCCVER)/include/*.h  \
161                 $(prefix)/lib/gcc/mingw32/$(GCCVER)/include
163 endif # GCC331
165 iss: win32-lisp-runtime wxmaxima gnuplot extradocinstall
167 endif # WIN32
169 rpm: maxima.spec dist-gzip
170         rpmbuild -ba $(top_srcdir)/maxima.spec --define "_sourcedir $(abs_top_builddir)" --define "_rpmdir $(abs_top_builddir)"
171         rpmbuild -bb $(top_srcdir)/maxima.spec --define "_sourcedir $(abs_top_builddir)" --define "_rpmdir $(abs_top_builddir)"
173 clean-local:
174         rm -rf bin
175         rm -rf binary
177 check-local: all