David Reiss | 9f3296b | 2010-08-31 16:58:41 +0000 | [diff] [blame] | 1 | THRIFT = thrift |
David Reiss | 9f3296b | 2010-08-31 16:58:41 +0000 | [diff] [blame] | 2 | |
| 3 | CXXFLAGS += -g3 -O0 |
| 4 | |
| 5 | GENNAMES = Storage storage_types |
| 6 | GENHEADERS = $(addsuffix .h, $(GENNAMES)) |
| 7 | GENSRCS = $(addsuffix .cpp, $(GENNAMES)) |
| 8 | GENOBJS = $(addsuffix .o, $(GENNAMES)) |
| 9 | |
| 10 | PYLIBS = storage/__init__.py |
| 11 | |
| 12 | PROGS = test-client test-server test-sender test-receiver |
| 13 | |
| 14 | all: $(PYLIBS) $(PROGS) |
| 15 | |
| 16 | test-client: test-client.o TZmqClient.o $(GENOBJS) |
Jens Geyer | 3e9c3a2 | 2014-12-22 22:21:24 +0100 | [diff] [blame^] | 17 | $(CXX) $^ -o $@ -lzmq -lthrift |
David Reiss | 9f3296b | 2010-08-31 16:58:41 +0000 | [diff] [blame] | 18 | test-server: test-server.o TZmqServer.o $(GENOBJS) |
Jens Geyer | 3e9c3a2 | 2014-12-22 22:21:24 +0100 | [diff] [blame^] | 19 | $(CXX) $^ -o $@ -lzmq -lthrift |
David Reiss | 9f3296b | 2010-08-31 16:58:41 +0000 | [diff] [blame] | 20 | test-sender: test-sender.o TZmqClient.o $(GENOBJS) |
Jens Geyer | 3e9c3a2 | 2014-12-22 22:21:24 +0100 | [diff] [blame^] | 21 | $(CXX) $^ -o $@ -lzmq -lthrift |
David Reiss | 9f3296b | 2010-08-31 16:58:41 +0000 | [diff] [blame] | 22 | test-receiver: test-receiver.o TZmqServer.o $(GENOBJS) |
Jens Geyer | 3e9c3a2 | 2014-12-22 22:21:24 +0100 | [diff] [blame^] | 23 | $(CXX) $^ -o $@ -lzmq -lthrift |
David Reiss | 9f3296b | 2010-08-31 16:58:41 +0000 | [diff] [blame] | 24 | |
| 25 | test-client.o test-server.o test-sender.o test-receiver.o: $(GENSRCS) |
| 26 | |
| 27 | storage/__init__.py: storage.thrift |
| 28 | $(RM) $(dir $@) |
| 29 | $(THRIFT) --gen py:newstyle $< |
| 30 | mv gen-py/$(dir $@) . |
| 31 | |
| 32 | $(GENSRCS): storage.thrift |
| 33 | $(THRIFT) --gen cpp $< |
| 34 | mv $(addprefix gen-cpp/, $(GENSRCS) $(GENHEADERS)) . |
| 35 | |
| 36 | clean: |
| 37 | $(RM) -r *.o $(PROGS) storage $(GENSRCS) $(GENHEADERS) |
| 38 | |
| 39 | .PHONY: clean |