source: ntrip/trunk/GnssCenter/thrift/test2/Makefile@ 5700

Last change on this file since 5700 was 4943, checked in by mervart, 12 years ago
File size: 712 bytes
RevLine 
[4942]1
2BOOST_DIR = /usr/include/boost
3THRIFT_DIR = /usr/local/include/thrift
4LIB_DIR = /usr/local/lib
5DEFS = -DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H
6
7INC = -I$(THRIFT_DIR) -I$(BOOST_DIR)
8
9GEN_SRC = ./gen-cpp/myService.cpp \
10 ./gen-cpp/myservice_types.cpp ./gen-cpp/myservice_constants.cpp
11
12GEN_OBJ = $(patsubst %.cpp,%.o, $(GEN_SRC))
13
14
15.PHONY: all clean
16
17all: gen-cpp server client
18
19gen-cpp: myservice.thrift
20 thrift -r -gen cpp myservice.thrift
21
22%.o: %.cpp
23 $(CXX) -Wall $(DEFS) $(INC) -c $< -o $@
24
25server: server.o $(GEN_OBJ)
[4943]26 $(CXX) $^ -o $@ -L$(LIB_DIR) -lthrift
[4942]27
28client: client.o $(GEN_OBJ)
[4943]29 $(CXX) $^ -o $@ -L$(LIB_DIR) -lthrift
[4942]30
31clean:
32 $(RM) *.o server client
33 $(RM) -R gen-cpp
Note: See TracBrowser for help on using the repository browser.