# Makefile for compiling and testing Mathomatic with CygWin for Windows. VERSION = `cat VERSION` CFLAGS = -O -DCYGWIN -DVERSION=\"$(VERSION)\" LDFLAGS = -s LIBS = -lm CFLAGS += -DREADLINE LIBS += -lreadline -lcurses AOUT =mathomatic OBJECTS =main.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. check: test test: $(AOUT) cd tests && time ../$(AOUT) -t all >test.out && fc all.out test.out @echo All tests passed. baseline: $(AOUT) cd tests && ../$(AOUT) -t all >all.out $(OBJECTS): includes.h am.h externs.h complex.h proto.h VERSION $(AOUT): $(OBJECTS) $(CC) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $(AOUT) clean: rm -f *.o rm -f lib/*.o