Another restructuring: moved include/*.h -> include/GiNaC/*.h in order to
[ginac.git] / Makefile.in
1 # This is the prototype Makefile for the GiNaC package. 
2
3 # Not every make knows what CXX is, so we inherit it together with some other
4 # values from configure which checks it anyways:
5 CXX = @CXX@
6 CXXFLAGS = @CXXFLAGS@
7 CPPFLAGS = @CPPFLAGS@
8 DEFS = @DEFS@
9 LIBS = @LIBS@
10 LDFLAGS = @LDFLAGS@
11
12 # Here come the usual install directories in GNU-configure fashion:
13 srcdir = @srcdir@
14 prefix = @prefix@
15 exec_prefix = @exec_prefix@
16 bindir = @bindir@
17 libdir = @libdir@
18 includedir = @includedir@/GiNaC
19
20 # This must be empty unless the user has called configure with --enable-shared:
21 shared = @shared@
22
23 # The version-number is tracked in configure.in only:
24 LIBGINACVER = @LibGiNaC_Ver@
25
26 # Autoconf macro AC_PROC_INSTALL sets these:
27 INSTALL = @INSTALL@
28 INSTALL_DATA = @INSTALL_DATA@
29
30
31 all:    lib ginsh/ginsh
32         echo "now type make install"
33
34 src/libginac.la:
35         cd src; ${MAKE} libginac.la
36
37 src/.libs/libginac.a:
38         cd src; ${MAKE} .libs/libginac.a
39
40 lib:
41         cd src; ${MAKE} all
42
43
44 # Targets for making the GiNaC interactive shell (ginsh)
45 ginsh: ginsh/ginsh
46
47 ginsh/ginsh:
48         if [ "${shared}" ]; then \
49                 ${MAKE} sharedginsh; \
50         else \
51                 ${MAKE} staticginsh; \
52         fi
53
54 sharedginsh: src/libginac.la
55         cd ginsh; ${MAKE} sharedginsh
56
57 staticginsh: src/.libs/libginac.a
58         cd ginsh; ${MAKE} staticginsh
59
60
61 # Target for running a test-suite across the library:
62 check:
63         if [ "${shared}" ]; then \
64                 ${MAKE} sharedcheck; \
65         else \
66                 ${MAKE} staticcheck; \
67         fi
68
69 sharedcheck: src/libginac.la
70         cd check; ${MAKE} sharedcheck
71
72 staticcheck: src/.libs/libginac.a
73         cd check; ${MAKE} staticcheck
74
75
76 # Targets for installation in install directories.  The user-visible target
77 # `install' determines which one to call (static lib only or both shared and
78 # static lib).
79 install: installdirs
80         @ if [ "${shared}" ]; then \
81                 ${MAKE} sharedinst; \
82         else \
83                 ${MAKE} staticinst; \
84         fi
85         ${INSTALL_DATA} include/GiNaC/*.h ${includedir}/
86         cd ginsh; ${MAKE} install
87         cd doc; ${MAKE} install
88
89 sharedinst: src/libginac.la
90         ${LIBTOOL} install src/libginac.la ${libdir}/libginac.la
91         ${LIBTOOL} -n --finish ${libdir}
92
93 staticinst: src/.libs/libginac.a
94         ${INSTALL_DATA} src/.libs/libginac.a ${libdir}/libginac.a
95
96 installdirs:
97         ./mkinstalldirs ${libdir} ${includedir}
98
99
100 # Targets for cleaning up. (clean deletes files created by built, distclean
101 # deletes files created by configuration, uninstall removes all files related
102 # to GiNaC from the system.)
103 clean:
104         cd src; ${MAKE} clean
105         cd check; ${MAKE} clean
106         cd ginsh; ${MAKE} clean
107
108 distclean: clean
109         cd src; ${MAKE} distclean
110         cd check; ${MAKE} distclean
111         cd ginsh; ${MAKE} distclean
112         rm -f config.status config.log config.cache config.h Makefile
113
114 uninstall:
115         rm -f ${libdir}/libginac.*
116         rm -rf ${includedir}
117         cd ginsh; ${MAKE} uninstall
118         cd doc; ${MAKE} uninstall
119
120
121 # Convenient targets for those who wish to extend on the documentation:
122 doc:
123         cd doc; ${MAKE} all
124 reference:
125         cd doc; ${MAKE} reference
126 tutorial:
127         cd doc; ${MAKE} tutorial
128
129
130 # Special dummy targets:
131 .PHONY: clean distclean all install installdirs uninstall check ginsh doc
132 .SUFFIXES: .o .lo .cpp
133 .SILENT: all check sharedcheck staticcheck doc reference tutorial
134