mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 15:20:02 +02:00
Makefile sala refined
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@818 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
parent
1b2aba80a5
commit
49ea26abb2
@ -1,37 +1,36 @@
|
||||
### LEO: NB slsDetectorSoftware cannot compile by itself, as it depends on slsDetectorCalibration (see INCLUDES)
|
||||
|
||||
include ../Makefile.include
|
||||
|
||||
DESTDIR ?= ../bin
|
||||
LIBDIR ?= $(DESTDIR)
|
||||
DOCDIR ?= docs
|
||||
|
||||
|
||||
CFLAGS= -g -DC_ONLY -fPIC
|
||||
#FLAGS+= #-DVERBOSE -DVERYVERBOSE
|
||||
|
||||
DFLAGS= -g -DDACS_INT -DTHIS_PATH='"$(shell pwd)"' -DSLS_RECEIVER_FUNCTION_LIST $(shell root-config --cflags --glibs) #-DALLFILE_DEBUG #-DMYROOT1 -DALLFILE #-DMYROOT1 `root-config --cflags --glibs`
|
||||
|
||||
#ASM=$(shell echo "/lib/modules/`uname -r`/build/include")
|
||||
|
||||
INCLUDES?= -IcommonFiles -IslsDetector -IMySocketTCP -IusersFunctions -ImultiSlsDetector -IslsDetectorUtils -IslsDetectorCommand -IslsDetectorAnalysis -IslsReceiverInterface -IslsReceiver -I../slsDetectorCalibration -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
|
||||
|
||||
CC=g++
|
||||
SRC_CLNT=slsDetectorAnalysis/fileIO.cpp MySocketTCP/MySocketTCP.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 slsDetector/slsDetectorUsers.cpp slsDetectorAnalysis/postProcessingFuncs.cpp slsReceiverInterface/receiverInterface.cpp slsReceiver/slsReceiverFunctionList.cpp slsReceiver/slsReceiver_funcs.cpp slsReceiver/slsReceiverUsers.cpp
|
||||
# slsReceiver/eigerReceiver.cpp
|
||||
|
||||
|
||||
SRC_CLNT= slsDetectorAnalysis/fileIO.cpp MySocketTCP/MySocketTCP.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 slsDetector/slsDetectorUsers.cpp slsDetectorAnalysis/postProcessingFuncs.cpp slsReceiverInterface/receiverInterface.cpp slsReceiver/slsReceiverFunctionList.cpp slsReceiver/slsReceiver_funcs.cpp slsReceiver/slsReceiverUsers.cpp slsReceiver/eigerReceiver.cpp
|
||||
|
||||
OBJS = $(SRC_CLNT:.cpp=.o)
|
||||
OBJS += slsReceiver/eigerReceiver.o
|
||||
|
||||
HEADERS = $(SRC_CLNT:.cpp=.h) commonFiles/sls_detector_defs.h slsDetectorAnalysis/detectorData.h slsDetector/slsDetectorBase.h multiSlsDetector/multiSlsDetectorCommand.h slsDetectorAnalysis/enCalLogClass.h slsDetectorAnalysis/angCalLogClass.h slsDetectorAnalysis/angleConversionConstant.h usersFunctions/angleFunction.h slsReceiverInterface/receiverInterface.h slsDetector/svnInfoLib.h slsReceiver/circularFifo.h slsReceiver/slsReceiver_funcs.h slsReceiver/svnInfoReceiverTmp.h slsReceiver/receiver_defs.h slsReceiver/slsReceiverFunctionList.h slsReceiver/slsReceiverUsers.h slsReceiver/svnInfoReceiver.h #../slsDetectorCalibration/singlePhotonDetector.h ../slsDetectorCalibration/moenchCommonMode.h ../slsDetectorCalibration/moench02ModuleData.h ../slsDetectorCalibration/slsReceiverData.h
|
||||
### LEO: unused
|
||||
#HEADERS = $(SRC_CLNT:.cpp=.h) commonFiles/sls_detector_defs.h slsDetectorAnalysis/detectorData.h slsDetector/slsDetectorBase.h multiSlsDetector/multiSlsDetectorCommand.h slsDetectorAnalysis/enCalLogClass.h slsDetectorAnalysis/angCalLogClass.h slsDetectorAnalysis/angleConversionConstant.h usersFunctions/angleFunction.h slsReceiverInterface/receiverInterface.h slsDetector/svnInfoLib.h slsReceiver/circularFifo.h slsReceiver/slsReceiver_funcs.h slsReceiver/svnInfoReceiverTmp.h slsReceiver/receiver_defs.h slsReceiver/slsReceiverFunctionList.h slsReceiver/slsReceiverUsers.h slsReceiver/svnInfoReceiver.h #../slsDetectorCalibration/singlePhotonDetector.h ../slsDetectorCalibration/moenchCommonMode.h ../slsDetectorCalibration/moench02ModuleData.h ../slsDetectorCalibration/slsReceiverData.h
|
||||
|
||||
#POCODIR = /afs/psi.ch/user/s/sala/public/poco-slp_6.4-32bit
|
||||
#JSONBOXDIR = /afs/psi.ch/user/s/sala/public/JsonBox-slp_6.4-32bit
|
||||
POCODIR ?= /afs/psi.ch/user/s/sala/public/poco-slp_5.7-32bit
|
||||
JSONBOXDIR ?= /afs/psi.ch/user/s/sala/public/JsonBox-slp_5.7-32bit
|
||||
#POCODIR ?= /home/sala/Programs/poco-ubuntu_13.10-64bit
|
||||
#JSONBOXDIR ?= /home/sala/Programs/JsonBox-ubuntu_13.10-64bit
|
||||
EIGERFLAGS ?= -L $(JSONBOXDIR) -L $(POCODIR)/lib -Wl,-rpath=$(POCODIR)/lib -I $(POCODIR)/include -I $(JSONBOXDIR)/include
|
||||
|
||||
DESTDIR = bin
|
||||
DOCDIR ?= docs
|
||||
|
||||
.PHONY: all intdoc doc htmldoc package eigerReceiver clean
|
||||
|
||||
all: package $(SRC_CLNT)
|
||||
echo "-----------compiling all"
|
||||
|
||||
intdoc: $(SRC_H) $(SRC_CLNT)
|
||||
doxygen doxy.config
|
||||
@ -66,17 +65,20 @@ gotthardVirtualServer: $(SRC_MYTHEN_SVC)
|
||||
|
||||
|
||||
%.o : %.cpp %.h Makefile
|
||||
echo "------------- compiling" $@
|
||||
$(CXX) -Wall -o $@ -c $< $(INCLUDES) $(DFLAGS) $(FLAGS) $(EIGERFLAGS) -fPIC $(EPICSFLAGS) -L/usr/lib64/
|
||||
ifeq ($(EIGERSLS),yes)
|
||||
$(CXX) -DEIGERSLS -o $@ -c $< $(INCLUDES) $(DFLAGS) $(EIGERFLAGS) -fPIC $(EPICSFLAGS) -L/usr/lib64/ #$(FLAGS)
|
||||
else
|
||||
$(CXX) -o $@ -c $< $(INCLUDES) $(DFLAGS) -fPIC $(EPICSFLAGS) -lpthread #$(FLAGS)
|
||||
endif
|
||||
|
||||
# LEO: not satisfied by eigerReceiver
|
||||
package: eigerReceiver $(OBJS) $(DESTDIR)/libSlsDetector.so $(DESTDIR)/libSlsDetector.a
|
||||
|
||||
eigerReceiver:
|
||||
cd slsReceiver && make eigerReceiver
|
||||
|
||||
$(DESTDIR)/libSlsDetector.so: $(OBJS)
|
||||
echo "------------- Moving"
|
||||
$(CXX) -shared -Wl,-soname,libSlsDetector.so -o libSlsDetector.so $(OBJS) -lc $(INCLUDES) $(DFLAGS) $(FLAGS) $(EPICSFLAGS) -L/usr/lib64/
|
||||
$(CXX) -shared -Wl,-soname,libSlsDetector.so -o libSlsDetector.so $(OBJS) -lc $(INCLUDES) $(DFLAGS) $(FLAGS) $(EPICSFLAGS) -L/usr/lib64 -lpthread
|
||||
$(shell test -d $(DESTDIR) || mkdir -p $(DESTDIR))
|
||||
mv libSlsDetector.so $(DESTDIR)
|
||||
|
||||
@ -85,8 +87,9 @@ $(DESTDIR)/libSlsDetector.a: $(OBJS)
|
||||
mv libSlsDetector.a $(DESTDIR)
|
||||
|
||||
clean:
|
||||
cd slsReceiver && make clean
|
||||
rm -rf $(DESTDIR)/libSlsDetector.a $(DESTDIR)/libSlsDetector.so core docs/* slsDetectorUsersDocs $(OBJS)
|
||||
|
||||
cd
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
|
@ -1,33 +1,27 @@
|
||||
CC = g++
|
||||
include ../../Makefile.include
|
||||
|
||||
DESTDIR ?= ../../bin
|
||||
LIBDIR ?= $(DESTDIR)
|
||||
PROGS = $(DESTDIR)/slsReceiver
|
||||
|
||||
|
||||
CFLAGS += -DSLS_RECEIVER_FUNCTION_LIST -O3
|
||||
CPPFLAGS = ${CFLAGS} # for MAC
|
||||
LDFLAG= -L/usr/lib64/ -lpthread -lm -lstdc++
|
||||
LDFLAG ?= -L$(LIBDIR) -lSlsDetector -L/usr/lib64/ -lpthread
|
||||
LDFLAG += -lm -lstdc++
|
||||
|
||||
#POCODIR = /afs/psi.ch/user/s/sala/public/poco-slp_6.4-32bit
|
||||
#JSONBOXDIR = /afs/psi.ch/user/s/sala/public/JsonBox-slp_6.4-32bit
|
||||
POCODIR ?= /afs/psi.ch/user/s/sala/public/poco-slp_5.7-32bit
|
||||
JSONBOXDIR ?= /afs/psi.ch/user/s/sala/public/JsonBox-slp_5.7-32bit
|
||||
#POCODIR ?= /home/sala/Programs/poco-ubuntu_13.10-64bit
|
||||
#JSONBOXDIR ?= /home/sala/Programs/JsonBox-ubuntu_13.10-64bit
|
||||
|
||||
EIGERFLAGS ?= -L $(JSONBOXDIR) -L $(POCODIR)/lib -Wl,-rpath=$(POCODIR)/lib -I$(POCODIR)/include -I$(JSONBOXDIR)/include
|
||||
|
||||
#LDLIBS += -lm -lstdc++ -lpthread
|
||||
LIBS?= -L$(LIBDIR) -lSlsDetector
|
||||
|
||||
INCLUDES ?= -I ../MySocketTCP -I ../commonFiles -I ../../slsDetectorCalibration -I .
|
||||
SRC_CLNT = slsReceiver.cpp
|
||||
#../MySocketTCP/MySocketTCP.cpp slsReceiver_funcs.cpp UHRIXCallback.cpp slsReceiverFunctionList.cpp slsReceiverUsers.cpp
|
||||
|
||||
DESTDIR ?= bin
|
||||
#### LEO ADD
|
||||
LIBDIR = ../$(DESTDIR)
|
||||
### END
|
||||
INSTMODE = 0777
|
||||
|
||||
INSTMODE = 0777
|
||||
OBJS = $(SRC_CLNT:.cpp=.o)
|
||||
|
||||
PROGS = $(DESTDIR)/slsReceiver
|
||||
|
||||
.PHONY: all receiver clean static_receiver boot eigerReceiver lib
|
||||
|
||||
all: receiver
|
||||
|
||||
@ -35,7 +29,6 @@ receiver: $(DESTDIR)/slsReceiver
|
||||
|
||||
static_receiver: $(DESTDIR)/sslsReceiver
|
||||
|
||||
|
||||
boot: $(OBJS)
|
||||
|
||||
$(DESTDIR)/sslsReceiver: lib
|
||||
@ -46,27 +39,28 @@ $(DESTDIR)/sslsReceiver: lib
|
||||
$(CXX) -static -o $@ $(SRC_CLNT) $(FLAGS) $(INCLUDES) $(CLAGS) $(LIBS) $(LDFLAG)
|
||||
|
||||
|
||||
$(DESTDIR)/slsReceiver: lib
|
||||
echo "---------------slsReceiver"
|
||||
mkdir -p $(DESTDIR)
|
||||
$(CXX) -o $@ $(SRC_CLNT) $(FLAGS) $(INCLUDES) $(CLAGS) $(LIBS) $(LDFLAG) $(EIGERFLAGS) -L../$(LIBDIR) -lPocoNet -lPocoFoundation -lJsonBox
|
||||
$(DESTDIR)/slsReceiver: eigerReceiver lib
|
||||
$(CXX) -o $@ $(SRC_CLNT) $(FLAGS) $(INCLUDES) $(CLAGS) $(LIBS) $(LDFLAG) -fPIC
|
||||
#$(EIGERFLAGS)
|
||||
|
||||
|
||||
ifeq ($(EIGERSLS), yes)
|
||||
eigerReceiver:
|
||||
echo "---------------EigerReceiver"
|
||||
$(CXX) $(FLAGS) $(CFLAGS) $(EIGERFLAGS) -fPIC -c -o eigerReceiverTest.o eigerReceiverTest.cpp -lPocoNet -lPocoFoundation -lJsonBox
|
||||
$(CXX) $(FLAGS) $(CFLAGS) $(EIGERFLAGS) -fPIC -c -o eigerReceiver.o eigerReceiver.cpp -lPocoNet -lPocoFoundation -lJsonBox
|
||||
$(CXX) $(EIGERFLAGS) eigerReceiverTest.o eigerReceiver.o -o eigerReceiverTest -lPocoNet -lPocoFoundation -lJsonBox
|
||||
$(CXX) $(FLAGS) $(CFLAGS) -fPIC -c -o eigerReceiverTest.o eigerReceiverTest.cpp $(EIGERFLAGS)
|
||||
$(CXX) $(FLAGS) $(CFLAGS) -fPIC -c -o eigerReceiver.o eigerReceiver.cpp $(EIGERFLAGS)
|
||||
$(CXX) eigerReceiverTest.o eigerReceiver.o -o eigerReceiverTest $(EIGERFLAGS)
|
||||
else
|
||||
eigerReceiver: eigerReceiverDummy.cpp
|
||||
echo "Compiling dummy EigerReceiver"
|
||||
$(CXX) $(FLAGS) $(CFLAGS) -fPIC -c -o eigerReceiver.o eigerReceiverDummy.cpp
|
||||
endif
|
||||
|
||||
lib:
|
||||
cd ../ && $(MAKE) DESTDIR=$(LIBDIR)
|
||||
cd ../ && $(MAKE) DESTDIR=../bin LIBDIR=../bin
|
||||
|
||||
clean:
|
||||
rm -rf $(PROGS) *.o eigerReceiverTest
|
||||
rm -rf $(DESTDIR)/libSlsDetector.a $(DESTDIR)/libSlsDetector.so core
|
||||
|
||||
|
||||
# EigerDataReceiver
|
||||
eigerReceiverTest.o: eigerReceiver.h
|
||||
eigerReceiver.o : eigerReceiver.h
|
||||
eigerReceiverTest: eigerReceiver.o eigerReceiverTest.o
|
||||
#EOF
|
||||
|
||||
|
99
slsDetectorSoftware/slsReceiver/eigerReceiverDummy.cpp
Normal file
99
slsDetectorSoftware/slsReceiver/eigerReceiverDummy.cpp
Normal file
@ -0,0 +1,99 @@
|
||||
/*
|
||||
* eigerReceiver.cpp
|
||||
*
|
||||
* Created on: Mar 11, 2014
|
||||
* Author: billich
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include "eigerReceiver.h"
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
struct EigerReceiverInitializationConfiguration {
|
||||
string detectorHostname;
|
||||
};
|
||||
|
||||
struct EigerReceiverScanConfiguration {
|
||||
|
||||
string fileName;
|
||||
string filePath;
|
||||
int dynamicRange;
|
||||
int scanTag;
|
||||
int numberOfFrames;
|
||||
bool doFileWrite;
|
||||
bool doFileOverWrite;
|
||||
|
||||
EigerReceiverScanConfiguration():
|
||||
dynamicRange(-1),
|
||||
scanTag(-1),
|
||||
numberOfFrames(-1),
|
||||
doFileWrite(false),
|
||||
doFileOverWrite(false){};
|
||||
};
|
||||
|
||||
class EigerReceiverImplementation: public EigerReceiver {
|
||||
|
||||
public:
|
||||
|
||||
EigerReceiverImplementation(){};
|
||||
|
||||
~EigerReceiverImplementation(){};
|
||||
|
||||
void initialize(const char *detectorHostname) {}
|
||||
|
||||
char *getDetectorHostname() const { return (char*)"";}
|
||||
|
||||
char *getFileName() const {return (char*)"";}
|
||||
|
||||
char *getFilePath() const {return (char*)"";}
|
||||
|
||||
int getDynamicRange() const { return 0;}
|
||||
|
||||
int getScanTag() const {return 0;}
|
||||
|
||||
int getNumberOfFrames() const {return 0;}
|
||||
|
||||
int getEnableFileWrite() const {return 0;}
|
||||
|
||||
int getEnableOverwrite() const {return 0;}
|
||||
|
||||
slsDetectorDefs::runStatus getStatus() const { return slsDetectorDefs::IDLE;}
|
||||
|
||||
char *setFileName(const char c[]) {return (char*)"";}
|
||||
|
||||
char *setFilePath(const char c[]) {return (char*)"";}
|
||||
|
||||
int setDynamicRange (const int dr) {return 0;}
|
||||
|
||||
int setScanTag (const int tag) {return 0;}
|
||||
|
||||
int setNumberOfFrames (const int fnum) {return 0;}
|
||||
|
||||
int setEnableFileWrite(const int i) {return 0;}
|
||||
|
||||
int setEnableOverwrite(const int i) {return 0;}
|
||||
|
||||
int startReceiver(char message[]) {return 0;}
|
||||
|
||||
int stopReceiver() {return 0;}
|
||||
|
||||
void abort() {}
|
||||
|
||||
private:
|
||||
EigerReceiverScanConfiguration scan_config;
|
||||
EigerReceiverInitializationConfiguration init_config;
|
||||
bool isInitialized;
|
||||
slsDetectorDefs::runStatus status;
|
||||
|
||||
};
|
||||
|
||||
EigerReceiver *EigerReceiver::create(void) {
|
||||
return new EigerReceiverImplementation();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user