-# This is the prototype Makefile for ginsh.
-SHELL = /bin/sh
+# This is the prototype Makefile for the GiNaC interactive shell (ginsh).
# Not every make knows what CXX is, so we inherit it together with some other
# values from configure which checks it anyways:
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ -s
-OBJECTS=y.tab.o @LEX_OUTPUT_ROOT@.o ../src/*.o
+OBJECTS=y.tab.o @LEX_OUTPUT_ROOT@.o
-all: depend ginsh
+all:
+ echo "Please call it with 'make ginsh' from top-level Makefile."
+ echo "Alternatively, you can use this Makefile's targets {shared|static} ginsh"
+ echo "depending on your personal preferences and which lib you built."
-ginsh: ${OBJECTS}
- ${CXX} ${CXXFLAGS} ${LDFLAGS} ${OBJECTS} ${LIBS} -o ginsh
+sharedginsh: depend ${OBJECTS}
+ ${CXX} ${CXXFLAGS} ${LDFLAGS} ${OBJECTS} ${LIBS} -Wl,--rpath -Wl,../src/.libs -L../src/.libs -lginac -o ginsh
+
+staticginsh: depend ${OBJECTS}
+ ${CXX} ${CXXFLAGS} ${LDFLAGS} ${OBJECTS} ${LIBS} ../src/.libs/libginac.a -o ginsh
# Targets for installation in install directories.
install: ginsh installdirs
-${INSTALL_DATA} ginsh.1 ${man1dir}/ginsh.1
installdirs:
- ${SHELL} mkinstalldirs ${bindir} ${man1dir}
+ ../mkinstalldirs ${bindir} ${man1dir}
# Targets for cleaning up. (clean deletes files created by built, distclean
# deletes files created by configuration, uninstall removes all files related