X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=Makefile;h=179fed860bce2d54abd3309fda1ac8576ff4e5c3;hb=59c1f51ef38081d87885a37873545154c7a23e2d;hp=bd9fb105a50e79cbbfd51148bc0c1b66814827cd;hpb=72ae8ee27f8277beda672104722ef3bdd86c8da9;p=apps%2Fpfixtools.git diff --git a/Makefile b/Makefile index bd9fb10..179fed8 100644 --- a/Makefile +++ b/Makefile @@ -30,15 +30,16 @@ ############################################################################## include mk/cflags.mk +CFLAGS += --std=gnu99 -D_GNU_SOURCE -D_FORTIFY_SOURCE=1 PROGRAMS = postlicyd postlicyd_SOURCES = \ - policy.h \ - policy.c \ + str.h buffer.h job.h postfix.h gai.h query.h \ + str.c buffer.c job.c postfix.c gai.c \ postlicyd.c -postlicyd_LIBADD = -ludns +postlicyd_LIBADD = -lanl # RULES ###################################################################{{{ @@ -46,17 +47,21 @@ all: $(PROGRAMS) clean: $(RM) $(PROGRAMS) - $(RM) *.o + $(RM) .*.o distclean: clean +tags: .tags +.tags: $(shell git ls-files | egrep '\.[hc]$$') + ctags -o $@ $^ + headers: HEADACHEOPTS=-c mk/headache.cfg -h COPYING headers: @which headache > /dev/null || \ ( echo "package headache not installed" ; exit 1 ) @git ls-files | egrep '(\.h|\.c|Makefile|*\.mk)$$' | xargs -t headache $(HEADACHEOPTS) -%.o: %.c Makefile +.%.o: %.c Makefile $(CC) $(CFLAGS) -MMD -MT ".$*.d $@" -MF .$*.d -g -c -o $@ $< %.d: %.c Makefile @@ -64,9 +69,9 @@ headers: .SECONDEXPANSION: -$(PROGRAMS): $$(patsubst %.c,%.o,$$($$@_SOURCES)) Makefile +$(PROGRAMS): $$(patsubst %.c,.%.o,$$($$@_SOURCES)) Makefile $(CC) -o $@ $(CFLAGS) $(filter %.o,$^) $(LDFLAGS) $($@_LIBADD) $(filter %.a,$^) --include $(foreach p,$(PROGRAMS),$(patsubst %.c,%.d,$(filter %.c,$p_SOURCES))) +-include $(foreach p,$(PROGRAMS),$(patsubst %.c,.%.d,$(filter %.c,$($p_SOURCES)))) ###########################################################################}}}