]> git.sesse.net Git - cubemap/commitdiff
Makefile tweaks to deal with the protobuf dependency.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 6 Apr 2013 22:14:30 +0000 (00:14 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 6 Apr 2013 22:14:30 +0000 (00:14 +0200)
Makefile

index 704ee7304ec7b9ffab9a2dfdcb5eced7c1e3e53a..257966aa47954a446bc2315fd27e89fce18d4e35 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,9 @@ all: cubemap
 %.pb.cc %.pb.h : %.proto
        $(PROTOC) --cpp_out=. $<
 
 %.pb.cc %.pb.h : %.proto
        $(PROTOC) --cpp_out=. $<
 
-%.o: %.cpp
+%.o: %.cpp state.pb.h
+       $(CXX) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $<
+%.pb.o: %.pb.cc
        $(CXX) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $<
 cubemap: $(OBJS)
        $(CXX) -o cubemap $(OBJS) $(LDLIBS)
        $(CXX) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) -o $@ -c $<
 cubemap: $(OBJS)
        $(CXX) -o cubemap $(OBJS) $(LDLIBS)
@@ -20,5 +22,7 @@ DEPS=$(OBJS:.o=.d)
 -include $(DEPS)
 
 clean:
 -include $(DEPS)
 
 clean:
-       $(RM) cubemap $(OBJS) $(DEPS)
+       $(RM) cubemap $(OBJS) $(DEPS) state.pb.h state.pb.cc
 
 
+.PHONY: clean
+.SUFFIXES: