X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=Makefile;h=218285eeefeb1493010c45e1d7bd86945753212b;hp=78ec5a6e26edb10dd26191c9ccc46f6ff5447095;hb=845934ca50eee40884e8cc85ea81eb310efa5ca3;hpb=cfe0df3728d8155fb03688f6db69e00971e23685 diff --git a/Makefile b/Makefile index 78ec5a6..218285e 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,19 @@ CC=gcc CXX=g++ -CXXFLAGS=-Wall -O2 -g -LDLIBS=-lcurl -lpthread +PROTOC=protoc +CXXFLAGS=-Wall -O2 -g -pthread +LDLIBS=-lprotobuf -pthread -OBJS=cubemap.o server.o mutexlock.o input.o +OBJS=main.o client.o server.o stream.o udpstream.o serverpool.o mutexlock.o input.o httpinput.o udpinput.o parse.o config.o markpool.o acceptor.o stats.o accesslog.o thread.o util.o log.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: