diff --git a/Makefile b/Makefile index 7f012a335..53a3c0efc 100644 --- a/Makefile +++ b/Makefile @@ -1,41 +1,28 @@ # do not change below this line -INCS='-I$(LIBRARYDIR)/commonFiles -I$(LIBRARYDIR)/slsDetector -I$(LIBRARYDIR)/MySocketTCP -I$(LIBRARYDIR)/usersFunctions -I$(LIBRARYDIR)/multiSlsDetector -I$(LIBRARYDIR)/slsDetectorUtils -I$(LIBRARYDIR)/slsDetectorCommand -I$(LIBRARYDIR)/slsDetectorAnalysis -I$(LIBRARYDIR)/slsReceiverInterface -I$(CALIBDIR) -I$(ASM)' +# Include common definitions +include Makefile.include -WD=$(shell pwd) -LIBRARYDIR=$(WD)/slsDetectorSoftware -CLIENTDIR=$(LIBRARYDIR)/slsDetectorClient -GUIDIR=$(WD)/slsDetectorGui -RECEIVERDIR=$(LIBRARYDIR)/slsReceiver -CALWIZDIR=$(WD)/calibrationWizards -MANDIR=$(WD)/manual -CALIBDIR=$(WD)/slsDetectorCalibration +INSTALLROOT ?= $(PWD) +BINDIR ?= $(INSTALLROOT)/bin +DOCDIR ?= $(INSTALLROOT)/docs +LIBDIR ?= $(INSTALLROOT)/bin +INCDIR ?= $(INSTALLROOT)/include -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 - -INSTALLROOT?=$(PWD) -BINDIR?=$(INSTALLROOT)/bin -DOCDIR?=$(INSTALLROOT)/docs -LIBDIR?=$(INSTALLROOT)/bin -INCDIR?=$(INSTALLROOT)/include +WD = $(shell pwd) +LIBRARYDIR = $(WD)/slsDetectorSoftware +CLIENTDIR = $(LIBRARYDIR)/slsDetectorClient +GUIDIR = $(WD)/slsDetectorGui +RECEIVERDIR = $(LIBRARYDIR)/slsReceiver +CALWIZDIR = $(WD)/calibrationWizards +MANDIR = $(WD)/manual +CALIBDIR = $(WD)/slsDetectorCalibration -LDFLAG = '-L$(LIBDIR) -lSlsDetector $(EIGERFLAGS) -lPocoNet -lPocoFoundation -lJsonBox' -#LDFLAG:='-L$(LIBDIR) -lSlsDetector' - -#FLAGS=-DVERBOSE -ASM=$(shell echo "/lib/modules/`uname -r`/build/include") - - - -INCLUDES='-I. -I$(LIBRARYDIR)/commonFiles -I$(LIBRARYDIR)/slsDetector -I$(LIBRARYDIR)/MySocketTCP -I$(LIBRARYDIR)/usersFunctions -I$(LIBRARYDIR)/multiSlsDetector -I$(LIBRARYDIR)/slsDetectorUtils -I$(LIBRARYDIR)/slsDetectorCommand -I$(LIBRARYDIR)/slsDetectorAnalysis -I$(LIBRARYDIR)/slsReceiverInterface -I$(LIBRARYDIR)/slsReceiver -I$(CALIBDIR) -I$(ASM)' +INCLUDES=-I. -I$(LIBRARYDIR)/commonFiles -I$(LIBRARYDIR)/slsDetector -I$(LIBRARYDIR)/MySocketTCP -I$(LIBRARYDIR)/usersFunctions -I$(LIBRARYDIR)/multiSlsDetector -I$(LIBRARYDIR)/slsDetectorUtils -I$(LIBRARYDIR)/slsDetectorCommand -I$(LIBRARYDIR)/slsDetectorAnalysis -I$(LIBRARYDIR)/slsReceiverInterface -I$(LIBRARYDIR)/slsReceiver -I$(CALIBDIR) -I$(ASM) +.PHONY: all nonstatic static lib textclient receiver gui stextclient sreceiver all: lib textclient receiver gui @@ -44,33 +31,33 @@ nonstatic: lib textclient receiver gui static: lib stextclient sreceiver gui lib: - cd $(LIBRARYDIR) && $(MAKE) FLAGS=$(FLAGS) DESTDIR=$(LIBDIR) INCLUDES=$(INCLUDES) + cd $(LIBRARYDIR) && $(MAKE) FLAGS='$(FLAGS)' DESTDIR='$(LIBDIR)' INCLUDES='$(INCLUDES)' stextclient: slsDetectorClient_static slsDetectorClient: textclient slsDetectorClient_static: lib - cd $(CLIENTDIR) && $(MAKE) static_clients FLAGS=$(FLAGS) LIBS=$(LDFLAG) DESTDIR=$(BINDIR) LIBDIR=$(LIBDIR) INCLUDES=$(INCLUDES) + cd $(CLIENTDIR) && $(MAKE) static_clients FLAGS='$(FLAGS)' LIBS='$(LDFLAG)' DESTDIR='$(BINDIR)' LIBDIR='$(LIBDIR)' INCLUDES='$(INCLUDES)' textclient: lib - cd $(CLIENTDIR) && $(MAKE) FLAGS=$(FLAGS) DESTDIR=$(BINDIR) LIBDIR=$(LIBDIR) LIBS=$(LDFLAG) INCLUDES=$(INCLUDES) + cd $(CLIENTDIR) && $(MAKE) FLAGS='$(FLAGS)' DESTDIR='$(BINDIR)' LIBDIR='$(LIBDIR)' LIBS='$(LDFLAG)' INCLUDES='$(INCLUDES)' slsReceiver: receiver slsReceiver_static: receiver receiver: lib - cd $(RECEIVERDIR) && $(MAKE) receiver FLAGS=$(FLAGS) DESTDIR=$(BINDIR) LIBDIR=$(LIBDIR) LIBS=$(LDFLAG) INCLUDES=$(INCLUDES) + cd $(RECEIVERDIR) && $(MAKE) receiver FLAGS='$(FLAGS)' DESTDIR='$(BINDIR)' LIBDIR='$(LIBDIR)' LIBS='$(LDFLAG)' INCLUDES='$(INCLUDES)' sreceiver: lib - cd $(RECEIVERDIR) && $(MAKE) static_receiver FLAGS=$(FLAGS) DESTDIR=$(BINDIR) LIBDIR=$(LIBDIR) LIBS=$(LDFLAG) INCLUDES=$(INCLUDES) + cd $(RECEIVERDIR) && $(MAKE) static_receiver FLAGS='$(FLAGS)' DESTDIR='$(BINDIR)' LIBDIR='$(LIBDIR)' LIBS='$(LDFLAG)' INCLUDES='$(INCLUDES)' slsDetectorGUI: lib - echo $(LDFLAG) - cd $(GUIDIR) && $(MAKE) FLAGS=$(FLAGS) LDFLAG='-L$(LIBDIR) -lSlsDetector $(EIGERFLAGS) -lPocoNet -lJsonBox' DESTDIR=$(BINDIR) LIBDIR=$(LIBDIR) INCLUDES=$(INCLUDES) + cd $(GUIDIR) && $(MAKE) DESTDIR='$(BINDIR)' LIBDIR='$(LIBDIR)' INCLUDES='$(INCLUDES)' + calWiz: cd $(CALWIZDIR) && $(MAKE) FLAGS=$(FLAGS) LDFLAG=$(LDFLAG) DESTDIR=$(BINDIR) INCLUDES=$(INCLUDES) diff --git a/Makefile.include b/Makefile.include new file mode 100644 index 000000000..93649756c --- /dev/null +++ b/Makefile.include @@ -0,0 +1,33 @@ +############################################################## +# Generic +############################################################## + +CC = g++ +CXX = $(CC) +ASM=$(shell echo "/lib/modules/`uname -r`/build/include") +LDFLAG = -L$(LIBDIR) -lSlsDetector -L/usr/lib64/ -lpthread +FLAGS= -Wall -DVERBOSE + +############################################################## +# EigerSLS specific. Set this to yes, if you want to compile +# EigerSLS code: in this case, you need also POCO and JsonBox +# libraries +############################################################## + +EIGERSLS = no + +#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 = /afs/psi.ch/user/s/sala/public/poco-slp_6.4-64bit +#JSONBOXDIR = /afs/psi.ch/user/s/sala/public/JsonBox-slp_6.4-64bit +POCODIR = /home/sala/Programs/poco-ubuntu_13.10-64bit +JSONBOXDIR = /home/sala/Programs/JsonBox-ubuntu_13.10-64bit + +EIGERFLAGS = -L$(POCODIR)/lib -Wl,-rpath=$(POCODIR)/lib -I$(POCODIR)/include -L$(JSONBOXDIR) -Wl,-rpath=$(JSONBOXDIR)/lib -I$(JSONBOXDIR)/include -lPocoNet -lPocoFoundation -lJsonBox + +ifeq ($(EIGERSLS),yes) + LDFLAG = -L$(LIBDIR) -lSlsDetector $(EIGERFLAGS) -DEIGERSLS +endif + + + diff --git a/examples/two_no_receiver.config b/examples/two_no_receiver.config new file mode 100644 index 000000000..18718ad64 --- /dev/null +++ b/examples/two_no_receiver.config @@ -0,0 +1,64 @@ +#####Any line with a # is not read###### + +#type Gotthard+ +hostname bchip007+bchip009+ + +#0:hostname bchip007 +#0:port 1952 +#0:stopport 1953 +#0:rx_tcpport 1956 +0:settingsdir /home/l_msdetect/dhanya/slsDetectorsPackage/settingsdir/gotthard +0:angdir 1.000000 +0:moveflag 0.000000 +0:lock 0 +0:caldir /home/l_msdetect/dhanya/slsDetectorsPackage/settingsdir/gotthard +0:ffdir /home/l_msdetect +0:extsig:0 off +0:extsig:1 off +0:extsig:2 off +0:extsig:3 off +#0:detectorip 10.1.1.2 +#0:detectormac 00:aa:bb:cc:dd:ee +#0:rx_udpport 50001 +#0:rx_udpip 10.1.1.1 +#0:rx_hostname 129.129.202.134 +0:outdir /data/speedt +0:vhighvoltage 120 + + +#1:hostname bchip009 +#1:port 1952 +#1:stopport 1953 +1:rx_tcpport 1957 +1:settingsdir /home/l_msdetect/dhanya/slsDetectorsPackage/settingsdir/gotthard +1:angdir 1.000000 +1:moveflag 0.000000 +1:lock 0 +1:caldir /home/l_msdetect/dhanya/slsDetectorsPackage/settingsdir/gotthard +1:ffdir /home/l_msdetect +1:extsig:0 off +1:extsig:1 off +1:extsig:2 off +1:extsig:3 off +#1:detectorip 10.1.2.2 +#1:detectormac 00:aa:bb:cc:dd:ee +#1:rx_udpport 50004 +#1:rx_udpip 10.1.2.1 +#1:rx_hostname 129.129.202.134 +1:outdir /data/speedt +1:vhighvoltage 120 + + +master -1 +sync none +outdir /data/speedt +ffdir /home/l_msdetect +headerbefore none +headerafter none +headerbeforepar none +headerafterpar none +badchannels none +angconv none +globaloff 0.000000 +binsize 0.001000 +threaded 1