summaryrefslogtreecommitdiffstats
path: root/src/jaegertracing/thrift/contrib/async-test/Makefile
blob: 33e7f8ad1538e3af4ba368180cf58489ce65087c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
THRIFT = thrift
CXXFLAGS = `pkg-config --cflags thrift thrift-nb` -levent
LDLIBS = `pkg-config --libs thrift thrift-nb` -levent
CXXFLAGS += -g -O0

GENNAMES = Aggr aggr_types
GENHEADERS = $(addsuffix .h, $(GENNAMES))
GENSRCS = $(addsuffix .cpp, $(GENNAMES))
GENOBJS = $(addsuffix .o, $(GENNAMES))

PYLIBS = aggr/__init__.py

PROGS =  test-server

all: $(PYLIBS) $(PROGS)

test-server: test-server.o $(GENOBJS)

test-server.o: $(GENSRCS)

aggr/__init__.py: aggr.thrift
	$(RM) $(dir $@)
	$(THRIFT) --gen py:newstyle $<
	mv gen-py/$(dir $@) .

$(GENSRCS): aggr.thrift
	$(THRIFT) --gen cpp:cob_style $<
	mv $(addprefix gen-cpp/, $(GENSRCS) $(GENHEADERS)) .

clean:
	$(RM) -r *.o $(PROGS) $(GENSRCS) $(GENHEADERS) gen-* aggr

.PHONY: clean