X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=Makefile;h=49ac809f6fea213298efd381963f42f7a8516e0c;hb=6276d460a9deb4bb530cefdaa0a43b62a8ed5854;hp=9170135a353774f4a73186e83bc04a9cd964492c;hpb=9a4efa4f0dc893f243ee69d1b20f024666ca943d;p=apps%2Fpfixtools.git diff --git a/Makefile b/Makefile index 9170135..49ac809 100644 --- a/Makefile +++ b/Makefile @@ -46,17 +46,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,7 +68,7 @@ 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)))