added distrib infrastructure

git-svn-id: svn://anubis/fart/trunk@220 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
Josh Holtrop committed 2009-04-05 13:11:44 +00:00
1 parent 08429c5e58
commit 0e818d1a92
4 files changed
+66 -1

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
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