Target install should work now more or less.
[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
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 # Target for making the GiNaC interactive shell (ginsh):
45 ginsh:
46         if [ "${shared}" ]; then ${MAKE} sharedginsh; else ${MAKE} staticginsh; fi
47
48 sharedginsh: src/libginac.la
49         cd ginsh; ${MAKE} sharedginsh
50
51 staticginsh: src/.libs/libginac.a
52         cd ginsh; ${MAKE} staticginsh
53
54
55 # Target for running a test-suite across the library:
56 check:
57         if [ "${shared}" ]; then ${MAKE} sharedcheck; else ${MAKE} staticcheck; fi
58
59 sharedcheck: src/libginac.la
60         cd check; ${MAKE} sharedcheck
61
62 staticcheck: src/.libs/libginac.a
63         cd check; ${MAKE} staticcheck
64
65
66 # Targets for installation in install directories.  The user-visible target
67 # `install' determines which one to call (static lib only or both shared and
68 # static lib).
69 install:
70         @ if [ "${shared}" ]; then \
71                 ${MAKE} shlibinst; \
72         else \
73                 ${MAKE} libinst; \
74         fi
75         ${INSTALL} -d ${includedir}
76         ${INSTALL_DATA} include/*.h ${includedir}/
77         cd ginsh; ${MAKE} install
78         cd doc; ${MAKE} install
79
80 shlibinst: src/libginac.la installdirs
81         ${LIBTOOL} install src/libginac.la ${libdir}/libginac.la
82         ${LIBTOOL} -n --finish ${libdir}
83
84 libinst: src/.libs/libginac.a installdirs
85         ${INSTALL_DATA} src/.libs/libginac.a ${libdir}/libginac.a
86
87 installdirs:
88         ./mkinstalldirs ${libdir} ${includedir}
89
90
91 # Targets for cleaning up. (clean deletes files created by built, distclean
92 # deletes files created by configuration, uninstall removes all files related
93 # to GiNaC from the system.)
94 clean:
95         cd src; ${MAKE} clean
96         cd check; ${MAKE} clean
97         cd ginsh; ${MAKE} clean
98
99 distclean: clean
100         cd src; ${MAKE} distclean
101         cd check; ${MAKE} distclean
102         cd ginsh; ${MAKE} distclean
103         rm -f config.status config.log config.cache config.h Makefile
104
105 uninstall:
106         rm -f ${libdir}/libginac.*
107         rm -rf ${includedir}
108         cd ginsh; ${MAKE} uninstall
109         cd doc; ${MAKE} uninstall
110
111
112 # Convenient targets for those who wish to extend on the documentation:
113 doc:
114         cd doc; ${MAKE} all
115 reference:
116         cd doc; ${MAKE} reference
117 tutorial:
118         cd doc; ${MAKE} tutorial
119
120
121 # Special dummy targets:
122 .PHONY: clean distclean all install installdirs uninstall check ginsh doc
123 .SUFFIXES: .o .lo .cpp
124 .SILENT: all check sharedcheck staticcheck doc reference tutorial
125