mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 23:30:03 +02:00
makefile again
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorsPackage@29 08cae9ef-cb74-4d14-b03a-d7ea46f178d7
This commit is contained in:
parent
2ba3823c69
commit
b32937f541
97
Makefile
97
Makefile
@ -1,5 +1,6 @@
|
|||||||
# do not change below this line
|
# 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$(ASM)'
|
||||||
|
|
||||||
WD=$(shell pwd)
|
WD=$(shell pwd)
|
||||||
LIBRARYDIR=$(WD)/slsDetectorSoftware
|
LIBRARYDIR=$(WD)/slsDetectorSoftware
|
||||||
@ -16,7 +17,7 @@ LIBDIR?=$(INSTALLROOT)/bin
|
|||||||
INCDIR?=$(INSTALLROOT)/include
|
INCDIR?=$(INSTALLROOT)/include
|
||||||
|
|
||||||
|
|
||||||
LDFLAG='-L$(LIBDIR) -lSlsDetector'
|
LDFLAG:='-L$(LIBDIR) -lSlsDetector'
|
||||||
|
|
||||||
#FLAGS=-DVERBOSE
|
#FLAGS=-DVERBOSE
|
||||||
ASM=$(shell echo "/lib/modules/`uname -r`/build/include")
|
ASM=$(shell echo "/lib/modules/`uname -r`/build/include")
|
||||||
@ -27,30 +28,31 @@ INCLUDES='-I. -I$(LIBRARYDIR)/commonFiles -I$(LIBRARYDIR)/slsDetector -I$(LIBRAR
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
all: lib slsDetectorClient slsReceiver gui
|
all: lib textclient slsReceiver gui
|
||||||
|
|
||||||
nonstatic: lib slsDetectorClient slsReceiver slsDetectorGUI
|
nonstatic: lib slsDetectorClient slsReceiver slsDetectorGUI
|
||||||
|
|
||||||
lib:
|
lib:
|
||||||
echo "compile lib"
|
cd $(LIBRARYDIR) && $(MAKE) FLAGS=$(FLAGS) DESTDIR=$(LIBDIR) INCLUDES=$(INCLUDES)
|
||||||
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)'
|
|
||||||
|
stextclient: slsDetectorClient_static
|
||||||
|
|
||||||
slsDetectorClient_static: lib
|
slsDetectorClient_static: lib
|
||||||
cd $(CLIENTDIR) && $(MAKE) FLAGS=$(FLAGS) LDFLAG=$(LDFLAG) DESTDIR=$(DESTDIR) LIBDIR=$(LIBDIR) INCLUDES=$(INCLUDES)
|
cd $(CLIENTDIR) && $(MAKE) static_clients FLAGS=$(FLAGS) LDFLAG=$(LDFLAG) DESTDIR=$(BINDIR) LIBDIR=$(LIBDIR) INCLUDES=$(INCLUDES)
|
||||||
|
|
||||||
|
|
||||||
slsDetectorClient: lib
|
textclient:
|
||||||
echo "compile client"
|
|
||||||
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: lib
|
slsReceiver: lib
|
||||||
echo "compile receiver"
|
|
||||||
cd $(RECEIVERDIR) && $(MAKE) FLAGS=$(FLAGS) DESTDIR=$(BINDIR) LIBDIR=$(LIBDIR) LIBS=$(LDFLAG) INCLUDES=$(INCLUDES)
|
cd $(RECEIVERDIR) && $(MAKE) FLAGS=$(FLAGS) DESTDIR=$(BINDIR) LIBDIR=$(LIBDIR) LIBS=$(LDFLAG) INCLUDES=$(INCLUDES)
|
||||||
|
|
||||||
|
|
||||||
|
receiver: slsReceiver
|
||||||
|
|
||||||
slsDetectorGUI: lib
|
slsDetectorGUI: lib
|
||||||
echo $(LDFLAG)
|
echo $(LDFLAG)
|
||||||
cd $(GUIDIR) && $(MAKE) FLAGS=$(FLAGS) LDFLAG=$(LDFLAG) DESTDIR=$(BINDIR) LIBDIR=$(LIBDIR) INCLUDES=$(INCLUDES)
|
cd $(GUIDIR) && $(MAKE) FLAGS=$(FLAGS) LDFLAG='-L$(LIBDIR) -lSlsDetector' DESTDIR=$(BINDIR) LIBDIR=$(LIBDIR) INCLUDES=$(INCLUDES)
|
||||||
|
|
||||||
calWiz:
|
calWiz:
|
||||||
cd $(CALWIZDIR) && $(MAKE) FLAGS=$(FLAGS) LDFLAG=$(LDFLAG) DESTDIR=$(BINDIR) INCLUDES=$(INCLUDES)
|
cd $(CALWIZDIR) && $(MAKE) FLAGS=$(FLAGS) LDFLAG=$(LDFLAG) DESTDIR=$(BINDIR) INCLUDES=$(INCLUDES)
|
||||||
@ -60,11 +62,6 @@ calWiz:
|
|||||||
gui: slsDetectorGUI
|
gui: slsDetectorGUI
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
doc:
|
doc:
|
||||||
$(shell test -d $(DOCDIR) || mkdir -p $(DOCDIR))
|
$(shell test -d $(DOCDIR) || mkdir -p $(DOCDIR))
|
||||||
$(shell test -d $(DOCDIR)/pdf || mkdir -p $(DOCDIR)/pdf)
|
$(shell test -d $(DOCDIR)/pdf || mkdir -p $(DOCDIR)/pdf)
|
||||||
@ -95,30 +92,38 @@ clean:
|
|||||||
cd $(MANDIR) && $(MAKE) clean
|
cd $(MANDIR) && $(MAKE) clean
|
||||||
cd $(DOCDIR) && rm -rf *
|
cd $(DOCDIR) && rm -rf *
|
||||||
|
|
||||||
install_lib:
|
install_lib:
|
||||||
cd $(LIBRARYDIR) && $(MAKE) install DESTDIR=$(LIBDIR)
|
cd $(LIBRARYDIR) && $(MAKE) install DESTDIR=$(LIBDIR) INCLUDES=$(INCLUDES)
|
||||||
cd $(LIBRARYDIR) && $(MAKE) install_inc DESTDIR=$(INCDIR)
|
cd $(LIBRARYDIR) && $(MAKE) install_inc DESTDIR=$(INCDIR)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
install_client:
|
install_client: textclient slsReceiver
|
||||||
cd $(CLIENTDIR) && $(MAKE) install DESTDIR=$(BINDIR)
|
|
||||||
|
|
||||||
|
install_gui: gui
|
||||||
|
|
||||||
|
confinstall:
|
||||||
install:
|
|
||||||
set -e; \
|
|
||||||
. ./configure; \
|
|
||||||
make conf;\
|
make conf;\
|
||||||
make install_lib;\
|
make install
|
||||||
make install_client ; \
|
|
||||||
make install_gui; \
|
install_lib:
|
||||||
make install_calwiz; \
|
make lib;\
|
||||||
make install_doc; \
|
make textclient; \
|
||||||
make install_htmldoc; \
|
make slsReceiver; \
|
||||||
|
make doc; \
|
||||||
|
make htmldoc; \
|
||||||
|
cd $(LIBRARYDIR) && $(MAKE) install_inc DESTDIR=$(INCDIR);
|
||||||
|
|
||||||
|
install:
|
||||||
|
make install_lib; \
|
||||||
|
make gui; \
|
||||||
|
make calWiz; \
|
||||||
|
cd $(LIBRARYDIR) && $(MAKE) install_inc DESTDIR=$(INCDIR);
|
||||||
|
|
||||||
|
|
||||||
conf:
|
conf:
|
||||||
|
set -e; \
|
||||||
|
. ./configure; \
|
||||||
@echo "INSTALLROOT is $(INSTALLROOT)"
|
@echo "INSTALLROOT is $(INSTALLROOT)"
|
||||||
@echo "BINDIR is $(BINDIR)"
|
@echo "BINDIR is $(BINDIR)"
|
||||||
@echo "LIBDIR is $(LIBDIR)"
|
@echo "LIBDIR is $(LIBDIR)"
|
||||||
@ -131,28 +136,26 @@ tar:
|
|||||||
|
|
||||||
help:
|
help:
|
||||||
@echo "Targets:"
|
@echo "Targets:"
|
||||||
@echo "make all compile library, and text client"
|
@echo "make all compile library, text clients, data reciever"
|
||||||
@echo "make lib compile library"
|
@echo "make lib compile library"
|
||||||
@echo "make slsDetectorClient compile slsDetectorClient"
|
@echo "make client compile the slsDetectorClient dynamically linking the libraries"
|
||||||
@echo "make nonstatic compile the slsDetectorClient dynamically linking the libraries"
|
@echo "make sclient compile slsDetectorClient statically linking the libraries"
|
||||||
@echo "make slsDetectorGUI compile slsDetectorGUI - requires a working Qt4 and Qwt installation"
|
@echo "make receiver compile the slsReciever dynamically linking the libraries"
|
||||||
@echo "make calWiz compile the calibration wizards - requires a working root installation"
|
@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 doc compile pdf documentation"
|
||||||
@echo "make htmldoc compile html documentation"
|
@echo "make htmldoc compile html (and pdf) documentation"
|
||||||
@echo ""
|
@echo "make install_lib installs the libraries, the text clients, the documentation and the includes for the API"
|
||||||
@echo "conf list the install variables"
|
@echo "make install installs all software, including the gui, the cal wizards and the includes for the API"
|
||||||
@echo "make install_client install slsDetectorClient"
|
@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 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 clean remove object files and executables"
|
||||||
@echo "make help lists possible targets"
|
@echo "make help lists possible targets"
|
||||||
|
@echo "make tar makes a compressed tar of the software package"
|
||||||
|
@echo ""
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "Variables - to change them run <source configure> :"
|
@echo "Variables - to change them run <source configure> :"
|
||||||
@echo "INSTALLROOT=<yourdir>: installation root dir, default /usr/local"
|
@echo "INSTALLROOT=<yourdir>: installation root di r, default $PWD"
|
||||||
@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"
|
||||||
@echo "DOCDIR=<yourdoc>: documentation installation dir below INSTALLROOT, default share/doc"
|
@echo "DOCDIR=<yourdoc>: documentation installation dir below INSTALLROOT, default doc"
|
||||||
|
20
configure
vendored
20
configure
vendored
@ -1,6 +1,6 @@
|
|||||||
##!/bin/bash
|
##!/bin/bash
|
||||||
|
|
||||||
: ${INSTALLROOT="/usr/local/"}
|
: ${INSTALLROOT=$PWD}
|
||||||
read -p "Installation directory [default:\"$INSTALLROOT\"]:" -e t3
|
read -p "Installation directory [default:\"$INSTALLROOT\"]:" -e t3
|
||||||
if [ -z "$t3" ]
|
if [ -z "$t3" ]
|
||||||
then
|
then
|
||||||
@ -15,20 +15,20 @@ export INSTALLROOT
|
|||||||
read -p "Binaries directory [default:\"$BINDIR\"]:" -e t4
|
read -p "Binaries directory [default:\"$BINDIR\"]:" -e t4
|
||||||
if [ -z "$t4" ]
|
if [ -z "$t4" ]
|
||||||
then
|
then
|
||||||
echo
|
BINDIR=$INSTALLROOT/$BINDIR
|
||||||
else
|
else
|
||||||
BINDIR=$t4
|
BINDIR=$INSTALLROOT/$t4
|
||||||
fi
|
fi
|
||||||
echo "BINDIR will be \"$BINDIR\""
|
echo "BINDIR will be \"$BINDIR\""
|
||||||
export BINDIR
|
export BINDIR
|
||||||
|
|
||||||
: ${LIBDIR="lib"}
|
: ${LIBDIR="bin"}
|
||||||
read -p "Libraries directory [default:\"$LIBDIR\"]:" -e t5
|
read -p "Libraries directory [default:\"$LIBDIR\"]:" -e t5
|
||||||
if [ -z "$t5" ]
|
if [ -z "$t5" ]
|
||||||
then
|
then
|
||||||
echo
|
LIBDIR=$INSTALLROOT/$LIBDIR
|
||||||
else
|
else
|
||||||
LIBDIR=$t5
|
LIBDIR=$INSTALLROOT/$t5
|
||||||
fi
|
fi
|
||||||
echo "LIBDIR will be \"$LIBDIR\""
|
echo "LIBDIR will be \"$LIBDIR\""
|
||||||
export LIBDIR
|
export LIBDIR
|
||||||
@ -37,9 +37,9 @@ export LIBDIR
|
|||||||
read -p "Includes directory [default:\"$INCDIR\"]:" -e t6
|
read -p "Includes directory [default:\"$INCDIR\"]:" -e t6
|
||||||
if [ -z "$t6" ]
|
if [ -z "$t6" ]
|
||||||
then
|
then
|
||||||
echo
|
INCDIR=$INSTALLROOT/$INCDIR
|
||||||
else
|
else
|
||||||
INCDIR=$t6
|
INCDIR=$INSTALLROOT/$t6
|
||||||
fi
|
fi
|
||||||
echo "INCDIR will be \"$INCDIR\""
|
echo "INCDIR will be \"$INCDIR\""
|
||||||
export INCDIR
|
export INCDIR
|
||||||
@ -48,9 +48,9 @@ export INCDIR
|
|||||||
read -p "Documentation directory [default:\"$DOCDIR\"]:" -e t7
|
read -p "Documentation directory [default:\"$DOCDIR\"]:" -e t7
|
||||||
if [ -z "$t7" ]
|
if [ -z "$t7" ]
|
||||||
then
|
then
|
||||||
echo
|
DOCDIR=$INSTALLROOT/$DOCDIR
|
||||||
else
|
else
|
||||||
DOCDIR=$t7
|
DOCDIR=$INSTALLROOT/$t7
|
||||||
fi
|
fi
|
||||||
echo "DOCDIR will be \"$DOCDIR\""
|
echo "DOCDIR will be \"$DOCDIR\""
|
||||||
export DOCDIR
|
export DOCDIR
|
||||||
|
Loading…
x
Reference in New Issue
Block a user