8 # fparser installation directories
10 #LIBDIR = /usr/local/lib
11 #INCDIR = /usr/local/include/fparser
14 #LIBDIR = $(HOME)/local/lib
15 #INCDIR = $(HOME)/local/include/fparser
19 LIBDIR = $(DESTDIR)/$(PREFIX)/lib
20 INCDIR = $(DESTDIR)/$(PREFIX)/include/fparser
23 #------------------------ do not edit ------------------------
29 CFLAGS = -I./src -g -O2 -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DLINUX=1 -DSTDC_HEADERS=1
30 INSTALL = /usr/bin/install -c
31 INSTALL_DATA = ${INSTALL} -m 644
33 MAKEDEPEND = makedepend
40 $(BASE_DIR)/fparser.cpp
51 $(CXX) $(CFLAGS) -c $< -o $@
54 all: prepare ./lib/libfparser.a
57 test -d ./include || mkdir -p ./include
58 -( cd ./include; rm -f *.h; \
59 for hf in `find ../src -name '*.h'`; do \
60 if [ "x$$OS" = "xWindows_NT" ]; then \
63 ln -s "$$hf" 2> /dev/null; \
67 shared: ./lib/libfparser.so.$(VERSION)
70 ./lib/libfparser.a: $(OBJ)
71 test -d ./lib || mkdir ./lib
72 $(AR) $(ARFLAGS) ./lib/libfparser.a $(OBJ)
74 ./lib/libfparser.so.$(VERSION): $(OBJ)
75 test -d ./lib || mkdir ./lib
76 $(CC) -p -shared -o ./lib/libfparser.so.$(VERSION) $(OBJ) -lc -lm
77 -(cd ./lib ; ln -s libfparser.so.$(VERSION) libfparser.so)
79 install: ./lib/libfparser.a
80 test -d $(LIBDIR) || mkdir -p $(LIBDIR)
81 test -d $(INCDIR) || mkdir -p $(INCDIR)
82 $(INSTALL_DATA) ./lib/libfparser.a $(LIBDIR)
83 #-(ln -s $(LIBDIR)/libfparser.a $(LIBDIR)/libfparser.a)
84 for IFILE in $(INS); do \
85 $(INSTALL_DATA) $$IFILE $(INCDIR); \
88 install-shared: ./lib/libfparser.so.$(VERSION)
89 test -d $(LIBDIR) || mkdir -p $(LIBDIR)
90 test -d $(INCDIR) || mkdir -p $(INCDIR)
91 #$(INSTALL_DATA) ./lib/libfparser.so.$(VERSION) $(LIBDIR)
92 -(ln -s $(LIBDIR)/libfparser.so.$(VERSION) $(LIBDIR)/libfparser.so)
93 for IFILE in $(INS); do \
94 $(INSTALL_DATA) $$IFILE $(INCDIR); \
99 -rm -f ./lib/lib* Makefile.bak
100 -rm -f ./include/fparser/*.h
101 -$(FIND) . -name "*~" -exec rm -f {} \;
102 -rm -f ./lib/libfparser.$(VERSION).a
105 -rm -f Makefile configure
108 $(MAKEDEPEND) -- $(CFLAGS) -- $(SRC)
110 @echo "Run 'make' to build fparser library."
113 # DO NOT DELETE THIS LINE -- make depend depends on it.