From 7990dd6f774f83e3d1f20b2d850bc6ea4e677b7e Mon Sep 17 00:00:00 2001 From: Dhanya Maliakal Date: Wed, 28 Jun 2017 18:13:47 +0200 Subject: [PATCH] fixed makefile and included correct versioning while compiling --- slsDetectorSoftware/Makefile | 17 ++++++++--------- slsDetectorSoftware/gitInfo.txt | 8 ++++---- slsDetectorSoftware/slsDetector/gitInfoLib.h | 8 ++++---- slsDetectorSoftware/updateGitVersion.sh | 6 +++--- 4 files changed, 19 insertions(+), 20 deletions(-) diff --git a/slsDetectorSoftware/Makefile b/slsDetectorSoftware/Makefile index 8552028fe..8483142c0 100644 --- a/slsDetectorSoftware/Makefile +++ b/slsDetectorSoftware/Makefile @@ -14,13 +14,13 @@ INCLUDES?= -IcommonFiles -IslsDetector -I../slsReceiverSoftware/MySocketTCP -Ius #EPICSFLAGS=-D EPICS -I/usr/local/epics/base/include/ -I /usr/local/epics/base/include/os/Linux/ -L /usr/local/epics/base/lib/$(EPICS_HOST_ARCH) -Wl,-R/usr/local/epics/base/lib/$(EPICS_HOST_ARCH) -lca -lCom - -SRC_CLNT=slsDetectorAnalysis/fileIO.cpp usersFunctions/usersFunctions.cpp slsDetector/slsDetectorUtils.cpp slsDetector/slsDetectorCommand.cpp slsDetectorAnalysis/angularConversion.cpp slsDetectorAnalysis/angularConversionStatic.cpp slsDetectorAnalysis/energyConversion.cpp slsDetector/slsDetectorActions.cpp slsDetectorAnalysis/postProcessing.cpp slsDetector/slsDetector.cpp multiSlsDetector/multiSlsDetector.cpp slsDetectorAnalysis/postProcessingFuncs.cpp slsReceiverInterface/receiverInterface.cpp slsDetector/slsDetectorUsers.cpp threadFiles/CondVar.cpp threadFiles/Mutex.cpp threadFiles/ThreadPool.cpp #../slsReceiverSoftware/MySocketTCP/MySocketTCP.cpp - - LIBZMQDIR = ../slsReceiverSoftware/include LIBZMQ = -L$(LIBZMQDIR) -Wl,-rpath=$(LIBZMQDIR) -lzmq +SRC_CLNT=slsDetectorAnalysis/fileIO.cpp usersFunctions/usersFunctions.cpp slsDetector/slsDetectorUtils.cpp slsDetector/slsDetectorCommand.cpp slsDetectorAnalysis/angularConversion.cpp slsDetectorAnalysis/angularConversionStatic.cpp slsDetectorAnalysis/energyConversion.cpp slsDetector/slsDetectorActions.cpp slsDetectorAnalysis/postProcessing.cpp slsDetector/slsDetector.cpp multiSlsDetector/multiSlsDetector.cpp slsDetectorAnalysis/postProcessingFuncs.cpp slsReceiverInterface/receiverInterface.cpp slsDetector/slsDetectorUsers.cpp threadFiles/CondVar.cpp threadFiles/Mutex.cpp threadFiles/ThreadPool.cpp #../slsReceiverSoftware/MySocketTCP/MySocketTCP.cpp +DEPSINCLUDES = $(LIBZMQDIR)/sls_receiver_defs.h $(LIBZMQDIR)/sls_receiver_funcs.h $(LIBZMQDIR)/ansi.h commonFiles/sls_detector_defs.h commonFiles/sls_detector_funcs.h commonFiles/error_defs.h slsDetector/slsDetectorBase.h slsDetectorAnalysis/angCalLogClass.h slsDetectorAnalysis/angleConversionConstant.h slsDetectorAnalysis/badChannelCorrections.h slsDetectorAnalysis/detectorData.h slsDetectorAnalysis/enCalLogClass.h slsDetectorAnalysis/fileIOStatic.h slsDetectorAnalysis/movingStat.h slsDetectorAnalysis/runningStat.h slsDetectorAnalysis/single_photon_hit.h threadFiles/Global.h threadFiles/Task.h usersFunctions/angleFunction.h + + $(info ) $(info #######################################) $(info # Compiling slsDetectorSoftware #) @@ -30,11 +30,11 @@ $(info ) -OBJS = $(SRC_CLNT:.cpp=.o) +OBJS = $(SRC_CLNT:%.cpp=%.o) .PHONY: all intdoc doc htmldoc package clean -all: updateVersion package $(SRC_CLNT) +all: package $(SRC_CLNT) intdoc: $(SRC_H) $(SRC_CLNT) doxygen doxy.config @@ -68,7 +68,7 @@ gotthardVirtualServer: $(SRC_MYTHEN_SVC) -%.o : %.cpp %.h Makefile +%.o : %.cpp %.h $(DEPSINCLUDES) Makefile $(CXX) -o $@ -c $< $(INCLUDES) $(DFLAGS) -fPIC $(EPICSFLAGS) -pthread -lrt $(LIBZMQ) $(FLAGS) @@ -76,6 +76,7 @@ package: $(OBJS) $(DESTDIR)/libSlsDetector.so $(DESTDIR)/libSlsDetector.a $(DESTDIR)/libSlsDetector.so: $(OBJS) + ./updateGitVersion.sh $(CXX) -shared -Wl,-soname,libSlsDetector.so -o libSlsDetector.so $(OBJS) -lc $(INCLUDES) $(DFLAGS) $(FLAGS) $(EPICSFLAGS) -L/usr/lib64 -pthread -lrt $(LIBZMQ) $(shell test -d $(DESTDIR) || mkdir -p $(DESTDIR)) mv libSlsDetector.so $(DESTDIR) @@ -89,8 +90,6 @@ clean: cd -updateVersion: - ./updateGitVersion.sh #------------------------------------------------------------------------------- diff --git a/slsDetectorSoftware/gitInfo.txt b/slsDetectorSoftware/gitInfo.txt index 9ae2253c9..26b395558 100644 --- a/slsDetectorSoftware/gitInfo.txt +++ b/slsDetectorSoftware/gitInfo.txt @@ -1,9 +1,9 @@ Path: slsDetectorsPackage/slsDetectorSoftware URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git -Repsitory UUID: d0aea299e999e12df143e036c0cf9c644125d45d -Revision: 1423 +Repsitory UUID: 3e403d7a4da76b6edc9db16656580bcc7b5302e1 +Revision: 1428 Branch: developer Last Changed Author: Dhanya_Maliakal -Last Changed Rev: 1423 -Last Changed Date: 2017-06-27 10:22:55 +0200 +Last Changed Rev: 1433 +Last Changed Date: 2017-06-28 11:26:35 +0200 diff --git a/slsDetectorSoftware/slsDetector/gitInfoLib.h b/slsDetectorSoftware/slsDetector/gitInfoLib.h index f828f216b..a1ccfda16 100644 --- a/slsDetectorSoftware/slsDetector/gitInfoLib.h +++ b/slsDetectorSoftware/slsDetector/gitInfoLib.h @@ -1,11 +1,11 @@ //#define SVNPATH "" #define SVNURLLIB "git@git.psi.ch:sls_detectors_software/sls_detector_software.git" //#define SVNREPPATH "" -#define SVNREPUUIDLIB "d0aea299e999e12df143e036c0cf9c644125d45d" -//#define SVNREV 0x1423 +#define SVNREPUUIDLIB "3e403d7a4da76b6edc9db16656580bcc7b5302e1" +//#define SVNREV 0x1433 //#define SVNKIND "" //#define SVNSCHED "" #define SVNAUTHLIB "Dhanya_Maliakal" -#define SVNREVLIB 0x1423 -#define SVNDATELIB 0x20170627 +#define SVNREVLIB 0x1433 +#define SVNDATELIB 0x20170628 // diff --git a/slsDetectorSoftware/updateGitVersion.sh b/slsDetectorSoftware/updateGitVersion.sh index 9540286b2..021211764 100755 --- a/slsDetectorSoftware/updateGitVersion.sh +++ b/slsDetectorSoftware/updateGitVersion.sh @@ -1,7 +1,7 @@ MAINDIR=slsDetectorsPackage SPECDIR=slsDetectorSoftware -TMPFILE=gitInfoLibTmp.h -INCLFILE=gitInfoLib.h +TMPFILE=slsDetector/gitInfoLibTmp.h +INCLFILE=slsDetector/gitInfoLib.h WD=$PWD GITREPO1='git remote -v' @@ -28,7 +28,7 @@ REV=`eval $REV1 $REV2` FOLDERREV=`eval $FOLDERREV1 $FOLDERREV2` RDATE=`eval $RDATE1` echo Path: ${MAINDIR}/${SPECDIR} $'\n'URL: ${GITREPO} $'\n'Repository Root: ${GITREPO} $'\n'Repsitory UUID: ${REPUID} $'\n'Revision: ${FOLDERREV} $'\n'Branch: ${BRANCH} $'\n'Last Changed Author: ${AUTH1}_${AUTH2} $'\n'Last Changed Rev: ${REV} $'\n'Last Changed Date: ${RDATE} > gitInfo.txt -cd $WD +cd .. ./genVersionHeader.sh $SPECDIR/gitInfo.txt $SPECDIR/$TMPFILE $SPECDIR/$INCLFILE echo "Revision Updated" cd $WD