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

3
CXXFLAGS += -I../common/include/ \
4
            -I../lib/include \
5
            -I$(DCDBDEPLOYPATH)/include
6
7

OBJS =		../common/src/logging.o \
8
			../analytics/OperatorManager.o \
9
			../common/src/sensornavigator.o \
Alessio Netti's avatar
Alessio Netti committed
10
			../common/src/globalconfiguration.o \
11
			../common/src/RESTHttpsServer.o \
12
			analyticscontroller.o \
13
			CARestAPI.o \
Alessio Netti's avatar
Alessio Netti committed
14
			sensorcache.o \
15
16
17
18
19
			collectagent.o \
			configuration.o \
			simplemqttserver.o \
			simplemqttserverthread.o \
			simplemqttservermessage.o
20

21
22
23
24
25
26
27
28
29
30
31
32
LIBS =		-L../lib \
            -L$(DCDBDEPLOYPATH)/lib \
            -ldcdb \
            -ldl \
            -lpthread \
            -lcassandra \
            -luv \
            -lcrypto \
            -lssl \
            -lboost_system \
            -lboost_random \
            -lboost_thread \
33
            -lboost_filesystem \
34
35
36
            -lboost_date_time \
            -lboost_log_setup \
            -lboost_log \
37
38
            -lboost_regex \
            -rdynamic
39

40
TARGET =	collectagent
41

42
.PHONY : clean install
43

44
P =		$(shell cd $(DCDBDEPLOYPATH)/lib/ && pwd)
45
U =		$(shell uname)
46

47
$(TARGET): $(OBJS)
48
	@LD_LIBRARY_PATH=$(DCDBDEPLOYPATH)/lib:$$LD_LIBRARY_PATH \
49
	$(CXX) $(CXXFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
50
51
52

all:	$(TARGET)

53
54
55
clean:
	rm -f $(TARGET)
	rm -f $(OBJS)
56

57
58
59
install_conf: config/collectagent.conf
	install -m 644 $^ $(DCDBDEPLOYPATH)/etc/

60
install: $(TARGET)
61
	install $(TARGET) $(DCDBDEPLOYPATH)/bin/
62
63
64
65
66
	@echo "Done with installation."
	@echo "====================================="
	@echo "To copy the configuration files type:"
	@echo "				     > make install_conf"

67

Micha Mueller's avatar
Micha Mueller committed
68
../common/src/sensornavigator.o: CXXFLAGS+= -fPIC