# Makefile for the Mathomatic symbolic math library and library test. # Currently uses gcc only options in CFLAGS, just remove them for other C compilers. # Be sure to "make clean" between using different makefiles. VERSION = `cat VERSION` CFLAGS += -Wuninitialized -Wunused -Wshadow -Wformat -Wparentheses -Wcast-align CFLAGS += -O -DLIBRARY -DUNIX -DVERSION=\"$(VERSION)\" LDFLAGS += -s LIBS += -lm AOUT = mathomatic # The name of the library test executable to create. LIB = libmathomatic.a # The symbolic math library name. OBJECTS = lib/lib.o globals.o am.o solve.o help.o parse.o cmds.o simplify.o \ factor.o super.o unfactor.o poly.o diff.o integrate.o \ complex.o complex_lib.o list.o gcd.o factor_int.o all: $(AOUT) @echo Make completed. lib $(LIB): $(OBJECTS) ar cr $(LIB) $(OBJECTS) ranlib $(LIB) $(OBJECTS): includes.h am.h externs.h complex.h proto.h VERSION $(AOUT): lib/test.o $(LIB) $(CC) $(LDFLAGS) lib/test.o $(LIB) $(LIBS) -o $(AOUT) install: install -m 0644 $(LIB) /usr/lib install -m 0644 lib/mathomatic.h /usr/include clean: rm -f *.o rm -f lib/*.o flush: clean rm -f $(AOUT)