1 # This is a list of all non-source files that are part of the distribution.
2 AUXFILES := Makefile Readme.txt
4 SRCFILES := $(shell find . -name "*.c" -mindepth 1 -maxdepth 3)
5 HDRFILES := $(shell find . -name "*.h" -mindepth 1 -maxdepth 3)
6 OBJFILES := $(patsubst %.c,%.o,$(SRCFILES))
7 TSTFILES := $(patsubst %.c,%.t,$(SRCFILES))
8 DEPFILES := $(patsubst %.c,%.d,$(SRCFILES))
9 ALLFILES := $(SRCFILES) $(HDRFILES) $(AUXFILES)
11 .PHONY: all clean dist
17 -@rc=0; for file in $(TSTFILES); do ./$$file; rc=`expr $$rc + $$?`; done; echo; echo "Tests failed: $$rc"
22 -@for file in $(OBJFILES) $(DEPFILES) $(TSTFILES) pdclib.a; do if [ -f $$file ]; then rm $$file; fi; done
25 @tar czf pdclib.tgz $(ALLFILES)
28 @$(CC) -Wall -DNDEBUG -MMD -MP -MT "$*.d $*.t" -g -std=c99 -I./internals -c $< -o $@
31 @$(CC) -Wall -DTEST -std=c99 -I./internals/ $< -o $@