2.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

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

3
4
5
6
7
8
9
10
11
12
CXXFLAGS =	-O2 -g --std=c++11 -Wall -Wno-unused-function -Wno-unused-local-typedefs -Wno-deprecated-declarations -Wno-unknown-warning-option -fmessage-length=0 -I../common/include/ -I../lib/include -I$(DCDBDEPLOYPATH)/include -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG -DBOOST_LOG_DYN_LINK -I$(DCDBDEPSPATH)/cpp-netlib-0.12.0-final/deps/asio/asio/include -DVERSION=\"$(VERSION)\"

OBJS =		../common/src/logging.o \
			sensorcache.o \
			collectagent.o \
			configuration.o \
			simplemqttserver.o \
			simplemqttserverthread.o \
			simplemqttservermessage.o
LIBS =		-L$(DCDBDEPLOYPATH)/lib/ -L../lib -ldcdb -pthread -lcassandra -luv -lboost_system -lboost_random -lboost_thread -lboost_date_time -lboost_log_setup -lboost_log -lboost_regex -lcppnetlib-server-parsers -lcppnetlib-uri
13
TARGET =	collectagent
14

15
.PHONY : clean install
16

17
P =		$(shell cd $(DCDBDEPLOYPATH)/lib/ && pwd)
18
U =		$(shell uname)
19

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

all:	$(TARGET)

26
27
28
clean:
	rm -f $(TARGET)
	rm -f $(OBJS)
29

30
31
32
33
install_conf: config/collectagent.conf
	install -m 644 $^ $(DCDBDEPLOYPATH)/etc/

install: $(TARGET) install_conf
34
	install $(TARGET) $(DCDBDEPLOYPATH)/bin/