config.mk 1 KB
Newer Older
1
DCDBBASEPATH ?= $(realpath $(dir $(lastword $(MAKEFILE_LIST)))/..)
Michael Ott's avatar
Michael Ott committed
2
3
DCDBDEPSPATH ?= $(DCDBBASEPATH)/deps
DCDBDEPLOYPATH ?= $(DCDBBASEPATH)/install
4

5
6
7
# dcdbpusher plugins to be built
PLUGINS = procfs pdu sysfs ipmi bacnet snmp gpfsmon msr tester

Michael Ott's avatar
Michael Ott committed
8
DEFAULT_VERSION = 0.3
9
10
GIT_VERSION = $(shell git describe --tags 2>/dev/null|sed 's/-\([0-9]*\)/.\1/')
VERSION := $(if $(GIT_VERSION),$(GIT_VERSION),$(DEFAULT_VERSION))
Michael Ott's avatar
Michael Ott committed
11

12
13
14
15
16
CXXFLAGS = -std=c++11 -O2 -g -Wall -fmessage-length=0 \
           -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG \
           -DBOOST_LOG_DYN_LINK -DVERSION=\"$(VERSION)\" \
           -Wno-unused-function \
           -Wno-unused-variable
17
18
FULL_CC = $(shell which $(CC))
FULL_CXX = $(shell which $(CXX))
19

Michael Ott's avatar
Michael Ott committed
20
OS = $(shell uname -s)
21
22
MAKETHREADS ?= $(if $(findstring $(shell uname),Darwin),$(shell sysctl machdep.cpu.thread_count | cut -b 27-),\
               $(if $(findstring $(shell uname),Linux),$(shell cat /proc/cpuinfo | grep processor | wc -l),4))
Alessio Netti's avatar
Alessio Netti committed
23
24
25
26
               
ifneq ($(OS),Darwin)
	PLUGINS += perfevent
endif
27