2 COPT=-O2 -fstrict-aliasing -finline-limit=2000
3 CWARNS=-Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -Winline
8 CFLAGS=$(CLANG) $(COPT) $(CDEBUG) $(CWARNS) -I.
11 .PHONY: all dust clean distclean programs dirtree
19 rm -f `find . -path "*~" -or -name "\#*\#" -or -name core`
23 rm -f depend depend.new TAGS
28 include netgrind/Makefile
32 dirtree: $(addsuffix /.dir-stamp,$(addprefix obj/,$(DIRS)))
35 etags `find . -name "*.[ch]"`
37 # Black magic with dependencies. It would be more correct to make "depend.new"
38 # a prerequisite for "depend", but "depend.new" often has the same timestamp
39 # as "depend" which would confuse make a lot and either force remaking anyway
40 # or (as in current versions of GNU make) erroneously skipping the remaking.
45 if [ -s depend.new ] ; then build/mergedeps depend depend.new ; >depend.new ; fi
52 mkdir -p $(@D) && touch $@
58 DEPENDENCIES_OUTPUT="depend.new $@" $(CC) $(CFLAGS) -c -o $@ $<
61 DEPENDENCIES_OUTPUT="depend.new $@" $(CC) $(CFLAGS) -DTEST -c -o $@ $<
64 $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
67 $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
77 # Don't delete intermediate targets. There shouldn't be any, but due to bugs
78 # in GNU Make rules with targets in not-yet-existing directories are ignored
79 # when searching for implicit rules and thence targets considered intermediate.