1 # This is the prototype Makefile for the GiNaC interactive shell (ginsh).
3 # Not every make knows what CXX is, so we inherit it together with some other
4 # values from configure which checks it anyways:
7 CPPFLAGS = @CPPFLAGS@ -I../ -I../include
14 # Here come the usual install directories in GNU-configure fashion:
16 exec_prefix = @exec_prefix@
19 man1dir = ${mandir}/man1
21 # This must be empty if configure couldn't find it in ${PATH}:
22 MAKEDEPEND = @MAKEDEPEND@
24 # Autoconf macro AC_PROC_INSTALL sets these:
26 INSTALL_DATA = @INSTALL_DATA@
27 INSTALL_PROGRAM = @INSTALL_PROGRAM@ -s
29 OBJECTS=y.tab.o @LEX_OUTPUT_ROOT@.o
32 echo "Please call it with 'make ginsh' from top-level Makefile."
33 echo "Alternatively, you can use this Makefile's targets {shared|static} ginsh"
34 echo "depending on your personal preferences and which lib you built."
36 sharedginsh: depend ${OBJECTS}
37 ${CXX} ${CXXFLAGS} ${LDFLAGS} ${OBJECTS} ${LIBS} -Wl,--rpath -Wl,../src/.libs -L../src/.libs -lginac -o ginsh
39 staticginsh: depend ${OBJECTS}
40 ${CXX} ${CXXFLAGS} ${LDFLAGS} ${OBJECTS} ${LIBS} ../src/.libs/libginac.a -o ginsh
42 # Targets for installation in install directories.
43 install: ginsh installdirs
44 ${INSTALL_PROGRAM} ginsh ${bindir}/ginsh
45 -${INSTALL_DATA} ginsh.1 ${man1dir}/ginsh.1
48 ../mkinstalldirs ${bindir} ${man1dir}
50 # Targets for cleaning up. (clean deletes files created by built, distclean
51 # deletes files created by configuration, uninstall removes all files related
52 # to ginsh from the system.)
54 rm -f y.tab.c y.tab.h @LEX_OUTPUT_ROOT@.c
55 rm -f *.o *.lo core ginsh
58 rm -f config.status config.log config.cache config.h Makefile Makefile.bak
62 rm -f ${man1dir}/ginsh.1
64 # If Todd Brunhoff's makedepend is installed (it may not---it's part of X11);
65 # then call it; else wait for trouble ahead; fi; # :-)
67 @if [ ${MAKEDEPEND} ]; then \
68 echo "calling ${MAKEDEPEND}"; \
69 ${MAKEDEPEND} -Y. -Y../include *.cpp 2> /dev/null; \
72 # Special dummy targets:
73 .PHONY: clean distclean depend all install uninstall check doc
74 .SUFFIXES: .o .c .h .y .l
78 ${CXX} ${CPPFLAGS} ${CXXFLAGS} ${DEFS} -c $<
81 y.tab.c y.tab.h: ginsh.y
84 @LEX_OUTPUT_ROOT@.c: ginsh.l
87 # DO NOT DELETE THIS LINE -- make depend depends on it.