DABC_OS = "Linux" ifndef DABCSYSCORE ifdef DABCSYS DABCSYSCORE = $(DABCSYS)/core endif endif ifndef DABCSYSCORE error "DABCSYS or DABCSYSCORE is not set correctly" DABCSYSCORE=. endif #### File suffixes: ### ObjSuf = o SrcSuf = cxx CSuf = c HedSuf = h ExeSuf = DllSuf = so DepSuf = d DllSuf2 = so OutPutOpt = -o ##### prefixes LIB_PREFIX = lib #### Linker definitions: ### LD = g++ LDFLAGS = -O SOFLAGS = -shared -Wl,-soname, #### File system symbolic link: ### LN = ln -sf RM = rm -f MV = mv #### Compilers: ## CXX = g++ CC = gcc #### Library version numbers: ### MAJOR = 0 MINOR = 0.01 VERSSUF = $(MAJOR).$(MINOR) ## This two copiler flags are alternative. ## When DOOPTIMIZATION = false, first is used otherwise second DEBUGMODE = -g OPTIMIZEMODE = -O2 # switch on optimization for all object files DOOPTIMIZATION = true DOINDEXCHECK = false #this is OFED components location OFED_DIR = /usr/local/ofed OFED_LIBDIR = $(OFED_DIR)/lib64 OFED_MCAST = false OFED_INCLUDES = $(OFED_DIR)/include OFED_LIBS = -libverbs ifeq ($(OFED_MCAST), true) OFED_INCLUDES += $(OFED_DIR)/include/infiniband OFED_LIBS += -lopensm -losmcomp -losmvendor -lrt endif # switch to enable OFED library support ifneq ($(wildcard $(OFED_LIBDIR))$(wildcard $(OFED_DIR)),) USEOFEDVERBS = true endif ifneq ($(ROOTSYS),) USEROOT = true ROOT_LIBS = $(shell root-config --libs) ROOT_INCLUDE = $(ROOTSYS)/include endif #this is MPRACE components location MPRACE_DIR = $(DABCSYS)/linuxdrivers/mprace MPRACE_LIBDIR = $(MPRACE_DIR)/lib MPRACE_INCLUDES = $(MPRACE_DIR)/include MPRACE_DEFINITIONS = MPRACE_LIBS = -lmprace #this is Mannheim pciDriver components location PCIDRIVER_DIR = $(DABCSYS)/linuxdrivers/pciDriver2 PCIDRIVER_LIBDIR = $(PCIDRIVER_DIR)/lib PCIDRIVER_INCLUDES = $(PCIDRIVER_DIR)/include PCIDRIVER_DEFINITIONS = PCIDRIVER_LIBS = -lpcidriver ifneq ($(wildcard $(MPRACE_LIBDIR)/libmprace.so),) USEMPRACE = true endif ifdef DABC_DEBUG DEBUGLEVEL=$(DABC_DEBUG) DOOPTIMIZATION = false endif ifdef DABC_OPT DEBUGLEVEL= DOOPTIMIZATION = true endif WARNINGS = -Wall OPTIONS = -fPIC ifeq ($(shell uname -m),x86_64) OPTIONS += -m64 endif DEFINITIONS = INCLUDES = -I$(DABCSYSCORE)/include ifdef DEBUGLEVEL DEFINITIONS += -DDEBUGLEVEL=$(DEBUGLEVEL) endif ifeq ($(DOINDEXCHECK), true) DEFINITIONS += -DDO_INDEX_CHECK endif #### Combine compilers flags in one variable: ### CXXFLAGS = $(WARNINGS) $(OPTIONS) $(DEFINITIONS) $(INCLUDES) CFLAGS = $(OPTIONS) $(DEFINITIONS) $(INCLUDES) ### dabc pathes: DABCDLLPATH = $(DABCSYSCORE)/lib DABCINCPATH = $(DABCSYSCORE)/include/dabc # build scripts MakeDepend = $(DABCSYSCORE)/build/depend.sh $(ObjSuf) MakeLib = $(DABCSYSCORE)/build/makelib.sh $(LD) "$(RM)" $(MV) "$(LN)" "$(LDFLAGS)" "$(SOFLAGS)" $(DllSuf) CleanLib = $(DABCSYSCORE)/build/cleanlib.sh "$(DABC_OS)" $(DllSuf) $(VERSSUF) #rules wich does not require any dependency checks FASTRULES = package setup clean clean-bak LIBS_CORESET = -lpthread \ -L$(DABCDLLPATH) \ -lDabcCore LIBS_FULLSET = $(LIBS_CORESET) \ -lDabcMbs \ -lDabcMgmnt ifdef USEOFEDVERBS LIBS_FULLSET += -lDabcVerbs endif ifdef USEMPRACE LIBS_FULLSET += -lDabcAbb endif