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

3
4
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$(DCDBBASEPATH)/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

5
OBJS =		collectagent.o \
6
		sensorcache.o \
7
8
9
		simplemqttserver.o \
		simplemqttserverthread.o \
		simplemqttservermessage.o
10
LIBS =		-L$(DCDBDEPLOYPATH)/lib/ -ldcdb -pthread -lcassandra -luv -lboost_system -lboost_random -lboost_thread -lboost_date_time -lboost_regex -lcppnetlib-server-parsers
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
	$(CXX) $(CXXFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
20
21
22

all:	$(TARGET)

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

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