fart/shapes/Makefile
Josh Holtrop 72a5023539 updated Makefiles to not print the "*.dep: No such file or directory" warnings
git-svn-id: svn://anubis/fart/trunk@204 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-03-10 01:54:23 +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