mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 03:10:02 +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
149
Makefile
149
Makefile
@ -5,87 +5,120 @@ WD=$(shell pwd)
|
||||
LIBRARYDIR=$(WD)/slsDetectorSoftware
|
||||
CLIENTDIR=$(WD)/slsDetectorClient
|
||||
GUIDIR=$(WD)/slsDetectorGuiOriginal
|
||||
LIBDOCDIR=$(WD)/slsDetectorSoftware
|
||||
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
|
||||
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
|
||||
|
||||
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
|
||||
cd $(CLIENTDIR) && $(MAKE) FLAGS=$(FLAGS)
|
||||
$(shell test -d bin || mkdir -p bin)
|
||||
mv $(CLIENTDIR)/bin/* bin/
|
||||
cd $(CLIENTDIR) && $(MAKE) FLAGS=$(FLAGS) LDFLAG=$(LDFLAG) DESTDIR=$(DESTDIR) LIBDIR=$(LIBDIR) INCLUDES=$(INCLUDES)
|
||||
|
||||
|
||||
slsDetectorClient: lib
|
||||
cd $(CLIENTDIR) && $(MAKE) nonstatic FLAGS=$(FLAGS)
|
||||
$(shell test -d bin || mkdir -p bin)
|
||||
mv $(CLIENTDIR)/bin/* bin/
|
||||
echo "compile client"
|
||||
cd $(CLIENTDIR) && $(MAKE) FLAGS=$(FLAGS) DESTDIR=$(BINDIR) LIBDIR=$(LIBDIR) LIBS=$(LDFLAG) INCLUDES=$(INCLUDES)
|
||||
|
||||
slsReceiver: lib
|
||||
cd $(RECEIVERDIR) && $(MAKE) FLAGS=$(FLAGS)
|
||||
$(shell test -d bin || mkdir -p bin)
|
||||
mv $(RECEIVERDIR)/bin/* bin/
|
||||
echo "compile receiver"
|
||||
cd $(RECEIVERDIR) && $(MAKE) FLAGS=$(FLAGS) DESTDIR=$(BINDIR) LIBDIR=$(LIBDIR) LIBS=$(LDFLAG) INCLUDES=$(INCLUDES)
|
||||
|
||||
|
||||
slsDetectorGUI: lib
|
||||
cd $(GUIDIR) && $(MAKE) FLAGS=$(FLAGS)
|
||||
$(shell test -d bin || mkdir -p bin)
|
||||
mv $(GUIDIR)/bin/* bin/
|
||||
echo $(LDFLAG)
|
||||
cd $(GUIDIR) && $(MAKE) FLAGS=$(FLAGS) LDFLAG=$(LDFLAG) DESTDIR=$(BINDIR) LIBDIR=$(LIBDIR) INCLUDES=$(INCLUDES)
|
||||
|
||||
calWiz:
|
||||
cd calibrationWizards && $(MAKE) FLAGS=$(FLAGS)
|
||||
$(shell test -d bin || mkdir -p bin)
|
||||
mv calibrationWizards/energyCalibrationWizard calibrationWizards/angularCalibrationWizard bin/
|
||||
cp calibrationWizards/manual/*.pdf manual/
|
||||
cd $(CALWIZDIR) && $(MAKE) FLAGS=$(FLAGS) LDFLAG=$(LDFLAG) DESTDIR=$(BINDIR) INCLUDES=$(INCLUDES)
|
||||
|
||||
|
||||
|
||||
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:
|
||||
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 $(CLIENTDIR) && $(MAKE) clean
|
||||
cd $(GUIDIR) && $(MAKE) clean
|
||||
cd $(RECEIVERDIR) && $(MAKE) clean
|
||||
cd calibrationWizards && $(MAKE) clean
|
||||
cd $(CALWIZDIR) && $(MAKE) clean
|
||||
cd $(MANDIR) && $(MAKE) clean
|
||||
cd $(DOCDIR) && rm -rf *
|
||||
|
||||
install_lib:
|
||||
cd $(LIBRARYDIR) && $(MAKE) install_lib DESTDIR=$(INSTALLROOT)/$(LIBDIR)
|
||||
cd $(LIBRARYDIR) && $(MAKE) install_inc DESTDIR=$(INSTALLROOT)/$(INCDIR)
|
||||
cd $(LIBRARYDIR) && $(MAKE) install DESTDIR=$(LIBDIR)
|
||||
cd $(LIBRARYDIR) && $(MAKE) install_inc DESTDIR=$(INCDIR)
|
||||
|
||||
|
||||
|
||||
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:
|
||||
cd $(CLIENTDIR) && $(MAKE) install_doc DESTDIR=$(INSTALLROOT)/$(DOCDIR)/slsDetectorClient
|
||||
|
||||
lib_doc:
|
||||
cd $(LIBDOCDIR) && $(MAKE) doc
|
||||
|
||||
install_doc: install_libdoc install_clientdoc
|
||||
cp -r manual $(INSTALLROOT)/$(DOCDIR)/
|
||||
|
||||
|
||||
install: conf install_lib install_client install_doc
|
||||
install:
|
||||
set -e; \
|
||||
. ./configure; \
|
||||
make conf;\
|
||||
make install_lib;\
|
||||
make install_client ; \
|
||||
make install_gui; \
|
||||
make install_calwiz; \
|
||||
make install_doc; \
|
||||
make install_htmldoc; \
|
||||
|
||||
|
||||
conf:
|
||||
@echo "QTDIR is $(QTDIR)"
|
||||
@echo "ROOTSYS is $(ROOTSYS)"
|
||||
@echo "INSTALLROOT is $(INSTALLROOT)"
|
||||
@echo "BINDIR is $(BINDIR)"
|
||||
@echo "LIBDIR is $(LIBDIR)"
|
||||
@ -93,26 +126,32 @@ conf:
|
||||
@echo "DOCDIR is $(DOCDIR)"
|
||||
|
||||
tar:
|
||||
make clean
|
||||
cd .. && tar czf newMythenSoftware.tgz newMythenSoftware
|
||||
|
||||
help:
|
||||
@echo "Targets:"
|
||||
@echo "make all compile library, and text client"
|
||||
@echo "make lib compile library"
|
||||
@echo "make slsDetectorClient compile slsDetectorClient"
|
||||
@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 install_client install slsDetectorClient"
|
||||
@echo "make install_lib install detector library and include files"
|
||||
@echo "make install install library, include files, slsDetectorClient"
|
||||
@echo "make install_libdoc install library documentaion"
|
||||
@echo "make install_clientdoc install mythenClient documentation"
|
||||
@echo "make install_doc install all documentation"
|
||||
@echo "make clean remove object files and executables"
|
||||
@echo "make help lists possible targets"
|
||||
@echo "make all compile library, and text client"
|
||||
@echo "make lib compile library"
|
||||
@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 calWiz compile the calibration wizards - requires a working root installation"
|
||||
@echo "make doc compile pdf documentation"
|
||||
@echo "make htmldoc compile html documentation"
|
||||
@echo ""
|
||||
@echo "Variables:"
|
||||
@echo "INSTALLROOT=</yourdir>: installation root dir, default /usr/local"
|
||||
@echo "conf list the install variables"
|
||||
@echo "make install_client install slsDetectorClient"
|
||||
@echo "make install_lib install detector library and include files"
|
||||
@echo "make install install library, include files, slsDetectorClient"
|
||||
@echo "make install_libdoc install library documentaion"
|
||||
@echo "make install_clientdoc install mythenClient documentation"
|
||||
@echo "make install_doc install all documentation"
|
||||
@echo "make clean remove object files and executables"
|
||||
@echo "make help lists possible targets"
|
||||
@echo ""
|
||||
@echo "Variables - to change them run <source configure> :"
|
||||
@echo "INSTALLROOT=<yourdir>: installation root dir, default /usr/local"
|
||||
@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/slsdetector"
|
||||
|
4
configure
vendored
4
configure
vendored
@ -33,7 +33,7 @@ fi
|
||||
echo "LIBDIR will be \"$LIBDIR\""
|
||||
export LIBDIR
|
||||
|
||||
: ${INCDIR="include/slsDetector"}
|
||||
: ${INCDIR="include"}
|
||||
read -p "Includes directory [default:\"$INCDIR\"]:" -e t6
|
||||
if [ -z "$t6" ]
|
||||
then
|
||||
@ -44,7 +44,7 @@ fi
|
||||
echo "INCDIR will be \"$INCDIR\""
|
||||
export INCDIR
|
||||
|
||||
: ${DOCDIR="share/doc"}
|
||||
: ${DOCDIR="doc"}
|
||||
read -p "Documentation directory [default:\"$DOCDIR\"]:" -e t7
|
||||
if [ -z "$t7" ]
|
||||
then
|
||||
|
Loading…
x
Reference in New Issue
Block a user