# HG changeset patch # User kazz # Date 1277176094 -32400 # Node ID 8323230d766b31a9e6edde37d3b2df48c1e31573 # Parent c26aa4e522587545475d08aee2a1dd177c88468c edit Renderer/Test/Makefile for ProtocolBuffers (please install ProtocolBuffers) diff -r c26aa4e52258 -r 8323230d766b Renderer/Test/Makefile.macosx --- a/Renderer/Test/Makefile.macosx Tue Jun 22 10:44:58 2010 +0900 +++ b/Renderer/Test/Makefile.macosx Tue Jun 22 12:08:14 2010 +0900 @@ -1,15 +1,24 @@ include ./Makefile.def +PROTO = protoc +PROTODIR = ./protobuf +PROTOFLAGS = -I=$(PROTODIR) --cpp_out=./ +PROTOLIBS = -lprotobuf + + LIBS += -lCerium -lFifoManager CFLAGS += `sdl-config --cflags` `xml2-config --cflags` $(INCLUDE) LIBS += `sdl-config --libs` `xml2-config --libs` -lSDL_image -Wl,-framework,OpenGL -.SUFFIXES: .cc .o .xml .xml.h .xml.cc +.SUFFIXES: .proto .pb.o .pb.cc .cc .o .xml .xml.h .xml.cc .cc.o: $(CC) $(CFLAGS) -c $< -o $@ +%.pb.cc: $(PROTODIR)/%.proto + $(PROTO) $(PROTOFLAGS) $< + ALL = ball_bound boss1_action direction gaplant ieshoot node panel universe untitled vacuum property_test send_linda dynamic writer chain_old SgRootChange viewer aquarium oFLAGS=-g -O2 @@ -84,9 +93,9 @@ viewer : $(VIEWER_OBJ) $(CC) -o $@ $? $(LIBS) -AQUARIUM_OBJ = aquarium.o -aquarium : $(AQUARIUM_OBJ) - $(CC) -o $@ $? $(LIBS) +AQUARIUM_OBJ = aquarium.pb.o aquarium.o +aquarium : $(AQUARIUM_OBJ) + $(CC) -o $@ $? $(LIBS) $(PROTOLIBS) run: $(TARGET) @@ -103,5 +112,6 @@ rm -f $(TARGET) $(OBJS) $(TASK_OBJS) *.o rm -f *~ \#* $(ALL) rm -f $(BALL_BOUND_XML).cc $(BALL_BOUND_XML).h $(BALL_BOUND_OBJ) - + rm -f *.pb.{cc,h} + -include depend.inc