Makefile 1.12 KB
Newer Older
Michael Ott's avatar
Michael Ott committed
1
include ../config.mk
2

3
CXXFLAGS =	-O2 -g --std=c++11 -Wall -Wno-unused-local-typedefs -Wno-deprecated-declarations -Wno-unknown-warning-option -fmessage-length=0 -I$(DCDBDEPLOYPATH)/include/ -I../include/ -I../lib/include -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG -I$(DCDBDEPSPATH)/cpp-netlib-0.12.0-final/deps/asio/asio/include -I$(DCDBDEPSPATH)/cpp-netlib-0.12.0-final -I$(DCDBDEPSPATH)/cpp-netlib-0.12.0-final/deps/cxxopts/src -DASIO_HEADER_ONLY -DBOOST_TEST_DYN_LINK
4

5
OBJS =		collectagent.o \
6
		sensorcache.o \
7
8
9
		simplemqttserver.o \
		simplemqttserverthread.o \
		simplemqttservermessage.o
10
LIBS =		-L$(DCDBDEPLOYPATH)/lib/ -L../lib -ldcdb -pthread -lcassandra -luv -lboost_system -lboost_random -lboost_thread -lboost_date_time -lboost_regex -lcppnetlib-server-parsers -lcppnetlib-uri
11
TARGET =	collectagent
12

13
.PHONY : clean install
14

15
P =		$(shell cd $(DCDBDEPLOYPATH)/lib/ && pwd)
16
U =		$(shell uname)
17

18
$(TARGET): $(OBJS)
19
	@LD_LIBRARY_PATH=$(DCDBDEPLOYPATH)/lib:$$LD_LIBRARY_PATH \
20
	$(CXX) $(CXXFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
21
22
23

all:	$(TARGET)

24
25
26
clean:
	rm -f $(TARGET)
	rm -f $(OBJS)
27

28
install: $(TARGET)
29
	install $(TARGET) $(DCDBDEPLOYPATH)/bin/