X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=Makefile;h=2f96388a09fad913bcbb1458bf700dd67087b194;hb=838faa794a5feec77680499eb4e71bf8a92a4509;hp=179fed860bce2d54abd3309fda1ac8576ff4e5c3;hpb=59c1f51ef38081d87885a37873545154c7a23e2d;p=apps%2Fpfixtools.git diff --git a/Makefile b/Makefile index 179fed8..2f96388 100644 --- a/Makefile +++ b/Makefile @@ -30,14 +30,16 @@ ############################################################################## include mk/cflags.mk -CFLAGS += --std=gnu99 -D_GNU_SOURCE -D_FORTIFY_SOURCE=1 +CFLAGS += --std=gnu99 -D_GNU_SOURCE -D_FORTIFY_SOURCE=2 PROGRAMS = postlicyd +GENERATED = tokens.h tokens.c + postlicyd_SOURCES = \ - str.h buffer.h job.h postfix.h gai.h query.h \ - str.c buffer.c job.c postfix.c gai.c \ - postlicyd.c + str.h buffer.h job.h postfix.h gai.h \ + str.c buffer.c job.c postfix.c gai.c \ + postlicyd.c $(GENERATED) postlicyd_LIBADD = -lanl @@ -50,6 +52,7 @@ clean: $(RM) .*.o distclean: clean + $(RM) $(GENERATED) tags: .tags .tags: $(shell git ls-files | egrep '\.[hc]$$') @@ -61,6 +64,12 @@ headers: ( echo "package headache not installed" ; exit 1 ) @git ls-files | egrep '(\.h|\.c|Makefile|*\.mk)$$' | xargs -t headache $(HEADACHEOPTS) +%.c: %.sh + ./$< $@ || ($(RM) $@; exit 1) + +%.h: %.sh + ./$< $@ || ($(RM) $@; exit 1) + .%.o: %.c Makefile $(CC) $(CFLAGS) -MMD -MT ".$*.d $@" -MF .$*.d -g -c -o $@ $<