CMakeLists.txt: reordering and removing those we dont use anymore, removed all the Makefiles (except the ones for the detector servers)

This commit is contained in:
maliakal_d 2019-02-14 16:15:43 +01:00
parent aaae6d854c
commit 9aaca14b01
8 changed files with 10 additions and 727 deletions

View File

@ -20,7 +20,6 @@ set(TARGETS_EXPORT_NAME "${PROJECT_NAME_LOWER}-targets")
#set(namespace "${PROJECT_NAME}::")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
set (CALIBRATE OFF)
# Check if project is being used directly or via add_subdirectory
@ -60,23 +59,10 @@ set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-point
find_package(Qt4)
find_package(Qwt 6)
find_package(CBF)
find_package(Doxygen)
if (SLS_USE_TESTS)
enable_testing()
endif(SLS_USE_TESTS)
# Support library containing functionallity common to
# detector and receiver
add_subdirectory(slsSupportLib)
if (SLS_USE_HDF5)
find_package(HDF5 1.10 COMPONENTS CXX)
endif (SLS_USE_HDF5)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_INSTALL_RPATH "$ORIGIN")
@ -94,29 +80,30 @@ if (SLS_USE_TEXTCLIENT)
endif (SLS_USE_TEXTCLIENT)
if (SLS_USE_RECEIVER)
if (SLS_USE_HDF5)
find_package(HDF5 1.10 COMPONENTS CXX REQUIRED)
endif (SLS_USE_HDF5)
add_subdirectory(slsReceiverSoftware)
add_subdirectory(manual/manual-api)
endif (SLS_USE_RECEIVER)
if (SLS_USE_GUI)
find_package(Qt4 REQUIRED)
find_package(Qwt 6 REQUIRED)
if (QT4_FOUND AND QWT_FOUND)
add_subdirectory(slsDetectorGui)
endif()
endif (SLS_USE_GUI)
if (SLS_USE_TESTS)
enable_testing()
endif(SLS_USE_TESTS)
if (SLS_USE_INTEGRATION_TESTS)
add_subdirectory(integrationTests)
endif (SLS_USE_INTEGRATION_TESTS)
if (CALIBRATE)
if (DEFINED ENV{ROOTSYS})
find_package(ROOT)
if (ROOT_FOUND)
add_subdirectory(calibrationWizards)
endif()
endif()
endif(CALIBRATE)
find_package(Doxygen)
install(FILES ${ZMQ_STATIC_ARCHIVE}
DESTINATION lib)

235
Makefile
View File

