]> git.sesse.net Git - cubemap/blobdiff - Makefile
Parse the HTTP header (more) properly, and send the headers on to any connecting...
[cubemap] / Makefile
index 78ec5a6e26edb10dd26191c9ccc46f6ff5447095..6cd07cf9b02fb6b9e3c1f8e0e0a4ec011ebef26d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,19 @@
 CC=gcc
 CXX=g++
+PROTOC=protoc
 CXXFLAGS=-Wall -O2 -g
-LDLIBS=-lcurl -lpthread
+LDLIBS=-lpthread -lprotobuf
 
-OBJS=cubemap.o server.o mutexlock.o input.o
+OBJS=cubemap.o server.o serverpool.o mutexlock.o input.o parse.o state.pb.o
 
 all: cubemap
 
-%.o: %.cpp
+%.pb.cc %.pb.h : %.proto
+       $(PROTOC) --cpp_out=. $<
+
+%.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)
@@ -16,5 +22,7 @@ DEPS=$(OBJS:.o=.d)
 -include $(DEPS)
 
 clean:
-       $(RM) cubemap $(OBJS) $(DEPS)
+       $(RM) cubemap $(OBJS) $(DEPS) state.pb.h state.pb.cc
 
+.PHONY: clean
+.SUFFIXES: