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

Makefile 4 KB
Newer Older
1
include ../config.mk
2
#include ../common.mk
3

4 5
CXXFLAGS += -DBOOST_NETWORK_ENABLE_HTTPS -I../common/include -I$(DCDBDEPLOYPATH)/include -I$(DCDBDEPLOYPATH)/include/opencv4 -I$(DCDBDEPLOYPATH)/include/mariadb

6
LIBS = -L../lib -L$(DCDBDEPLOYPATH)/lib/ -ldl -lboost_system -lboost_thread -lboost_log_setup -lboost_log -lboost_regex -lpthread -rdynamic
7 8 9 10

ifeq ($(OS),Darwin)
	BACNET_PORT = bsd
	LIBEXT = dylib
11
	LIBFLAGS = -dynamiclib -install_name 
12 13 14 15 16 17
else
	BACNET_PORT = linux
	LIBEXT = so
	LIBFLAGS = -shared -Wl,-soname,
	PLUGINFLAGS = -fPIC
endif
18
OPERATOR_LIBS = $(foreach p,$(OPERATORS),libdcdboperator_$(p).$(LIBEXT))
19

20
all:   $(OPERATOR_LIBS)
21 22 23 24
debug: CXXFLAGS += -DDEBUG
debug: all

clean:
25
	rm -f $(OPERATOR_LIBS) $(shell find . -name "*.o")
Alessio Netti's avatar
Alessio Netti committed
26
	rm -f ../common/src/sensornavigator.o
27 28 29

$(OBJS)	: %.o : %.cpp

30
install_operator: $(OPERATOR_LIBS)
31 32
	install $^ $(DCDBDEPLOYPATH)/lib/

33
install_conf: $(foreach p,$(OPERATORS),config/$(p).conf)
34 35
	install -m 644 $^ $(DCDBDEPLOYPATH)/etc/

36
install: install_operator
37 38 39 40 41
	@echo "Done with installation."
	@echo "====================================="
	@echo "To copy the configuration files type:"
	@echo "				     > make install_conf"

42
operators/%.o: CXXFLAGS+= $(PLUGINFLAGS)
Alessio Netti's avatar
Alessio Netti committed
43
../common/src/sensornavigator.o: CXXFLAGS+= $(PLUGINFLAGS)
44

45
libdcdboperator_aggregator.$(LIBEXT): operators/aggregator/AggregatorOperator.o operators/aggregator/AggregatorConfigurator.o ../common/src/sensornavigator.o
46
	$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex
47
	
48 49 50
libdcdboperator_smoothing.$(LIBEXT): operators/smoothing/SmoothingOperator.o operators/smoothing/SmoothingConfigurator.o ../common/src/sensornavigator.o
	$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex
	
51
libdcdboperator_regressor.$(LIBEXT): operators/regressor/RegressorOperator.o operators/regressor/RegressorConfigurator.o ../common/src/sensornavigator.o
Alessio Netti's avatar
Alessio Netti committed
52 53
	$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex -lopencv_core -lopencv_ml
	
Alessio Netti's avatar
Alessio Netti committed
54 55 56
libdcdboperator_classifier.$(LIBEXT): operators/regressor/RegressorOperator.o operators/regressor/ClassifierOperator.o operators/regressor/ClassifierConfigurator.o ../common/src/sensornavigator.o
	$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex -lopencv_core -lopencv_ml
	
57 58 59
libdcdboperator_clustering.$(LIBEXT): operators/clustering/ClusteringOperator.o operators/clustering/ClusteringConfigurator.o ../common/src/sensornavigator.o
	$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex -lopencv_core -lopencv_ml
	
60
libdcdboperator_job_aggregator.$(LIBEXT): operators/aggregator/AggregatorOperator.o operators/aggregator/JobAggregatorOperator.o operators/aggregator/JobAggregatorConfigurator.o ../common/src/sensornavigator.o
61
	$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex
62
	
63
libdcdboperator_testeroperator.$(LIBEXT): operators/testeroperator/TesterOperator.o operators/testeroperator/TesterOperatorConfigurator.o ../common/src/sensornavigator.o
64
	$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex
65
	
66
libdcdboperator_filesink.$(LIBEXT): operators/filesink/FilesinkOperator.o operators/filesink/FilesinkConfigurator.o ../common/src/sensornavigator.o
67
	$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex
68

Carla Guillen's avatar
Carla Guillen committed
69
libdcdboperator_smucngperf.$(LIBEXT): operators/smucngperf/SMUCNGPerfOperator.o operators/smucngperf/SMUCNGPerfConfigurator.o operators/smucngperf/SKXPMUMetrics.o ../common/src/sensornavigator.o
70
	$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex
Carla Guillen's avatar
Carla Guillen committed
71

72
libdcdboperator_persystsql.$(LIBEXT): operators/persystsql/PerSystSqlOperator.o operators/persystsql/PerSystSqlConfigurator.o operators/persystsql/MariaDB.o ../common/src/sensornavigator.o
73
	$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -L$(DCDBDEPLOYPATH)/lib/mariadb/ -lboost_log -lboost_system -lboost_regex -lmariadb
Carla Guillen's avatar
Carla Guillen committed
74