mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 11:20:04 +02:00
makefile changed
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorsPackage@28 08cae9ef-cb74-4d14-b03a-d7ea46f178d7
This commit is contained in:
parent
bc1c3522d8
commit
2ba3823c69
123
Makefile
123
Makefile
@ -5,87 +5,120 @@ WD=$(shell pwd)
|
|||||||
LIBRARYDIR=$(WD)/slsDetectorSoftware
|
LIBRARYDIR=$(WD)/slsDetectorSoftware
|
||||||
CLIENTDIR=$(WD)/slsDetectorClient
|
CLIENTDIR=$(WD)/slsDetectorClient
|
||||||
GUIDIR=$(WD)/slsDetectorGuiOriginal
|
GUIDIR=$(WD)/slsDetectorGuiOriginal
|
||||||
LIBDOCDIR=$(WD)/slsDetectorSoftware
|
|
||||||
RECEIVERDIR=$(LIBRARYDIR)/slsReceiver
|
RECEIVERDIR=$(LIBRARYDIR)/slsReceiver
|
||||||
|
CALWIZDIR=$(WD)/calibrationWizards
|
||||||
|
MANDIR=$(WD)/manual
|
||||||
|
|
||||||
|
INSTALLROOT?=$(PWD)
|
||||||
|
BINDIR?=$(INSTALLROOT)/bin
|
||||||
|
DOCDIR?=$(INSTALLROOT)/docs
|
||||||
|
LIBDIR?=$(INSTALLROOT)/bin
|
||||||
|
INCDIR?=$(INSTALLROOT)/include
|
||||||
|
|
||||||
|
|
||||||
|
LDFLAG='-L$(LIBDIR) -lSlsDetector'
|
||||||
|
|
||||||
#FLAGS=-DVERBOSE
|
#FLAGS=-DVERBOSE
|
||||||
|
ASM=$(shell echo "/lib/modules/`uname -r`/build/include")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
all: lib slsDetectorClient_static slsReceiver slsDetectorGUI
|
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$(ASM)'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
all: lib slsDetectorClient slsReceiver gui
|
||||||
|
|
||||||
nonstatic: lib slsDetectorClient slsReceiver slsDetectorGUI
|
nonstatic: lib slsDetectorClient slsReceiver slsDetectorGUI
|
||||||
|
|
||||||
lib:
|
lib:
|
||||||
cd $(LIBRARYDIR) && $(MAKE) lib FLAGS=$(FLAGS)
|
echo "compile lib"
|
||||||
|
cd $(LIBRARYDIR) && $(MAKE) FLAGS=$(FLAGS) DESTDIR=$(LIBDIR) INCLUDES='-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$(ASM)'
|
||||||
|
|
||||||
slsDetectorClient_static: lib
|
slsDetectorClient_static: lib
|
||||||
cd $(CLIENTDIR) && $(MAKE) FLAGS=$(FLAGS)
|
cd $(CLIENTDIR) && $(MAKE) FLAGS=$(FLAGS) LDFLAG=$(LDFLAG) DESTDIR=$(DESTDIR) LIBDIR=$(LIBDIR) INCLUDES=$(INCLUDES)
|
||||||
$(shell test -d bin || mkdir -p bin)
|
|
||||||
mv $(CLIENTDIR)/bin/* bin/
|
|
||||||
|
|
||||||
|
|
||||||
slsDetectorClient: lib
|
slsDetectorClient: lib
|
||||||
cd $(CLIENTDIR) && $(MAKE) nonstatic FLAGS=$(FLAGS)
|
echo "compile client"
|
||||||
$(shell test -d bin || mkdir -p bin)
|
cd $(CLIENTDIR) && $(MAKE) FLAGS=$(FLAGS) DESTDIR=$(BINDIR) LIBDIR=$(LIBDIR) LIBS=$(LDFLAG) INCLUDES=$(INCLUDES)
|
||||||
mv $(CLIENTDIR)/bin/* bin/
|
|
||||||
|
|
||||||
slsReceiver: lib
|
slsReceiver: lib
|
||||||
cd $(RECEIVERDIR) && $(MAKE) FLAGS=$(FLAGS)
|
echo "compile receiver"
|
||||||
$(shell test -d bin || mkdir -p bin)
|
cd $(RECEIVERDIR) && $(MAKE) FLAGS=$(FLAGS) DESTDIR=$(BINDIR) LIBDIR=$(LIBDIR) LIBS=$(LDFLAG) INCLUDES=$(INCLUDES)
|
||||||
mv $(RECEIVERDIR)/bin/* bin/
|
|
||||||
|
|
||||||
|
|
||||||
slsDetectorGUI: lib
|
slsDetectorGUI: lib
|
||||||
cd $(GUIDIR) && $(MAKE) FLAGS=$(FLAGS)
|
echo $(LDFLAG)
|
||||||
$(shell test -d bin || mkdir -p bin)
|
cd $(GUIDIR) && $(MAKE) FLAGS=$(FLAGS) LDFLAG=$(LDFLAG) DESTDIR=$(BINDIR) LIBDIR=$(LIBDIR) INCLUDES=$(INCLUDES)
|
||||||
mv $(GUIDIR)/bin/* bin/
|
|
||||||
|
|
||||||
calWiz:
|
calWiz:
|
||||||
cd calibrationWizards && $(MAKE) FLAGS=$(FLAGS)
|
cd $(CALWIZDIR) && $(MAKE) FLAGS=$(FLAGS) LDFLAG=$(LDFLAG) DESTDIR=$(BINDIR) INCLUDES=$(INCLUDES)
|
||||||
$(shell test -d bin || mkdir -p bin)
|
|
||||||
mv calibrationWizards/energyCalibrationWizard calibrationWizards/angularCalibrationWizard bin/
|
|
||||||
cp calibrationWizards/manual/*.pdf manual/
|
|
||||||
|
gui: slsDetectorGUI
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
doc:
|
||||||
|
$(shell test -d $(DOCDIR) || mkdir -p $(DOCDIR))
|
||||||
|
$(shell test -d $(DOCDIR)/pdf || mkdir -p $(DOCDIR)/pdf)
|
||||||
|
cd $(LIBRARYDIR) && make doc DOCDIR=$(DOCDIR)
|
||||||
|
cd $(CLIENTDIR) && make doc DOCDIR=$(DOCDIR)
|
||||||
|
cd $(GUIDIR) && make doc DOCDIR=$(DOCDIR)
|
||||||
|
cd $(CALWIZDIR) && make doc DESTDIR=$(DOCDIR)
|
||||||
|
cd $(MANDIR) && make DESTDIR=$(DOCDIR)
|
||||||
|
|
||||||
|
htmldoc:
|
||||||
|
make doc
|
||||||
|
$(shell test -d $(DOCDIR) || mkdir -p $(DOCDIR))
|
||||||
|
$(shell test -d $(DOCDIR)/html || mkdir -p $(DOCDIR)/html)
|
||||||
|
cd $(LIBRARYDIR) && make htmldoc DOCDIR=$(DOCDIR)
|
||||||
|
cd $(CLIENTDIR) && make htmldoc DOCDIR=$(DOCDIR)
|
||||||
|
cd $(GUIDIR) && make htmldoc DOCDIR=$(DOCDIR)
|
||||||
|
cd $(CALWIZDIR) && make htmldoc DESTDIR=$(DOCDIR)
|
||||||
|
cd $(MANDIR) && make html DESTDIR=$(DOCDIR)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf bin/sls_detector_* bin/slsDetectorGui bin/slsReceiver
|
cd $(BINDIR) && rm -rf sls_detector_* slsDetectorGui slsReceiver angularCalibrationWizard energyCalibrationWizard
|
||||||
|
cd $(LIBDIR) && rm -rf libSlsDetector.so libSlsDetector.a
|
||||||
cd $(LIBRARYDIR) && $(MAKE) clean
|
cd $(LIBRARYDIR) && $(MAKE) clean
|
||||||
cd $(CLIENTDIR) && $(MAKE) clean
|
cd $(CLIENTDIR) && $(MAKE) clean
|
||||||
cd $(GUIDIR) && $(MAKE) clean
|
cd $(GUIDIR) && $(MAKE) clean
|
||||||
cd $(RECEIVERDIR) && $(MAKE) clean
|
cd $(RECEIVERDIR) && $(MAKE) clean
|
||||||
cd calibrationWizards && $(MAKE) clean
|
cd $(CALWIZDIR) && $(MAKE) clean
|
||||||
|
cd $(MANDIR) && $(MAKE) clean
|
||||||
|
cd $(DOCDIR) && rm -rf *
|
||||||
|
|
||||||
install_lib:
|
install_lib:
|
||||||
cd $(LIBRARYDIR) && $(MAKE) install_lib DESTDIR=$(INSTALLROOT)/$(LIBDIR)
|
cd $(LIBRARYDIR) && $(MAKE) install DESTDIR=$(LIBDIR)
|
||||||
cd $(LIBRARYDIR) && $(MAKE) install_inc DESTDIR=$(INSTALLROOT)/$(INCDIR)
|
cd $(LIBRARYDIR) && $(MAKE) install_inc DESTDIR=$(INCDIR)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
install_client:
|
install_client:
|
||||||
cd $(CLIENTDIR) && $(MAKE) install DESTDIR=$(INSTALLROOT)/$(BINDIR)
|
cd $(CLIENTDIR) && $(MAKE) install DESTDIR=$(BINDIR)
|
||||||
|
|
||||||
|
|
||||||
install_libdoc: lib_doc
|
|
||||||
cd $(LIBDOCDIR) && $(MAKE) install_doc DESTDIR=$(INSTALLROOT)/$(DOCDIR)/slsDetector
|
|
||||||
|
|
||||||
install_clientdoc:
|
install:
|
||||||
cd $(CLIENTDIR) && $(MAKE) install_doc DESTDIR=$(INSTALLROOT)/$(DOCDIR)/slsDetectorClient
|
set -e; \
|
||||||
|
. ./configure; \
|
||||||
lib_doc:
|
make conf;\
|
||||||
cd $(LIBDOCDIR) && $(MAKE) doc
|
make install_lib;\
|
||||||
|
make install_client ; \
|
||||||
install_doc: install_libdoc install_clientdoc
|
make install_gui; \
|
||||||
cp -r manual $(INSTALLROOT)/$(DOCDIR)/
|
make install_calwiz; \
|
||||||
|
make install_doc; \
|
||||||
|
make install_htmldoc; \
|
||||||
install: conf install_lib install_client install_doc
|
|
||||||
|
|
||||||
|
|
||||||
conf:
|
conf:
|
||||||
@echo "QTDIR is $(QTDIR)"
|
|
||||||
@echo "ROOTSYS is $(ROOTSYS)"
|
|
||||||
@echo "INSTALLROOT is $(INSTALLROOT)"
|
@echo "INSTALLROOT is $(INSTALLROOT)"
|
||||||
@echo "BINDIR is $(BINDIR)"
|
@echo "BINDIR is $(BINDIR)"
|
||||||
@echo "LIBDIR is $(LIBDIR)"
|
@echo "LIBDIR is $(LIBDIR)"
|
||||||
@ -93,6 +126,7 @@ conf:
|
|||||||
@echo "DOCDIR is $(DOCDIR)"
|
@echo "DOCDIR is $(DOCDIR)"
|
||||||
|
|
||||||
tar:
|
tar:
|
||||||
|
make clean
|
||||||
cd .. && tar czf newMythenSoftware.tgz newMythenSoftware
|
cd .. && tar czf newMythenSoftware.tgz newMythenSoftware
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@ -100,8 +134,13 @@ help:
|
|||||||
@echo "make all compile library, and text client"
|
@echo "make all compile library, and text client"
|
||||||
@echo "make lib compile library"
|
@echo "make lib compile library"
|
||||||
@echo "make slsDetectorClient compile slsDetectorClient"
|
@echo "make slsDetectorClient compile slsDetectorClient"
|
||||||
|
@echo "make nonstatic compile the slsDetectorClient dynamically linking the libraries"
|
||||||
@echo "make slsDetectorGUI compile slsDetectorGUI - requires a working Qt4 and Qwt installation"
|
@echo "make slsDetectorGUI compile slsDetectorGUI - requires a working Qt4 and Qwt installation"
|
||||||
@echo "make calWiz compile the calibration wizards - requires a working root installation"
|
@echo "make calWiz compile the calibration wizards - requires a working root installation"
|
||||||
|
@echo "make doc compile pdf documentation"
|
||||||
|
@echo "make htmldoc compile html documentation"
|
||||||
|
@echo ""
|
||||||
|
@echo "conf list the install variables"
|
||||||
@echo "make install_client install slsDetectorClient"
|
@echo "make install_client install slsDetectorClient"
|
||||||
@echo "make install_lib install detector library and include files"
|
@echo "make install_lib install detector library and include files"
|
||||||
@echo "make install install library, include files, slsDetectorClient"
|
@echo "make install install library, include files, slsDetectorClient"
|
||||||
@ -111,8 +150,8 @@ help:
|
|||||||
@echo "make clean remove object files and executables"
|
@echo "make clean remove object files and executables"
|
||||||
@echo "make help lists possible targets"
|
@echo "make help lists possible targets"
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "Variables:"
|
@echo "Variables - to change them run <source configure> :"
|
||||||
@echo "INSTALLROOT=</yourdir>: installation root dir, default /usr/local"
|
@echo "INSTALLROOT=<yourdir>: installation root dir, default /usr/local"
|
||||||
@echo "BINDIR=<yourbin>: binary installation dir below INSTALLROOT, default bin"
|
@echo "BINDIR=<yourbin>: binary installation dir below INSTALLROOT, default bin"
|
||||||
@echo "LIBDIR=<yourlib>: library installation dir below INSTALLROOT, default lib"
|
@echo "LIBDIR=<yourlib>: library installation dir below INSTALLROOT, default lib"
|
||||||
@echo "INCDIR=<yourincludes>: header installation dir below INSTALLROOT, default include/slsdetector"
|
@echo "INCDIR=<yourincludes>: header installation dir below INSTALLROOT, default include/slsdetector"
|
||||||
|
4
configure
vendored
4
configure
vendored
@ -33,7 +33,7 @@ fi
|
|||||||
echo "LIBDIR will be \"$LIBDIR\""
|
echo "LIBDIR will be \"$LIBDIR\""
|
||||||
export LIBDIR
|
export LIBDIR
|
||||||
|
|
||||||
: ${INCDIR="include/slsDetector"}
|
: ${INCDIR="include"}
|
||||||
read -p "Includes directory [default:\"$INCDIR\"]:" -e t6
|
read -p "Includes directory [default:\"$INCDIR\"]:" -e t6
|
||||||
if [ -z "$t6" ]
|
if [ -z "$t6" ]
|
||||||
then
|
then
|
||||||
@ -44,7 +44,7 @@ fi
|
|||||||
echo "INCDIR will be \"$INCDIR\""
|
echo "INCDIR will be \"$INCDIR\""
|
||||||
export INCDIR
|
export INCDIR
|
||||||
|
|
||||||
: ${DOCDIR="share/doc"}
|
: ${DOCDIR="doc"}
|
||||||
read -p "Documentation directory [default:\"$DOCDIR\"]:" -e t7
|
read -p "Documentation directory [default:\"$DOCDIR\"]:" -e t7
|
||||||
if [ -z "$t7" ]
|
if [ -z "$t7" ]
|
||||||
then
|
then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user