makefiles and versioning update complete

This commit is contained in:
Dhanya Maliakal
2017-06-29 17:10:10 +02:00
parent 1a74ceca3e
commit b05e9c194a
14 changed files with 135 additions and 95 deletions

View File

@ -1,96 +1,98 @@
include ../../Makefile.include
CFLAGS= -DC_ONLY
#FLAGS=-DVERBOSE
#ASM=$(shell echo "/lib/modules/`uname -r`/build/include")
#INCLUDES= -I../slsDetectorSoftware/commonFiles -I../slsDetectorSoftware/slsDetector -I ../slsDetectorSoftware/MySocketTCP -I../slsDetectorSoftware/usersFunctions -I../slsDetectorSoftware/multiSlsDetector -I../slsDetectorSoftware/slsDetectorAnalysis -I../slsDetectorSoftware/slsReceiverInterface -I$(ASM)
#LDFLAG=
INCLUDES?= -I../commonFiles -I../slsDetector -I ../MySocketTCP -I../usersFunctions -I../multiSlsDetector -I../slsDetectorAnalysis -I../slsReceiverInterface -I$(shell echo "/lib/modules/`uname -r`/build/include")
LIBDIR?=../
LIBS?= -L$(LIBDIR) -lSlsDetector
LDFLAG= -L/usr/lib64/ -pthread
DESTDIR ?= bin
DOCDIR ?= $(PWD)/docs
DESTDIR ?= ../../bin
BIN=$(DESTDIR)
LIBS?= -L$(DESTDIR) -lSlsDetector
LIBRARYDIR?=../
LDFLAG= -L/usr/lib64/ -pthread
DOCDIR ?= $(PWD)/docs
SRC_CLNT=sls_detector_client.cpp
clients: $(DESTDIR)/sls_detector_put $(DESTDIR)/sls_detector_get $(DESTDIR)/sls_detector_acquire $(DESTDIR)/sls_detector_help
echo $(LIBS)
static_clients: $(DESTDIR)/ssls_detector_put $(DESTDIR)/ssls_detector_get $(DESTDIR)/ssls_detector_acquire $(DESTDIR)/ssls_detector_help
$(info )
$(info #######################################)
$(info # In slsDetectorclient Makefile #)
$(info #######################################)
$(info )
all: clients
echo $(LIBS)
nonstatic: clients
clients: builddir lib $(DESTDIR)/sls_detector_put $(DESTDIR)/sls_detector_get $(DESTDIR)/sls_detector_acquire $(DESTDIR)/sls_detector_help
static_clients: builddir lib $(DESTDIR)/ssls_detector_put $(DESTDIR)/ssls_detector_get $(DESTDIR)/ssls_detector_acquire $(DESTDIR)/ssls_detector_help
lib:
cd ../ && $(MAKE) DESTDIR=$(LIBDIR)
$(DESTDIR)/ssls_detector_put: $(SRC_CLNT) lib
echo $(LIBS)
echo $(LDFLAG)
builddir:
# echo $(LIBS)
# echo $(LDFLAG)
mkdir -p $(BIN)
lib:
# echo $(LIBDIR)
cd $(LIBRARYDIR) && $(MAKE) DESTDIR=$(DESTDIR) TABSPACE='$(TABSPACE)'
@echo ""
@echo "#######################################"
@echo "# Back in slsDetectorClient Makefile #"
@echo "#######################################"
@echo ""
$(DESTDIR)/ssls_detector_put: $(SRC_CLNT) $(DESTDIR)/libSlsDetector.so $(DESTDIR)/libSlsDetector.a
$(call colorecho,"#######################################")
$(call colorecho,"# Compiling ssls_detector_put #")
$(call colorecho,"#######################################")
$(CXX) -static -o $(BIN)/ssls_detector_put $(SRC_CLNT) $(FLAGS) $(INCLUDES) -DPUT $(LIBS) $(LDFLAG)
$(DESTDIR)/ssls_detector_get: $(SRC_CLNT) lib
echo $(LIBS)
echo $(LDFLAG)
mkdir -p $(BIN)
$(DESTDIR)/ssls_detector_get: $(SRC_CLNT) $(DESTDIR)/libSlsDetector.so $(DESTDIR)/libSlsDetector.a
$(call colorecho,"#######################################")
$(call colorecho,"# Compiling ssls_detector_get #")
$(call colorecho,"#######################################")
$(CXX) -static -o $(BIN)/ssls_detector_get $(SRC_CLNT) $(FLAGS) $(INCLUDES) -DGET $(LIBS) $(LDFLAG)
$(DESTDIR)/ssls_detector_acquire: $(SRC_CLNT) lib
echo $(LIBS)
echo $(LDFLAG)
mkdir -p $(BIN)
$(DESTDIR)/ssls_detector_acquire: $(SRC_CLNT) $(DESTDIR)/libSlsDetector.so $(DESTDIR)/libSlsDetector.a
$(call colorecho,"#######################################")
$(call colorecho,"# Compiling ssls_detector_acquire #")
$(call colorecho,"#######################################")
$(CXX) -static -o $(BIN)/ssls_detector_acquire $(SRC_CLNT) $(FLAGS) $(INCLUDES) -DREADOUT $(LIBS) $(LDFLAG)
$(DESTDIR)/ssls_detector_help: $(SRC_CLNT) lib
echo $(LIBS)
echo $(LDFLAG)
mkdir -p $(BIN)
$(DESTDIR)/ssls_detector_help: $(SRC_CLNT) $(DESTDIR)/libSlsDetector.so $(DESTDIR)/libSlsDetector.a
$(call colorecho,"#######################################")
$(call colorecho,"# Compiling ssls_detector_help #")
$(call colorecho,"#######################################")
$(CXX) -static -o $(BIN)/ssls_detector_help $(SRC_CLNT) $(FLAGS) $(INCLUDES) -DHELP $(LIBS) $(LDFLAG)
$(DESTDIR)/sls_detector_put: $(SRC_CLNT) lib
echo $(LIBS)
echo $(LDFLAG)
mkdir -p $(BIN)
$(DESTDIR)/sls_detector_put: $(SRC_CLNT) $(DESTDIR)/libSlsDetector.so $(DESTDIR)/libSlsDetector.a
$(call colorecho,"#######################################")
$(call colorecho,"# Compiling sls_detector_put #")
$(call colorecho,"#######################################")
$(CXX) -o $(BIN)/sls_detector_put $(SRC_CLNT) $(FLAGS) $(INCLUDES) -DPUT $(LIBS) $(LDFLAG)
$(shell test -d $(DESTDIR) || mkdir -p $(DESTDIR))
$(DESTDIR)/sls_detector_get: $(SRC_CLNT) lib
echo $(LIBS)
echo $(LDFLAG)
mkdir -p $(BIN)
$(DESTDIR)/sls_detector_get: $(SRC_CLNT) $(DESTDIR)/libSlsDetector.so $(DESTDIR)/libSlsDetector.a
$(call colorecho,"#######################################")
$(call colorecho,"# Compiling sls_detector_get #")
$(call colorecho,"#######################################")
$(CXX) -o $(BIN)/sls_detector_get $(SRC_CLNT) $(FLAGS) $(INCLUDES) -DGET $(LIBS) $(LDFLAG)
$(shell test -d $(DESTDIR) || mkdir -p $(DESTDIR))
$(DESTDIR)/sls_detector_acquire: $(SRC_CLNT) lib
echo $(LIBS)
echo $(LDFLAG)
mkdir -p $(BIN)
$(DESTDIR)/sls_detector_acquire: $(SRC_CLNT) $(DESTDIR)/libSlsDetector.so $(DESTDIR)/libSlsDetector.a
$(call colorecho,"#######################################")
$(call colorecho,"# Compiling sls_detector_acquire #")
$(call colorecho,"#######################################")
$(CXX) -o $(BIN)/sls_detector_acquire $(SRC_CLNT) $(FLAGS) $(INCLUDES) -DREADOUT $(LIBS) $(LDFLAG)
$(shell test -d $(DESTDIR) || mkdir -p $(DESTDIR))
$(DESTDIR)/sls_detector_help: $(SRC_CLNT) lib
echo $(LIBS)
echo $(LDFLAG)
mkdir -p $(BIN)
$(DESTDIR)/sls_detector_help: $(SRC_CLNT) $(DESTDIR)/libSlsDetector.so $(DESTDIR)/libSlsDetector.a
$(call colorecho,"#######################################")
$(call colorecho,"# Compiling sls_detector_help #")
$(call colorecho,"#######################################")
$(CXX) -o $(BIN)/sls_detector_help $(SRC_CLNT) $(FLAGS) $(INCLUDES) -DHELP $(LIBS) $(LDFLAG)
$(shell test -d $(DESTDIR) || mkdir -p $(DESTDIR))
@ -107,6 +109,3 @@ clean:
install: clients