CC = g++ # Debugging? DEBUG = -g -fno-exceptions -fno-rtti PIPE = -pipe # Warnings WARN = -Wall -W # Source files SRC := $(wildcard *.cc) # Exe file EXE = LeakTrace.a # Common flags O_FLAGS = $(PIPE) $(PROF) $(STATIC) $(SPECIAL) C_FLAGS = $(WARN) $(DEBUG) $(OPT) $(OTHER) $(INCLUDE) # Object files OBJ_DIR = . OBJ := $(patsubst %.cc,$(OBJ_DIR)/%.o,$(SRC)) .PHONY: all clean tidy checkin diff distrib install depend all: $(OBJ) README.html clean: tidy rm -f $(EXE) $(OBJ) $(MAKE) .depend: gcc -MM -Ih $(SRC) > .depend perl -i -p -e 's/([^.]+)\.o/o\/\1.o/g' .depend tidy: rm -f *~ *orig *bak *rej tags: $(SRC) $(INCL) ctags $(SRC) $(INCL) dist: clean (cd .. && tar cvfz /root/drylock/LeakTracer/LeakTracer.tar.gz --exclude LeakTracer/CVS LeakTracer/) $(OBJ_DIR)/%.o: %.cc $(CC) -c $(O_FLAGS) $(C_FLAGS) $< -o $@ README.html: README /root/ed/mcl/util/htmlize.pl README # These files are under RCS control RCS= $(SRC) $(INCL) README Changes Makefile TODO checkin: ci -mlazy -l $(RCS) diff: rcsdiff -u -p $(RCS) > diff.new