Skip to content
Snippets Groups Projects
Commit 466ff3b1 authored by deserevi's avatar deserevi
Browse files

* Finish migrating scheme for NPL Makefile

   + makefile.sh script added
   + this script loop on all sub-directories containing a Makefile and 
     run it.
parent c9fe0e77
No related branches found
No related tags found
No related merge requests found
......@@ -268,22 +268,18 @@ GLIBS = $(ROOTGLIBS) $(SYSLIBS)
INCLUDE = -I$(CLHEP_BASE_DIR)/include
#------------------------------------------------------------------------------
SHARELIB = CalibManager Vdetec InputOutputRoot InitCond InterCoord \
Must2All GaspardData ParisData ShieldData \
AnnularS1Data PlasticData DummyDetectorData SSSDData \
Reaction EnergyLoss
FILLINC = fillinc
FILLLIB = filllib
SHARELIB = SharedLib
FILLINC = FillIncludeDir
FILLLIB = FillLibraryDir
LIBLIST = liblistfile
all: $(FILLINC) $(SHARELIB) $(FILLLIB) $(LIBLIST)
#------------------------------------------------------------------------------
############### fillinclib ##############
fillinc:
FillIncludeDir:
./scripts/fillincdir.sh
filllib:
FillLibraryDir:
./scripts/filllibdir.sh
ifeq ($(ARCH),macosx)
./scripts/filllibmacdir.sh
......@@ -291,114 +287,22 @@ endif
############### liblist ##############
liblistfile:
echo "Building liblist"
./scripts/buildliblist.sh
############### Calibration ##############
## CalibrationManager ##
CalibManager:
make -C ./CalibrationManager
############### Detector ##############
## VDetector ##
Vdetec:
make -C ./VDetector
## MUST2 ##
Must2All:
make -C ./MUST2
## SSSD ##
SSSDData:
make -C ./SSSD
## AnnularS1 ##
AnnularS1Data:
make -C ./AnnularS1
## Gaspard ##
GaspardData:
make -C ./GASPARD
## Paris ##
ParisData:
make -C ./Paris
## Shield ##
ShieldData:
make -C ./Shield
## Plastic ##
PlasticData:
make -C ./Plastic
## DUMMY Detector ##
DummyDetectorData:
make -C ./DummyDetector
############# Simulation ##############
## InitialConditions ##
InitCond:
make -C ./InitialConditions
## InteractionCoordinates ##
InterCoord:
make -C ./InteractionCoordinates
############# I/O Root File ############
InputOutputRoot:
make -C ./IORoot
cp ./IORoot/*.h ./include
############# Various Tools ############
## Reaction ##
Reaction:
make libReaction.so -C ./Tools
EnergyLoss:
make libEnergyLoss.so -C ./Tools
#######################################
############### sharedlib ##############
SharedLib:
./scripts/makefile.sh
############# Clean and More ##########
clean:
make clean -C ./Tools
make clean -C ./IORoot
make clean -C ./VDetector
make clean -C ./CalibrationManager
make clean -C ./MUST2
make clean -C ./SSSD
make clean -C ./AnnularS1
make clean -C ./GASPARD
make clean -C ./Paris
make clean -C ./Shield
make clean -C ./InteractionCoordinates
make clean -C ./InitialConditions
make clean -C ./DummyDetector
./scripts/makefile.sh clean
distclean:
rm -f ./lib/*.so
ifeq ($(ARCH),macosx)
rm -f ./lib/*.dylib
endif
rm -f ./lib/*
rm -f ./include/*.h
rm -f liblist
make distclean -C ./Tools
make distclean -C ./IORoot
make distclean -C ./VDetector
make distclean -C ./CalibrationManager
make distclean -C ./MUST2
make distclean -C ./SSSD
make distclean -C ./AnnularS1
make distclean -C ./GASPARD
make distclean -C ./Paris
make distclean -C ./Shield
make distclean -C ./InteractionCoordinates
make distclean -C ./InitialConditions
make distclean -C ./DummyDetector
make distclean -C ./Plastic
./scripts/makefile.sh distclean
.SUFFIXES: .$(SrcSuf)
###
......
# *****************************************************************************
# * 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
# loop recursively on Makefile files in sub-directories
for file in */Makefile
do
# remove "Makefile" string from file name
name=${file%\/*}
# print informations
echo "Entering $name directory..."
# add "-C ./" pattern at the beginning of the name
cmd="-C ./$name"
# execute make command with target specified on command line
make $1 $cmd
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment