| CXXFLAGS = `pkg-config --cflags thrift thrift-nb` -levent |
| LDLIBS = `pkg-config --libs thrift thrift-nb` -levent |
| GENNAMES = Aggr aggr_types |
| GENHEADERS = $(addsuffix .h, $(GENNAMES)) |
| GENSRCS = $(addsuffix .cpp, $(GENNAMES)) |
| GENOBJS = $(addsuffix .o, $(GENNAMES)) |
| PYLIBS = aggr/__init__.py |
| test-server: test-server.o $(GENOBJS) |
| test-server.o: $(GENSRCS) |
| aggr/__init__.py: aggr.thrift |
| $(THRIFT) --gen py:newstyle $< |
| $(THRIFT) --gen cpp:cob_style $< |
| mv $(addprefix gen-cpp/, $(GENSRCS) $(GENHEADERS)) . |
| $(RM) -r *.o $(PROGS) $(GENSRCS) $(GENHEADERS) gen-* aggr |