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

4
CXXFLAGS += -DBOOST_NETWORK_ENABLE_HTTPS -I../common/include -I$(DCDBDEPLOYPATH)/include
5
LIBS = -L../lib -L$(DCDBDEPLOYPATH)/lib/ -ldl -lboost_system -lboost_thread -lboost_log_setup -lboost_log -lboost_regex -lpthread -rdynamic
6

Alessio Netti's avatar
Alessio Netti committed
7
ANALYZERS = aggregator
8 9 10 11

ifeq ($(OS),Darwin)
	BACNET_PORT = bsd
	LIBEXT = dylib
12
	LIBFLAGS = -dynamiclib -install_name 
13 14 15 16 17 18 19 20 21 22 23 24 25 26
else
	BACNET_PORT = linux
	LIBEXT = so
	LIBFLAGS = -shared -Wl,-soname,
	PLUGINFLAGS = -fPIC
endif
ANALYZER_LIBS = $(foreach p,$(ANALYZERS),libdcdbanalyzer_$(p).$(LIBEXT))

all:   $(ANALYZER_LIBS)
debug: CXXFLAGS += -DDEBUG
debug: all

clean:
	rm -f $(ANALYZER_LIBS) $(shell find . -name "*.o")
Alessio Netti's avatar
Alessio Netti committed
27
	rm -f ../common/src/sensornavigator.o
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43

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

install_analyzer: $(ANALYZER_LIBS)
	install $^ $(DCDBDEPLOYPATH)/lib/

install_conf: $(foreach p,global $(ANALYZERS),config/$(p).conf)
	install -m 644 $^ $(DCDBDEPLOYPATH)/etc/

install: install_analyzer
	@echo "Done with installation."
	@echo "====================================="
	@echo "To copy the configuration files type:"
	@echo "				     > make install_conf"

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

Alessio Netti's avatar
Alessio Netti committed
46
libdcdbanalyzer_aggregator.$(LIBEXT): analyzers/aggregator/AggregatorAnalyzer.o analyzers/aggregator/AggregatorConfigurator.o ../common/src/sensornavigator.o
47
	$(CXX) $(LIBFLAGS)$@ -o $@ $^ -L$(DCDBDEPLOYPATH)/lib/ -lboost_log -lboost_system -lboost_regex