@ -1,235 +0,0 @@
# do not change below this line#
# Include common definitions
include Makefile.include
INSTALLROOT ?= $(PWD)
BINDIR ?= $(INSTALLROOT)/bin
DOCDIR ?= $(INSTALLROOT)/manual/docs
LIBDIR ?= $(INSTALLROOT)/bin
INCDIR ?= $(INSTALLROOT)/include
DETAILDOC ?= $(INSTALLROOT)/docs
WD = $(shell pwd)
LIBRARYDIR = $(WD)/slsDetectorSoftware
LIBRARYRXRDIR = $(WD)/slsReceiverSoftware
CLIENTDIR = $(LIBRARYDIR)/slsDetectorClient
GUIDIR = $(WD)/slsDetectorGui
RECEIVERDIR = $(LIBRARYRXRDIR)
CALWIZDIR = $(WD)/calibrationWizards
MANDIR = $(WD)/manual
CALIBDIR = $(WD)/slsDetectorCalibration
MANAPIDIR = $(MANDIR)/manual-api
TABSPACE := "\t"
INCLUDES=-I. -I$(WD)/slsSupportLib/include -I$(LIBRARYDIR)/slsDetector -I$(LIBRARYDIR)/usersFunctions -I$(LIBRARYDIR)/multiSlsDetector -I$(LIBRARYDIR)/slsReceiverInterface -I$(LIBRARYRXRDIR)/include -I$(LIBRARYDIR)/threadFiles -I$(LIBRARYDIR)/sharedMemory -I$(ASM)
INCLUDESRXR += -I. -I$(LIBRARYRXRDIR)/include -I$(WD)/slsSupportLib/include -I$(CALIBDIR) -I$(ASM)
#LIBFLAGRXR +=
$(info )
$(info #######################################)
$(info # In slsDetectorsPackage Makefile #)
$(info #######################################)
$(info )
.PHONY: all nonstatic static lib libreceiver textclient receiver gui stextclient sreceiver
#all: lib textclient receiver gui
all: textclient receiver gui
nonstatic: lib libreceiver textclient receiver gui
static: lib libreceiver stextclient sreceiver gui
lib:
cd $(LIBRARYDIR) && $(MAKE) FLAGS='$(FLAGS)' DESTDIR='$(LIBDIR)' LIBRARYDIR='$(LIBRARYDIR)' LIBS='$(LDFLAGDET)' INCLUDES='$(INCLUDES)' LIBDIR='$(LIBDIR)'
libreceiver:
cd $(LIBRARYRXRDIR) && $(MAKE) FLAGS='$(FLAGS)' DESTDIR='$(LIBDIR)' LIBS='$(LDFLAGRXR)' INCLUDES='$(INCLUDESRXR)' LIBDIR='$(LIBDIR)'
stextclient: slsDetectorClient_static
slsDetectorClient: textclient
slsDetectorClient_static: #lib
cd $(CLIENTDIR) && $(MAKE) static_clients FLAGS='$(FLAGS)' DESTDIR='$(BINDIR)' LIBRARYDIR='$(LIBRARYDIR)' LIBS='$(LDFLAGDET)' INCLUDES='$(INCLUDES)' LIBDIR='$(LIBDIR)'
@echo ""
@echo "#######################################"
@echo "# Back in slsDetectorPackage Makefile #"
@echo "#######################################"
@echo ""
textclient: #lib
cd $(CLIENTDIR) && $(MAKE) FLAGS='$(FLAGS)' DESTDIR='$(BINDIR)' LIBRARYDIR='$(LIBRARYDIR)' LIBS='$(LDFLAGDET)' INCLUDES='$(INCLUDES)' LIBDIR='$(LIBDIR)'
@echo ""
@echo "#######################################"
@echo "# Back in slsDetectorPackage Makefile #"
@echo "#######################################"
@echo ""
slsReceiver: receiver
slsReceiver_static: receiver
receiver: #libreceiver
# cd $(RECEIVERDIR) && $(MAKE) receiver FLAGS='$(FLAGS)' DESTDIR='$(BINDIR)' LIBS='$(LDFLAGRXR)' INCLUDES='$(INCLUDESRXR)' LIBDIR='$(LIBDIR)'
cd $(RECEIVERDIR) && $(MAKE) FLAGS='$(FLAGS)' DESTDIR='$(BINDIR)' LIBS='$(LDFLAGRXR)' INCLUDES='$(INCLUDESRXR)' LIBDIR='$(LIBDIR)'
cd $(MANAPIDIR) && $(MAKE) slsMultiReceiver
@echo ""
@echo "#######################################"
@echo "# Back in slsDetectorPackage Makefile #"
@echo "#######################################"
@echo ""
sreceiver: #libreceiver
cd $(RECEIVERDIR) && $(MAKE) static_receiver FLAGS='$(FLAGS)' DESTDIR='$(BINDIR)' LIBS='$(LDFLAGRXR)' INCLUDES='$(INCLUDESRXR)' LIBDIR='$(LIBDIR)'
@echo ""
@echo "#######################################"
@echo "# Back in slsDetectorPackage Makefile #"
@echo "#######################################"
@echo ""
slsDetectorGUI: #lib
cd $(GUIDIR) && $(MAKE) DESTDIR='$(BINDIR)' LIBRARYDIR='$(LIBRARYDIR)' INCLUDES='$(INCLUDES)' LDFLAGDET='$(LDFLAGDETONLY)' LIBDIR='$(LIBDIR)'
@echo ""
@echo "#######################################"
@echo "# Back in slsDetectorPackage Makefile #"
@echo "#######################################"
@echo ""
calWiz:
cd $(CALWIZDIR) && $(MAKE) DESTDIR=$(BINDIR) #FLAGS=$(FLAGS) LDFLAGDET=$(LDFLAGDET) INCLUDES=$(INCLUDES)
gui: slsDetectorGUI
doc:
$(shell test -d $(DOCDIR) || mkdir -p $(DOCDIR))
cd manual && make all DESTDIR=$(DOCDIR)
htmldoc:
make doc
$(shell test -d $(DOCDIR) || mkdir -p $(DOCDIR))
cd manual && make html DESTDIR=$(DOCDIR)
detaildoc: createdocs docspdf docshtml removedocs
createdocs: $(LIBRARYDIR)/doxy.config
doxygen $(LIBRARYDIR)/doxy.config
docspdf:
cd slsDetectorPackageDocs/latex && make
$(shell test -d $(DETAILDOC) || mkdir -p $(DETAILDOC))
$(shell test -d $(DETAILDOC)/pdf || mkdir -p $(DETAILDOC)/pdf)
mv slsDetectorPackageDocs/latex/refman.pdf $(DETAILDOC)/pdf/slsDetectorPackageDocs.pdf
docshtml:
$(shell test -d $(DETAILDOC) || mkdir -p $(DETAILDOC))
$(shell test -d $(DETAILDOC)/html || mkdir -p $(DETAILDOC)/html)
$(shell test -d $(DETAILDOC)/html/slsDetectorPackageDocs && rm -r $(DETAILDOC)/html/slsDetectorPackageDocs)
mv slsDetectorPackageDocs/html $(DETAILDOC)/html/slsDetectorPackageDocs
removedocs:
rm -rf slsDetectorPackageDocs;
clean:
cd $(BINDIR) && rm -rf sls_detector_* slsDetectorGui slsReceiver angularCalibrationWizard energyCalibrationWizard
cd $(LIBDIR) && rm -rf libSlsDetector.so libSlsDetector.a libSlsReceiver.so libSlsReceiver.a
cd $(LIBRARYDIR) && $(MAKE) clean
cd $(LIBRARYRXRDIR) && $(MAKE) clean
cd $(CLIENTDIR) && $(MAKE) clean
cd $(GUIDIR) && $(MAKE) clean
cd $(CALWIZDIR) && $(MAKE) clean
cd manual && $(MAKE) clean
cd $(DOCDIR) && rm -rf *
rm -rf slsDetectorPackageDocs;
rm -rf $(DETAILDOC)
rm -rf $(MANAPIDIR)/slsMultiReceiver
#install_lib:
# cd $(LIBRARYDIR) && $(MAKE) install DESTDIR=$(LIBDIR) INCLUDES=$(INCLUDES)
# cd $(LIBRARYDIR) && $(MAKE) install_inc DESTDIR=$(INCDIR)
mythen_virtual:
cd $(LIBRARYDIR) && $(MAKE) mythenVirtualServer DESTDIR=$(BINDIR)
gotthard_virtual:
cd $(LIBRARYDIR) && $(MAKE) gotthardVirtualServer DESTDIR=$(BINDIR)
install_client: textclient slsReceiver
install_gui: gui
confinstall:
make conf;\
make install
install_lib:
make lib;\
make libreceiver; \
make textclient; \
make slsReceiver; \
make doc; \
make htmldoc; \
cd $(LIBRARYDIR) && $(MAKE) install_inc DESTDIR=$(INCDIR); \
cd $(LIBRARYRXRDIR) && $(MAKE) install_inc DESTDIR=$(INCDIR);
install:
make install_lib; \
make gui; \
make calWiz; \
cd $(LIBRARYDIR) && $(MAKE) install_inc DESTDIR=$(INCDIR);\
cd $(LIBRARYRXRDIR) && $(MAKE) install_inc DESTDIR=$(INCDIR);
conf:
set -e; \
. ./configure; \
@echo "INSTALLROOT is $(INSTALLROOT)"
@echo "BINDIR is $(BINDIR)"
@echo "LIBDIR is $(LIBDIR)"
@echo "INCDIR is $(INCDIR)"
@echo "DOCDIR is $(DOCDIR)"
help:
@echo "Targets:"
@echo "make all compile library, text clients, data reciever"
@echo "make lib compile library"
@echo "make libreceiver compile receiver library"
@echo "make textclient compile the slsDetectorClient dynamically linking the libraries"
@echo "make stextclient compile slsDetectorClient statically linking the libraries"
@echo "make receiver compile the slsReciever dynamically linking the libraries"
@echo "make sreceiver compile the slsReciever statically linking the libraries"
@echo "make gui compile slsDetectorGUI - requires a working Qt4 and Qwt installation"
@echo "make calWiz compile the calibration wizards - requires a working Root installation"
@echo "make doc compile pdf documentation"
@echo "make htmldoc compile html (and pdf) documentation"
@echo "make install_lib installs the libraries, the text clients, the documentation and the includes for the API"
@echo "make install installs all software, including the gui, the cal wizards and the includes for the API"
@echo "make confinstall installs all software, including the gui, the cal wizards and the includes for the API, prompting for the install paths"
@echo "make clean remove object files and executables"
@echo "make help lists possible targets"
@echo ""
@echo ""
@echo "Makefile variables"
@echo "DEBUG=1,2 set debug level to 1 (VERBOSE) or 2 (VERYVERBOSE)"
@echo ""
@echo ""
@echo "Variables - to change them run <source configure> :"
@echo "INSTALLROOT=<yourdir>: installation root di r, default $PWD"
@echo "BINDIR=<yourbin>: binary installation dir below INSTALLROOT, default bin"
@echo "LIBDIR=<yourlib>: library installation dir below INSTALLROOT, default lib"
@echo "INCDIR=<yourincludes>: header installation dir below INSTALLROOT, default include"
@echo "DOCDIR=<yourdoc>: documentation installation dir below INSTALLROOT, default doc"

View File

@ -1,58 +0,0 @@
##############################################################
# Generic
##############################################################
CC = g++
CXX = $(CC)
ASM=$(shell echo "/lib/modules/`uname -r`/build/include")
LDFLAGDETONLY = -L$(LIBDIR) -Wl,-rpath=$(LIBDIR) -lSlsDetector
LDFLAGDET = -L$(LIBDIR) -Wl,-rpath=$(LIBDIR) -lSlsDetector -L/usr/lib64/ -pthread
LDFLAGRXR = -L$(LIBDIR) -Wl,-rpath=$(LIBDIR) -lSlsReceiver -L/usr/lib64/ -pthread
FLAGS= -Wall -pthread #-DEIGER_DEBUG2
# -DVERBOSE
# Setting up the verbose flags
ifeq ($(DEBUG),1)
FLAGS = -Wall -DVERBOSE
endif
ifeq ($(DEBUG),2)
FLAGS = -Wall -DVERYVERBOSE
endif
##############################################################
# HDF5 specific. Set this to yes, if you want to compile
# HDF5 code: in this case, you need HDF5 libraries
##############################################################
HDF5 = no
HDF5_DIR = /opt/hdf5v1.10.0
ifeq ($(HDF5),yes)
LDFLAGRXR = -L$(LIBDIR) -Wl,-rpath=$(LIBDIR) -lSlsReceiver -L$(HDF5_DIR)/lib -Wl,-rpath=$(HDF5_DIR)/lib -lhdf5 -lhdf5_cpp -lsz -lz -DHDF5C -L/usr/lib64/ -pthread
INCLUDESRXR = -I$(HDF5_DIR)/include
endif
##############################################################
# ROOTSLS specific. Set this to yes, if you want to compile
# ROOTSLS code: in this case, you need also root libraries
##############################################################
ROOTSLS = no
ROOTFLAGS = $(shell root-config --cflags --glibs) -DMYROOT1 #-DALLFILE_DEBUG #-DMYROOT1
ifeq ($(ROOTSLS),yes)
LDFLAGRXR = -L$(LIBDIR) -lSlsReceiver $(ROOTFLAGS) -DROOTSLS
endif
define colorecho
@tput setaf 6
@echo $1
@tput sgr0
endef

View File

@ -1,68 +0,0 @@
# LEO: Won't compile without libSlsDetector
include ../Makefile.include
$(info )
$(info ##################################)
$(info # In slsDetectorGui Makefile #)
$(info ##################################)
$(info )
DESTDIR ?= ../bin
LIBDIR ?= ../bin
PROG = $(DESTDIR)/slsDetectorGui
DOCDIR ?= docs
LIBRARYDIR ?= ../slsDetectorSoftware
LIBRARYRXRDIR ?= ../slsReceiverSoftware
INCLUDES ?= ../slsSupportLib/include -I$(LIBRARYRXRDIR)/MySocketTCP -I$(LIBRARYDIR)/slsReceiverInterface -I$(LIBRARYDIR)/slsDetector -I$(LIBRARYDIR)/slsDetectorAnalysis -I$(LIBRARYDIR)/multiSlsDetector -I$(LIBRARYDIR)/usersFunctions -I$(LIBRARYRXRDIR)/includes
LDFLAGDET ?= -L$(LIBDIR) -Wl,-rpath=$(LIBDIR) -lSlsDetector
#ifeq ( $(EIGERSLS), yes)
# LDFLAG += $(EIGERFLAGS)
#else ifeq ( $(ROOTSLS), yes)
# LDFLAG += $(ROOTFLAGS)
#endif
.PHONY: all lib clean mm doc htmldoc guiclient
all: lib Makefile.gui $(PROG) guiclient
lib:
cd $(LIBRARYDIR) && $(MAKE) DESTDIR=$(DESTDIR)
@echo ""
@echo "#######################################"
@echo "# Back in slsDetectorGui Makefile #"
@echo "#######################################"
@echo ""
clean:
if test -e Makefile.gui; then $(MAKE) -f Makefile.gui clean; $(MAKE) -f Makefile.gui mocclean; rm Makefile.gui; rm $(DESTDIR)/slsDetectorGui; else $(MAKE) Makefile.gui; $(MAKE) -f Makefile.gui clean; $(MAKE) -f Makefile.gui mocclean; rm $(DESTDIR)/slsDetectorGui; fi
cd client && $(MAKE) clean
# cd manual && make clean
Makefile.gui: mm
mm:
qmake -set QT_INSTALL_PREFIX $(QTDIR) && qmake -o Makefile.gui INCLUDES='$(INCLUDES)' DESTDIR=$(DESTDIR) SLSDETLIB=$(DESTDIR) SUBLIBS='$(LDFLAGDET)' LIBDIR='$(LIBDIR)'
doc:
cd manual && $(MAKE) DESTDIR=$(DOCDIR)
htmldoc:
cd manual && $(MAKE) html DESTDIR=$(DOCDIR)
$(PROG): Makefile $(DIR) src/*.cpp include/*.h slsDetectorPlotting/include/*.h slsDetectorPlotting/src/*.cxx # forms/include/*.h
$(MAKE) -f Makefile.gui SLSDETLIB=$(DESTDIR) DESTDIR=$(DESTDIR) SUBLIBS='$(LDFLAGDET)' INCLUDES='$(INCLUDES)' LIBDIR='$(LIBDIR)'
guiclient:
# echo $(WD)
cd client && $(MAKE) DESTDIR=$(DESTDIR)

View File

@ -1,29 +0,0 @@
CC = g++
CLAGS += -DVERBOSE #VERYBOSE
LDLIBS += -lm -lstdc++ -pthread
DDIR = ../../bin
INCLUDES = -I ../../slsSupportLib/include -I ../include
SRC_CLNT = qClient.cpp
DEPSINCLUDES= qClient.h ../../slsSupportLib/include/MySocketTCP.h ../../slsSupportLib/include/sls_detector_defs.h
all: client
client: $(OBJS) $(DDIR)/gui_client
OBJS = $(SRC_CLNT:%.cpp=%.o)
$(DDIR)/gui_client : $(SRC_CLNT) $(DEPSINCLUDES) Makefile
$(CXX) -o $@ -c $< $(INCLUDES) $(FLAGS) $(LDLIBS)
clean:
rm -rf $(DDIR)/gui_client *.o

View File

@ -1,76 +0,0 @@
include ../Makefile.include
DESTDIR ?= ../bin
LIBDIR ?= $(DESTDIR)
CFLAGS= -g -DC_ONLY -fPIC
#FLAGS+= #-DVERBOSE -DVERYVERBOSE
DFLAGS= -g -DDACS_INT
INCLUDES?= -I../slsSupportLib/include -IslsDetector -ImultiSlsDetector -I../slsSupportLib/include -IsharedMemory I$(ASM)
#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
LIBZMQDIR = ../slsSupportLib/include
LIBZMQ = -L$(LIBZMQDIR) -Wl,-rpath=$(LIBZMQDIR) -lzmq
SRC_CLNT= slsDetector/slsDetectorCommand.cpp slsDetector/slsDetector.cpp multiSlsDetector/multiSlsDetector.cpp ../slsSupportLib/include/ReceiverInterface.cpp slsDetector/slsDetectorUsers.cpp sharedMemory/SharedMemory.cpp ../slsSupportLib/include/utilities.cpp
DEPSINCLUDES = ../slsSupportLib/include/ansi.h ../slsSupportLib/include/sls_detector_defs.h ../slsSupportLib/include/sls_detector_funcs.h ../slsSupportLib/include/error_defs.h slsDetector/detectorData.h sharedMemory/SharedMemory.h ../slsSupportLib/include/sls_detector_exceptions.h ../slsSupportLib/include/versionAPI.h ../slsSupportLib/include/utilities.h ../slsSupportLib/include/container_utils.h
$(info )
$(info #######################################)
$(info # In slsDetectorSoftware Makefile #)
$(info #######################################)
$(info )
OBJS = $(SRC_CLNT:%.cpp=%.o)
.PHONY: all package clean
all: package $(SRC_CLNT)
%.o : %.cpp %.h $(DEPSINCLUDES) Makefile
$(CXX) -o $@ -c $< $(INCLUDES) $(DFLAGS) -fPIC $(EPICSFLAGS) -pthread -lrt $(LIBZMQ) $(FLAGS)
package: versioning $(OBJS) $(DESTDIR)/libSlsDetector.so $(DESTDIR)/libSlsDetector.a
versioning:
$(call colorecho,`./updateGitVersion.sh`)
$(DESTDIR)/libSlsDetector.so: $(OBJS)
$(call colorecho,"#######################################")
$(call colorecho,"# Compiling slsDetector Library #")
$(call colorecho,"#######################################")
$(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)
$(DESTDIR)/libSlsDetector.a: $(OBJS)
ar rcs libSlsDetector.a $(OBJS)
mv libSlsDetector.a $(DESTDIR)
clean:
rm -rf $(DESTDIR)/libSlsDetector.a $(DESTDIR)/libSlsDetector.so core $(OBJS)
cd
#-------------------------------------------------------------------------------
install: package
install_inc:
$(shell test -d $(DESTDIR) || mkdir -p $(DESTDIR))
cp -P slsDetector/slsDetectorUsers.h slsDetector/detectorData.h $(DESTDIR)

View File

@ -1,111 +0,0 @@
include ../../Makefile.include
CFLAGS= -DC_ONLY
#FLAGS=-DVERBOSE
#ASM=$(shell echo "/lib/modules/`uname -r`/build/include")
INCLUDES?= -I../../slsSupportLib/include -I../slsDetector -I../multiSlsDetector -I../slsReceiverInterface -I$(shell echo "/lib/modules/`uname -r`/build/include")
DESTDIR ?= ../../bin
BIN=$(DESTDIR)
LIBS?= -L$(DESTDIR) -lSlsDetector
LIBRARYDIR?=../
LDFLAG= -L/usr/lib64/ -pthread
DOCDIR ?= $(PWD)/docs
SRC_CLNT=sls_detector_client.cpp
$(info )
$(info #######################################)
$(info # In slsDetectorclient Makefile #)
$(info #######################################)
$(info )
all: clients
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
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) $(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) $(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) $(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) $(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) $(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) $(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) $(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))
doc:
cd manual && make DESTDIR=$(DOCDIR)
htmldoc:
cd manual && make html DESTDIR=$(DOCDIR)
clean:
# cd manual && make clean
rm -rf $(BIN)/sls_detector_put $(BIN)/sls_detector_get $(BIN)/sls_detector_acquire $(BIN)/sls_detector_help $(BIN)/gui_client
install: clients

View File

@ -1,127 +0,0 @@
include ../Makefile.include
DESTDIR ?= ../bin
LIBDIR ?= ../bin
DOCDIR ?= docs
SRCDIR = src
INCDIR = include
COMMONDIR = ../slsSupportLib/include
TESTDIR = test
BUILDDIR = build
PROGS = $(DESTDIR)/slsReceiver
CFLAGS= -g -DC_ONLY -fPIC
#FLAGS+= #-DVERBOSE -DVERYVERBOSE
DFLAGS= -g -DDACS_INT -DSLS_RECEIVER_UDP_FUNCTIONS #-DVERBOSE
INCLUDES?= $(INCLUDESRXR) -I $(INCDIR) -I $(COMMONDIR)
##############################################################
# ZMQ specific: in this case, you need ZMQ libraries already included in this package
###########################################################
LIBZMQDIR = ../slsSupportLib/include
LIBZMQ = -L$(LIBZMQDIR) -Wl,-rpath=$(LIBZMQDIR) -lzmq
SRC_CLNT = ThreadObject.cpp Listener.cpp DataProcessor.cpp DataStreamer.cpp Fifo.cpp File.cpp BinaryFile.cpp slsReceiverImplementation.cpp slsReceiverTCPIPInterface.cpp slsReceiver.cpp slsReceiverUsers.cpp
DEPSINCLUDES = $(COMMONDIR)/ansi.h $(COMMONDIR)/sls_detector_defs.h $(COMMONDIR)/sls_detector_funcs.h $(COMMONDIR)/GeneralData.h $(INCDIR)/circularFifo.h $(COMMONDIR)/genericSocket.h $(COMMONDIR)/logger.h $(INCDIR)/receiver_defs.h $(COMMONDIR)/ZmqSocket.h $(INCDIR)/BinaryFileStatic.h $(INCDIR)/HDF5FileStatic.h $(COMMONDIR)/sls_detector_exceptions.h
ifeq ($(HDF5),yes)
SRC_CLNT += HDF5File.cpp
endif
MAIN_SRC = main.cpp
OBJS=$(SRC_CLNT:%.cpp=$(BUILDDIR)/%.o)
$(info )
$(info #######################################)
$(info # In slsReceiverSoftware Makefile #)
$(info #######################################)
$(info )
.PHONY: all intdoc package eigerReceiver clean
all: builddir lib receiver
dummy: $(DESTDIR)/dummyReceiver
intdoc: $(SRC_H) $(SRC_CLNT)
doxygen doxy.config
$(BUILDDIR)/%.o : $(SRCDIR)/%.cpp $(INCDIR)/%.h $(COMMONDIR)/%.h $(DEPSINCLUDES) Makefile
ifeq ($(ROOTSLS),yes)
$(CXX) -DROOTSLS -o $@ -c $< $(INCLUDES) $(DFLAGS) $(ROOTFLAGS) -fPIC $(EPICSFLAGS) $(LDFLAGRXR) -L/usr/lib64/ $(FLAGS)
else
# $(call colorecho,`./updateGitVersion.sh`)
$(CXX) -o $@ -c $< $(INCLUDES) $(DFLAGS) -fPIC $(EPICSFLAGS) $(LDFLAGRXR) -pthread $(FLAGS) $(LIBZMQ) -lrt
endif
versioning:
$(call colorecho,`./updateGitVersion.sh`)
lib: versioning $(OBJS) $(DESTDIR)/libSlsReceiver.so $(DESTDIR)/libSlsReceiver.a
receiver: $(DESTDIR)/slsReceiver
$(DESTDIR)/libSlsReceiver.so: $(OBJS)
$(call colorecho,"#######################################")
$(call colorecho,"# Compiling slsReceiver Library #")
$(call colorecho,"#######################################")
$(CXX) -shared -Wl,-soname,libSlsReceiver.so -o libSlsReceiver.so $(OBJS) -lc $(INCLUDES) $(DFLAGS) $(FLAGS) $(EPICSFLAGS) -L/usr/lib64 -pthread $(LIBZMQ) -lrt
$(shell test -d $(DESTDIR) || mkdir -p $(DESTDIR))
mv libSlsReceiver.so $(DESTDIR)
$(DESTDIR)/libSlsReceiver.a: $(OBJS)
ar rcs libSlsReceiver.a $(OBJS)
mv libSlsReceiver.a $(DESTDIR)
$(DESTDIR)/slsReceiver: $(SRCDIR)/$(MAIN_SRC) $(DESTDIR)/libSlsReceiver.so $(DESTDIR)/libSlsReceiver.a
$(call colorecho,"#######################################")
$(call colorecho,"# Compiling slsReceiver #")
$(call colorecho,"#######################################")
$(CXX) -o $@ $(SRCDIR)/$(MAIN_SRC) $(FLAGS) $(INCLUDES) $(CFLAGS) $(LIBS) $(LDFLAGRXR) -fPIC $(LIBZMQ) -lrt
#$(EIGERFLAGS)
$(DESTDIR)/dummyReceiver: $(SRCDIR)/$(DUMMY_MAIN_SRC) $(DESTDIR)/libSlsReceiver.so $(DESTDIR)/libSlsReceiver.a
$(call colorecho,"#######################################")
$(call colorecho,"# Compiling Dummy slsReceiver #")
$(call colorecho,"#######################################")
$(CXX) -o $@ $(SRCDIR)/$(DUMMY_MAIN_SRC) $(FLAGS) $(INCLUDES) $(CFLAGS) $(LIBS) $(LDFLAGRXR) -fPIC $(LIBZMQ) -lrt
#$(EIGERFLAGS)
clean: buildclean
make testclean
if test -e $(DESTDIR)/libSlsReceiver.a; then rm $(DESTDIR)/libSlsReceiver.a;fi
if test -e $(DESTDIR)/libSlsReceiver.so; then rm $(DESTDIR)/libSlsReceiver.so;fi
if test -e $(PROGS); then rm $(PROGS);fi
builddir:
mkdir -p $(BUILDDIR)
# if [ ! -d $(BUILDDIR) ]; then mkdir $(BUILDDIR); fi
buildclean:
rm -rf $(OBJS)
testclean:
if [ -f $(TESTDIR)/rec ]; then \
cd $(TESTDIR) && rm *.o rec send; \
fi
#-------------------------------------------------------------------------------
install: package
install_inc:
$(shell test -d $(DESTDIR) || mkdir -p $(DESTDIR))
cp -P slsReceiver/slsReceiverUsers.h $(DESTDIR)