Remove some code duplication in TRANSLATE-PREDICATE
[maxima.git] / Makefile.am
blob2f58e057382507cbd279fad91fab564edd43f094
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.md 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   changelogs ChangeLog LICENSES/getopt-license.txt\
19   snap/snapcraft.yaml
21 include common.mk
23 extradocinstall:
24         test -d "$(DESTDIR)$(docdir)" || mkdir -p "$(DESTDIR)$(docdir)"
25         for file in AUTHORS COPYING INSTALL README README-lisps.md ; \
26             do \
27             $(INSTALL_DATA) $$file "$(DESTDIR)$(docdir)" ; \
28             done
30 $(distdir).tar.gz: Makefile.am
31         $(MAKE) dist
33 # windows installer rules
34 if WIN32
36 GNUPLOTDIR = "/c/programs/gnuplot"
37 WXMAXIMADIR = "/c/programs/wxMaxima"
39 # Install the gnuplot binary files
40 gnuplot: 
41         mkdir -p $(prefix)/gnuplot
42         cp -rf $(GNUPLOTDIR) $(prefix)/
44 # Install wxMaxima
45 wxmaxima:
46         test -d "$(prefix)/bin" || mkdir -p "$(prefix)/bin"
47         cp -rf $(WXMAXIMADIR) $(prefix)/wxMaxima
49 cclcopy:
50         test -d "$(prefix)/bin" || mkdir -p "$(prefix)/bin"
51         cp "$(OPENMCL_NAME)" "$(prefix)/bin/"
53 sbclcopy:
54         test -d "$(prefix)/bin" || mkdir -p "$(prefix)/bin"
55         cp "$(SBCL_NAME)" "$(prefix)/bin/"
57 RUNTIMECOPY = 
58 # Install files for lisp runtime support
59 if GCL
60 RUNTIMECOPY += gcccopy
61 endif
63 if OPENMCL
64 RUNTIMECOPY += cclcopy
65 endif
67 if SBCL
68 RUNTIMECOPY += sbclcopy
69 endif
71 # Install files for lisp runtime support
72 win32-lisp-runtime: $(RUNTIMECOPY)
74 MINGW=/mingw
75 if GCC331
76 GCCPREFIX=/usr/local
77 # Old gcc/mingw/msys install
78 gcccopy:
79         test -d "$(prefix)/bin" || mkdir -p "$(prefix)/bin"
80         test -d "$(prefix)/include" || mkdir -p "$(prefix)/include"
81         test -d "$(prefix)/include/sys" || mkdir -p "$(prefix)/include/sys"
82         test -d "$(prefix)/lib/gcc-lib/mingw32/$(GCCVER)/include" \
83                 || mkdir -p "$(prefix)/lib/gcc-lib/mingw32/$(GCCVER)/include"
84         cp $(GCCPREFIX)/bin/gcc.exe $(prefix)/bin
85         cp $(MINGW)/bin/mingwm10.dll $(prefix)/bin
86         cp $(MINGW)/bin/tclpip84.dll $(prefix)/bin
87         cp $(MINGW)/include/stdio.h $(prefix)/include
88         cp $(MINGW)/include/stdlib.h $(prefix)/include
89         cp $(MINGW)/include/setjmp.h $(prefix)/include
90         cp $(MINGW)/include/_mingw.h $(prefix)/include
91         cp $(MINGW)/include/math.h $(prefix)/include
92         cp $(MINGW)/include/unistd.h $(prefix)/include
93         cp $(MINGW)/include/io.h $(prefix)/include
94         cp $(MINGW)/include/process.h $(prefix)/include
95         cp $(MINGW)/include/getopt.h $(prefix)/include
96         cp $(MINGW)/include/stdint.h $(prefix)/include
97         cp $(MINGW)/include/sys/*.h $(prefix)/include/sys
98         cp $(MINGW)/include/varargs.h $(prefix)/include
99         cp $(MINGW)/include/stddef.h $(prefix)/include
100         cp $(GCCPREFIX)/lib/gcc-lib/mingw32/$(GCCVER)/cc1.exe \
101                 $(prefix)/lib/gcc-lib/mingw32/$(GCCVER)
102         cp $(MINGW)/bin/as.exe \
103                 $(prefix)/lib/gcc-lib/mingw32/$(GCCVER)
104         cp $(GCCPREFIX)/lib/gcc-lib/mingw32/$(GCCVER)/specs  \
105                 $(prefix)/lib/gcc-lib/mingw32/$(GCCVER)
106         cp $(GCCPREFIX)/lib/gcc-lib/mingw32/$(GCCVER)/include/*.h  \
107                 $(prefix)/lib/gcc-lib/mingw32/$(GCCVER)/include
109 else # GCC331
111 GCCPREFIX=$(MINGW)
112 # New (November 2013) gcc/mingw/msys install using gcc-4.8.1
113 gcccopy:
114         test -d "$(prefix)/bin" || mkdir -p "$(prefix)/bin"
115         test -d "$(prefix)/include" || mkdir -p "$(prefix)/include"
116         test -d "$(prefix)/include/sys" || mkdir -p "$(prefix)/include/sys"
117         test -d "$(prefix)/lib/gcc/mingw32/$(GCCVER)/include" \
118                 || mkdir -p "$(prefix)/lib/gcc/mingw32/$(GCCVER)/include"
119         test -d "$(prefix)/libexec/gcc/mingw32/$(GCCVER)" \
120                 || mkdir -p "$(prefix)/libexec/gcc/mingw32/$(GCCVER)"
121         cp $(GCCPREFIX)/bin/gcc.exe $(prefix)/bin
122         cp $(MINGW)/bin/mingwm10.dll $(prefix)/bin
123         cp $(GCCPREFIX)/bin/libgmp-10.dll $(prefix)/bin
124         cp $(GCCPREFIX)/bin/libmpc-3.dll $(prefix)/bin
125         cp $(GCCPREFIX)/bin/libmpfr-4.dll $(prefix)/bin
126         cp /c/tcl/bin/tclpip85.dll $(prefix)/bin
127         cp $(MINGW)/include/stdio.h $(prefix)/include
128         cp $(MINGW)/include/stdlib.h $(prefix)/include
129         cp $(MINGW)/include/setjmp.h $(prefix)/include
130         cp $(MINGW)/include/_mingw.h $(prefix)/include
131         cp $(MINGW)/include/math.h $(prefix)/include
132         cp $(MINGW)/include/unistd.h $(prefix)/include
133         cp $(MINGW)/include/io.h $(prefix)/include
134         cp $(MINGW)/include/process.h $(prefix)/include
135         cp $(MINGW)/include/getopt.h $(prefix)/include
136         cp $(MINGW)/include/stdint.h $(prefix)/include
137         cp $(MINGW)/include/sys/*.h $(prefix)/include/sys
138         cp $(GCCPREFIX)/libexec/gcc/mingw32/$(GCCVER)/cc1.exe \
139                 $(prefix)/libexec/gcc/mingw32/$(GCCVER)
140         cp $(GCCPREFIX)/libexec/gcc/mingw32/$(GCCVER)/liblto_plugin-0.dll \
141                 $(prefix)/libexec/gcc/mingw32/$(GCCVER)
142         cp $(MINGW)/bin/as.exe \
143                 $(prefix)/libexec/gcc
144         cp $(GCCPREFIX)/lib/gcc/mingw32/$(GCCVER)/include/*.h  \
145                 $(prefix)/lib/gcc/mingw32/$(GCCVER)/include
147 endif # GCC331
149 iss: win32-lisp-runtime wxmaxima gnuplot extradocinstall
151 endif # WIN32
153 rpm: maxima.spec dist-gzip
154         rpmbuild -ba $(top_srcdir)/maxima.spec --define "_sourcedir $(abs_top_builddir)" --define "_rpmdir $(abs_top_builddir)"
155         rpmbuild -bb $(top_srcdir)/maxima.spec --define "_sourcedir $(abs_top_builddir)" --define "_rpmdir $(abs_top_builddir)"
157 clean-local:
158         rm -rf bin
159         rm -rf binary
161 check-local: all