1# This Makefile.alt is subordinate to Makefile (usage: make alt) 2# Its distinction is that it builds the test programs by linking 3# them with libtpl rather than by compiling tpl.c into the tests. 4SRC = ../src 5LIBTOOL = ../libtool 6LTLIB = $(SRC)/libtpl.la 7CFLAGS = -I$(SRC) -g 8 9# We have an alternate basic test for MinGW 10ifneq ($(strip $(shell $(CC) -v 2>&1 |grep "mingw")),) 11 TARGET=mingw 12else 13 TARGET=$(PROGS) 14endif 15 16all: $(TARGET) 17 18 19$(PROGS) : $(LTLIB) 20 $(CC) -c $(CFLAGS) $(@).c 21 $(LIBTOOL) --mode=link --tag=CC $(CC) -o $@ $(@).o $(LTLIB) 22 23$(LTLIB) : 24 @echo "you must first run 'configure; make' in the top-level directory" 25 @exit 1 26 27mingw : 28 @echo "" 29 @echo "MinGW has its own test suite. Please run make -f Makefile.mingw" 30 @echo "" 31 @exit 1 32