jtlc/main/Makefile
josh 01bd481bce initial import
git-svn-id: svn://anubis/jtlc/trunk@2 f5bc74b8-7b62-4e90-9214-7121d538519f
2009-03-28 15:17:48 +00:00

24 lines
416 B
Makefile

OBJS := $(patsubst %.cc,%.o,$(wildcard *.cc))
DEPS := $(OBJS:.o=.dep)
all: $(DEPS) $(OBJS)
%.o: %.cc
$(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) $<
# Make dependency files
%.dep: %.cc
@set -e; rm -f $@; \
$(CXX) -MM $(CPPFLAGS) $< > $@.$$$$; \
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$
clean:
-$(RM) -f *.o *.dep
# Include dependency files
ifndef CLEAN
-include $(DEPS)
endif