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 DEPFILES := $(patsubst %.c,%.d,$(SRCFILES))
8 ALLFILES := $(SRCFILES) $(HDRFILES) $(AUXFILES)
11 CFLAGS := -g -std=c99 -I./internals/
13 .PHONY: all clean dist
16 ar r pdclib.a $(OBJFILES)
21 -@for file in $(OBJFILES) $(DEPFILES) pdclib.a; do if [ -f $$file ]; then rm $$file; fi; done
24 @tar czf pdclib.tgz $(ALLFILES)
27 $(CC) $(MODE) -c $(CPPFLAGS) $(CFLAGS) $< -o $@