diff --git a/NPLib/Makefile b/NPLib/Makefile index b1e26ad54077c6eed1114ef2aab5da1972c2983b..6222f84cf8460e955606c9dd14cec5d317b8a2cd 100644 --- a/NPLib/Makefile +++ b/NPLib/Makefile @@ -9,10 +9,9 @@ FILLINC = FillIncludeDir FILLLIB = FillLibraryDir LIBLIST = liblistfile - #Silence the process all: .SILENT -.SILENT: $(SHARELIB) $(FILLLIB) $(LIBLIST) +.SILENT: $(SHARELIB) $(LIBLIST) #------------------------------------------------------------------------------ ############### fillinclib ############## @@ -20,7 +19,6 @@ FillIncludeDir: ./scripts/fillincdir.sh FillLibraryDir: $(SHARELIB) $(FILLINC) - ./scripts/filllibdir.sh ifeq ($(findstring macosx, $(ARCH)), macosx) ./scripts/filllibmacdir.sh endif @@ -34,23 +32,24 @@ liblistfile: $(FILLLIB) $(SHARELIB) $(FILLIB) # where the wanted detector are defined include $(NPTOOL)/NPLib/Makefile.detector - ############# Clean and More ########## -clean: cleandetector cleancore - -cleancore: - $(NPTOOL)/NPLib/scripts/makefile.sh clean core +clean: + rm -f ./*/*.o -cleandetector: - $(NPTOOL)/NPLib/scripts/makefile.sh clean detector - distclean: - @echo " + Deleting libraries in lib directory....." + @echo " + Deleting libraries in lib directory" rm -f ./lib/* - @echo " + Deleting header files in include directory....." + @echo " + Deleting header files in include directory" rm -f ./include/* - @echo " + Deleting liblist file....." + @echo " + Deleting liblist file" rm -f liblist + @echo " + Emptying Makefile.detector" + rm -f Makefile.detector + touch Makefile.detector + @echo " + Deleting NPToolLogon" rm -f ./scripts/NPToolLogon_C* - ./scripts/makefile.sh distclean detector - ./scripts/makefile.sh distclean core + @echo " + Deleting intermediate compilation files" + rm -f ./*/*Dict* + rm -f ./*/*.o + @echo " + Deleting shared libraries files in detector directory" + rm -f ./*/*.s diff --git a/NPLib/scripts/filllibdir.sh b/NPLib/scripts/filllibdir.sh deleted file mode 100755 index 3cdccec020c743158211d5794b3ad6b4e791bde9..0000000000000000000000000000000000000000 --- a/NPLib/scripts/filllibdir.sh +++ /dev/null @@ -1,36 +0,0 @@ -# ***************************************************************************** -# * Copyright (C) 2009 this file is part of the NPTool Project * -# * * -# * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * -# * For the list of contributors see $NPTOOL/Licence/Contributors * -# *****************************************************************************/ - -# ***************************************************************************** -# * Original Author: N. de Sereville contact address: deserevi@ipno.in2p3.fr * -# * * -# * Creation Date : 16/11/10 * -# * Last update : * -# *---------------------------------------------------------------------------* -# * Decription: This script moves all the libraries (*.so) in all directories * -# * to the lib/ directory. * -# *---------------------------------------------------------------------------* -# * Comment: * -# * * -# * * -# ***************************************************************************** - -#! /bin/bash - -echo " + Copying libraries to the lib directory....." - -# previously, clean lib/ directory -rm -f lib/*.so - -# loop recursively on header files in all directories -for file in */*.so -do - # copy header files to the include directory - cp -f $file lib/ -done - -rm -f lib/NPToolLogon_C.so diff --git a/NPLib/scripts/makefile.sh b/NPLib/scripts/makefile.sh deleted file mode 100755 index 21c6f7b66f2f28cfe3fc23ed5f20fa85fa37597b..0000000000000000000000000000000000000000 --- a/NPLib/scripts/makefile.sh +++ /dev/null @@ -1,58 +0,0 @@ -# ***************************************************************************** -# * Copyright (C) 2009 this file is part of the NPTool Project * -# * * -# * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * -# * For the list of contributors see $NPTOOL/Licence/Contributors * -# *****************************************************************************/ - -# ***************************************************************************** -# * Original Author: N. de Sereville contact address: deserevi@ipno.in2p3.fr * -# * * -# * Creation Date : 16/11/10 * -# * Last update : * -# *---------------------------------------------------------------------------* -# * Decription: This script loops on all subdirectories containing a Makefile * -# * and call it with the argument passed to the script. * -# * Supported arguments are: * -# * + no arguments: compile everything * -# * + clean: remove temporary files but not shared library * -# * + distclean: remove temporary files and shared library * -# * * -# *---------------------------------------------------------------------------* -# * Comment: * -# * * -# * * -# ***************************************************************************** - -#! /bin/bash - -if [ $# = 0 ] ; then - printf " + Building detector libraries.....\n" -else - printf " + Cleaning $2 libraries.....\n" -fi ; - -# read .detector_libs or .core_libs file created by the configure script -file=".""$2_libs" -if [ $# = 0 ] ; then - file=".detector_libs" -fi ; -read -r detectorlibs < "$file" - -# loop recursively on Makefile files in sub-directories -for file in */Makefile -do - # remove "Makefile" string from file name - name=${file%\/*} - # file name in lower case - lname=$(echo "$name" | tr '[A-Z]' '[a-z]') - # only build defined detector libraries - if printf "$detectorlibs" | grep -q "$lname" ; then - # print informations - printf "\tEntering $name directory...\n" - # add "-C ./" pattern at the beginning of the name - cmd="-C ./$name" - # execute make command with target specified on command line - make -j --silent $1 $cmd - fi ; -done diff --git a/NPLib/scripts/makefile_detector.sh b/NPLib/scripts/makefile_detector.sh index 0b6f47b43672f315bd6b483c8dd49eed29051844..4603354675ca0ed9c30c931ffe4916f2facbdab5 100755 --- a/NPLib/scripts/makefile_detector.sh +++ b/NPLib/scripts/makefile_detector.sh @@ -35,5 +35,6 @@ printf "FillIncludeDir \n" >> $2 printf "\t@echo \"Entering $1 directory...\"\n" >> $2 # execute make command with target specified on command line printf "\tmake --silent -C ./$1\n" >> $2 +printf "\tcp ./$1/*.so lib/\n" >> $2 printf "\n" >> $2