From c90a8f5e9bfc77acb0c331431c80bf2cb8155abb Mon Sep 17 00:00:00 2001
From: matta <matta@npt>
Date: Tue, 18 Jan 2011 23:39:08 +0000
Subject: [PATCH] * Changing NPL makefiles to enhance lisibility  - All
 makefile now call a base_Makefile that contain all the variable output (test
 of arch and so on).  - Each makefile of each folder now look much smaller and
 easier to ready

---
 NPLib/AnnularS1/Makefile              | 268 +-------------------------
 NPLib/CalibrationManager/Makefile     | 268 +-------------------------
 NPLib/DummyDetector/Makefile          | 268 +-------------------------
 NPLib/GASPARD/Makefile                | 268 +-------------------------
 NPLib/IORoot/Makefile                 | 268 +-------------------------
 NPLib/InteractionCoordinates/Makefile | 268 +-------------------------
 NPLib/MUST2/Makefile                  | 268 +-------------------------
 NPLib/Makefile                        | 268 +-------------------------
 NPLib/Paris/Makefile                  | 268 +-------------------------
 NPLib/SSSD/Makefile                   | 268 +-------------------------
 NPLib/Shield/Makefile                 | 268 +-------------------------
 NPLib/Tools/Makefile                  | 268 +-------------------------
 NPLib/VDetector/Makefile              | 268 +-------------------------
 NPLib/W1/Makefile                     | 268 +-------------------------
 NPLib/base_Makefile                   | 268 ++++++++++++++++++++++++++
 15 files changed, 282 insertions(+), 3738 deletions(-)
 create mode 100644 NPLib/base_Makefile

diff --git a/NPLib/AnnularS1/Makefile b/NPLib/AnnularS1/Makefile
index ee646f98b..b9794b077 100644
--- a/NPLib/AnnularS1/Makefile
+++ b/NPLib/AnnularS1/Makefile
@@ -1,270 +1,4 @@
-# Makefile for the ROOT test programs.
-# This Makefile shows nicely how to compile and link applications
-# using the ROOT libraries on all supported platforms.
-#
-# Copyright (c) 2000 Rene Brun and Fons Rademakers
-#
-# Author: Fons Rademakers, 29/2/2000
-
-ROOTCONFIG   := root-config
-
-ARCH         := $(shell $(ROOTCONFIG) --arch)
-PLATFORM     := $(shell $(ROOTCONFIG) --platform)
-ALTCC        := $(shell $(ROOTCONFIG) --cc)
-ALTCXX       := $(shell $(ROOTCONFIG) --cxx)
-ALTF77       := $(shell $(ROOTCONFIG) --f77)
-ALTLD        := $(shell $(ROOTCONFIG) --ld)
-
-#CXX           =
-ObjSuf        = o
-SrcSuf        = cxx
-ExeSuf        =
-DllSuf        = so
-OutPutOpt     = -o # keep whitespace after "-o"
-
-ifeq (debug,$(findstring debug,$(ROOTBUILD)))
-OPT           = -g
-OPT2          = -g
-else
-ifneq ($(findstring debug, $(strip $(shell $(ROOTCONFIG) --config))),)
-OPT           = -g
-OPT2          = -g
-else
-OPT           = -O
-OPT2          = -O2
-endif
-endif
-
-ROOTCFLAGS   := $(shell $(ROOTCONFIG) --cflags)
-ROOTLDFLAGS  := $(shell $(ROOTCONFIG) --ldflags)
-ROOTLIBS     := $(shell $(ROOTCONFIG) --libs)
-ROOTGLIBS    := $(shell $(ROOTCONFIG) --glibs)
-HASTHREAD    := $(shell $(ROOTCONFIG) --has-thread)
-ROOTDICTTYPE := $(shell $(ROOTCONFIG) --dicttype)
-ROOTCINT     := rootcint
-
-ifeq ($(ARCH),linux)
-# Linux with egcs, gcc 2.9x, gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxkcc)
-# Linux with the KAI compiler
-CXX           = KCC --one_instantiation_per_object
-CXXFLAGS      = $(OPT) -fPIC +K0
-LD            = KCC
-LDFLAGS       = $(OPT) $(shell $(ROOTCONFIG) --cflags)
-SOFLAGS       =
-endif
-
-ifeq ($(ARCH),linuxicc)
-# Linux with Intel icc compiler
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppcgcc)
-# PPC Linux with gcc and glibc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64gcc)
-# Itanium Linux with gcc 2.9x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64sgi)
-# Itanium Linux with sgiCC
-CXX           = sgiCC
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = gsgiCC
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64ecc)
-# Itanium Linux with Intel icc (was ecc)
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -ftz
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664gcc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppc64gcc)
-# PPC64 Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664icc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -wd1572
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxalphagcc)
-# Alpha Linux with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxmips)
-# GNU/Linux on mips (BE/LE, O32/N32/N64) with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxhppa)
-# GNU/Linux on hppa with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxarm)
-# ARM Linux with egcs
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),macosx)
-# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = g++
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined $(UNDEFOPT)
-endif
-
-ifeq ($(ARCH),macosxicc)
-# MacOS X with Intel icc compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-ifeq ($(MACOSX_MINOR),5)
-MACOSX_MINOR := 4
-endif
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = $(MACOSXTARGET) icpc
-LDFLAGS       = $(OPT)
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosx64)
-# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
-# Only specific option (-m64) comes from root-config
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++ -m64
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -m64 -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosxxlc)
-# MacOS X with IBM xlC compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = xlC
-CXXFLAGS      = $(OPT)
-LD            = $(MACOSXTARGET) xlC
-LDFLAGS       = $(OPT) -Wl,-bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-DllSuf        = dylib
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = xlC
-endif
-SOFLAGS       = -qmkshrobj -single_module -undefined $(UNDEFOPT)
-endif
-
-CXXFLAGS     += $(ROOTCFLAGS)
-LDFLAGS      += $(ROOTLDFLAGS)
-LIBS          = $(ROOTLIBS) $(SYSLIBS)
-GLIBS         = $(ROOTGLIBS) $(SYSLIBS)
-
-INCLUDE		= -I$(CLHEP_BASE_DIR)/include
+include ../base_Makefile
  
 #------------------------------------------------------------------------------
 SHARELIB      =  libAnnularS1Data.so 
diff --git a/NPLib/CalibrationManager/Makefile b/NPLib/CalibrationManager/Makefile
index dacbd1f0f..4d5991280 100755
--- a/NPLib/CalibrationManager/Makefile
+++ b/NPLib/CalibrationManager/Makefile
@@ -1,270 +1,4 @@
-# Makefile for the ROOT test programs.
-# This Makefile shows nicely how to compile and link applications
-# using the ROOT libraries on all supported platforms.
-#
-# Copyright (c) 2000 Rene Brun and Fons Rademakers
-#
-# Author: Fons Rademakers, 29/2/2000
-
-ROOTCONFIG   := root-config
-
-ARCH         := $(shell $(ROOTCONFIG) --arch)
-PLATFORM     := $(shell $(ROOTCONFIG) --platform)
-ALTCC        := $(shell $(ROOTCONFIG) --cc)
-ALTCXX       := $(shell $(ROOTCONFIG) --cxx)
-ALTF77       := $(shell $(ROOTCONFIG) --f77)
-ALTLD        := $(shell $(ROOTCONFIG) --ld)
-
-#CXX           =
-ObjSuf        = o
-SrcSuf        = cxx
-ExeSuf        =
-DllSuf        = so
-OutPutOpt     = -o # keep whitespace after "-o"
-
-ifeq (debug,$(findstring debug,$(ROOTBUILD)))
-OPT           = -g
-OPT2          = -g
-else
-ifneq ($(findstring debug, $(strip $(shell $(ROOTCONFIG) --config))),)
-OPT           = -g
-OPT2          = -g
-else
-OPT           = -O
-OPT2          = -O2
-endif
-endif
-
-ROOTCFLAGS   := $(shell $(ROOTCONFIG) --cflags)
-ROOTLDFLAGS  := $(shell $(ROOTCONFIG) --ldflags)
-ROOTLIBS     := $(shell $(ROOTCONFIG) --libs)
-ROOTGLIBS    := $(shell $(ROOTCONFIG) --glibs)
-HASTHREAD    := $(shell $(ROOTCONFIG) --has-thread)
-ROOTDICTTYPE := $(shell $(ROOTCONFIG) --dicttype)
-ROOTCINT     := rootcint
-
-ifeq ($(ARCH),linux)
-# Linux with egcs, gcc 2.9x, gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxkcc)
-# Linux with the KAI compiler
-CXX           = KCC --one_instantiation_per_object
-CXXFLAGS      = $(OPT) -fPIC +K0
-LD            = KCC
-LDFLAGS       = $(OPT) $(shell $(ROOTCONFIG) --cflags)
-SOFLAGS       =
-endif
-
-ifeq ($(ARCH),linuxicc)
-# Linux with Intel icc compiler
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppcgcc)
-# PPC Linux with gcc and glibc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64gcc)
-# Itanium Linux with gcc 2.9x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64sgi)
-# Itanium Linux with sgiCC
-CXX           = sgiCC
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = gsgiCC
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64ecc)
-# Itanium Linux with Intel icc (was ecc)
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -ftz
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664gcc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppc64gcc)
-# PPC64 Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664icc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -wd1572
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxalphagcc)
-# Alpha Linux with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxmips)
-# GNU/Linux on mips (BE/LE, O32/N32/N64) with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxhppa)
-# GNU/Linux on hppa with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxarm)
-# ARM Linux with egcs
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),macosx)
-# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = g++
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined $(UNDEFOPT)
-endif
-
-ifeq ($(ARCH),macosxicc)
-# MacOS X with Intel icc compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-ifeq ($(MACOSX_MINOR),5)
-MACOSX_MINOR := 4
-endif
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = $(MACOSXTARGET) icpc
-LDFLAGS       = $(OPT)
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosx64)
-# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
-# Only specific option (-m64) comes from root-config
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++ -m64
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -m64 -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosxxlc)
-# MacOS X with IBM xlC compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = xlC
-CXXFLAGS      = $(OPT)
-LD            = $(MACOSXTARGET) xlC
-LDFLAGS       = $(OPT) -Wl,-bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-DllSuf        = dylib
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = xlC
-endif
-SOFLAGS       = -qmkshrobj -single_module -undefined $(UNDEFOPT)
-endif
-
-CXXFLAGS     += $(ROOTCFLAGS)
-LDFLAGS      += $(ROOTLDFLAGS)
-LIBS          = $(ROOTLIBS) $(SYSLIBS)
-GLIBS         = $(ROOTGLIBS) $(SYSLIBS)
-
-INCLUDE		= -I$(CLHEP_BASE_DIR)/include
+include ../base_Makefile
  
 #------------------------------------------------------------------------------
 SHARELIB      =  libCalibrationManager.so 
diff --git a/NPLib/DummyDetector/Makefile b/NPLib/DummyDetector/Makefile
index 3be0b6cba..7722507ad 100755
--- a/NPLib/DummyDetector/Makefile
+++ b/NPLib/DummyDetector/Makefile
@@ -1,270 +1,4 @@
-# Makefile for the ROOT test programs.
-# This Makefile shows nicely how to compile and link applications
-# using the ROOT libraries on all supported platforms.
-#
-# Copyright (c) 2000 Rene Brun and Fons Rademakers
-#
-# Author: Fons Rademakers, 29/2/2000
-
-ROOTCONFIG   := root-config
-
-ARCH         := $(shell $(ROOTCONFIG) --arch)
-PLATFORM     := $(shell $(ROOTCONFIG) --platform)
-ALTCC        := $(shell $(ROOTCONFIG) --cc)
-ALTCXX       := $(shell $(ROOTCONFIG) --cxx)
-ALTF77       := $(shell $(ROOTCONFIG) --f77)
-ALTLD        := $(shell $(ROOTCONFIG) --ld)
-
-#CXX           =
-ObjSuf        = o
-SrcSuf        = cxx
-ExeSuf        =
-DllSuf        = so
-OutPutOpt     = -o # keep whitespace after "-o"
-
-ifeq (debug,$(findstring debug,$(ROOTBUILD)))
-OPT           = -g
-OPT2          = -g
-else
-ifneq ($(findstring debug, $(strip $(shell $(ROOTCONFIG) --config))),)
-OPT           = -g
-OPT2          = -g
-else
-OPT           = -O
-OPT2          = -O2
-endif
-endif
-
-ROOTCFLAGS   := $(shell $(ROOTCONFIG) --cflags)
-ROOTLDFLAGS  := $(shell $(ROOTCONFIG) --ldflags)
-ROOTLIBS     := $(shell $(ROOTCONFIG) --libs)
-ROOTGLIBS    := $(shell $(ROOTCONFIG) --glibs)
-HASTHREAD    := $(shell $(ROOTCONFIG) --has-thread)
-ROOTDICTTYPE := $(shell $(ROOTCONFIG) --dicttype)
-ROOTCINT     := rootcint
-
-ifeq ($(ARCH),linux)
-# Linux with egcs, gcc 2.9x, gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxkcc)
-# Linux with the KAI compiler
-CXX           = KCC --one_instantiation_per_object
-CXXFLAGS      = $(OPT) -fPIC +K0
-LD            = KCC
-LDFLAGS       = $(OPT) $(shell $(ROOTCONFIG) --cflags)
-SOFLAGS       =
-endif
-
-ifeq ($(ARCH),linuxicc)
-# Linux with Intel icc compiler
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppcgcc)
-# PPC Linux with gcc and glibc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64gcc)
-# Itanium Linux with gcc 2.9x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64sgi)
-# Itanium Linux with sgiCC
-CXX           = sgiCC
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = gsgiCC
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64ecc)
-# Itanium Linux with Intel icc (was ecc)
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -ftz
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664gcc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppc64gcc)
-# PPC64 Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664icc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -wd1572
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxalphagcc)
-# Alpha Linux with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxmips)
-# GNU/Linux on mips (BE/LE, O32/N32/N64) with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxhppa)
-# GNU/Linux on hppa with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxarm)
-# ARM Linux with egcs
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),macosx)
-# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = g++
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined $(UNDEFOPT)
-endif
-
-ifeq ($(ARCH),macosxicc)
-# MacOS X with Intel icc compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-ifeq ($(MACOSX_MINOR),5)
-MACOSX_MINOR := 4
-endif
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = $(MACOSXTARGET) icpc
-LDFLAGS       = $(OPT)
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosx64)
-# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
-# Only specific option (-m64) comes from root-config
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++ -m64
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -m64 -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosxxlc)
-# MacOS X with IBM xlC compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = xlC
-CXXFLAGS      = $(OPT)
-LD            = $(MACOSXTARGET) xlC
-LDFLAGS       = $(OPT) -Wl,-bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-DllSuf        = dylib
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = xlC
-endif
-SOFLAGS       = -qmkshrobj -single_module -undefined $(UNDEFOPT)
-endif
-
-CXXFLAGS     += $(ROOTCFLAGS)
-LDFLAGS      += $(ROOTLDFLAGS)
-LIBS          = $(ROOTLIBS) $(SYSLIBS)
-GLIBS         = $(ROOTGLIBS) $(SYSLIBS)
-
-INCLUDE		= -I$(CLHEP_BASE_DIR)/include
+include ../base_Makefile
  
 #------------------------------------------------------------------------------
 SHARELIB      =  libDUMMYDetectorData.so 
diff --git a/NPLib/GASPARD/Makefile b/NPLib/GASPARD/Makefile
index a3feb5627..dba1fa580 100644
--- a/NPLib/GASPARD/Makefile
+++ b/NPLib/GASPARD/Makefile
@@ -1,270 +1,4 @@
-# Makefile for the ROOT test programs.
-# This Makefile shows nicely how to compile and link applications
-# using the ROOT libraries on all supported platforms.
-#
-# Copyright (c) 2000 Rene Brun and Fons Rademakers
-#
-# Author: Fons Rademakers, 29/2/2000
-
-ROOTCONFIG   := root-config
-
-ARCH         := $(shell $(ROOTCONFIG) --arch)
-PLATFORM     := $(shell $(ROOTCONFIG) --platform)
-ALTCC        := $(shell $(ROOTCONFIG) --cc)
-ALTCXX       := $(shell $(ROOTCONFIG) --cxx)
-ALTF77       := $(shell $(ROOTCONFIG) --f77)
-ALTLD        := $(shell $(ROOTCONFIG) --ld)
-
-#CXX           =
-ObjSuf        = o
-SrcSuf        = cxx
-ExeSuf        =
-DllSuf        = so
-OutPutOpt     = -o # keep whitespace after "-o"
-
-ifeq (debug,$(findstring debug,$(ROOTBUILD)))
-OPT           = -g
-OPT2          = -g
-else
-ifneq ($(findstring debug, $(strip $(shell $(ROOTCONFIG) --config))),)
-OPT           = -g
-OPT2          = -g
-else
-OPT           = -O
-OPT2          = -O2
-endif
-endif
-
-ROOTCFLAGS   := $(shell $(ROOTCONFIG) --cflags)
-ROOTLDFLAGS  := $(shell $(ROOTCONFIG) --ldflags)
-ROOTLIBS     := $(shell $(ROOTCONFIG) --libs)
-ROOTGLIBS    := $(shell $(ROOTCONFIG) --glibs)
-HASTHREAD    := $(shell $(ROOTCONFIG) --has-thread)
-ROOTDICTTYPE := $(shell $(ROOTCONFIG) --dicttype)
-ROOTCINT     := rootcint
-
-ifeq ($(ARCH),linux)
-# Linux with egcs, gcc 2.9x, gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxkcc)
-# Linux with the KAI compiler
-CXX           = KCC --one_instantiation_per_object
-CXXFLAGS      = $(OPT) -fPIC +K0
-LD            = KCC
-LDFLAGS       = $(OPT) $(shell $(ROOTCONFIG) --cflags)
-SOFLAGS       =
-endif
-
-ifeq ($(ARCH),linuxicc)
-# Linux with Intel icc compiler
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppcgcc)
-# PPC Linux with gcc and glibc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64gcc)
-# Itanium Linux with gcc 2.9x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64sgi)
-# Itanium Linux with sgiCC
-CXX           = sgiCC
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = gsgiCC
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64ecc)
-# Itanium Linux with Intel icc (was ecc)
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -ftz
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664gcc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppc64gcc)
-# PPC64 Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664icc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -wd1572
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxalphagcc)
-# Alpha Linux with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxmips)
-# GNU/Linux on mips (BE/LE, O32/N32/N64) with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxhppa)
-# GNU/Linux on hppa with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxarm)
-# ARM Linux with egcs
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),macosx)
-# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = g++
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined $(UNDEFOPT)
-endif
-
-ifeq ($(ARCH),macosxicc)
-# MacOS X with Intel icc compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-ifeq ($(MACOSX_MINOR),5)
-MACOSX_MINOR := 4
-endif
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = $(MACOSXTARGET) icpc
-LDFLAGS       = $(OPT)
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosx64)
-# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
-# Only specific option (-m64) comes from root-config
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++ -m64
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -m64 -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosxxlc)
-# MacOS X with IBM xlC compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = xlC
-CXXFLAGS      = $(OPT)
-LD            = $(MACOSXTARGET) xlC
-LDFLAGS       = $(OPT) -Wl,-bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-DllSuf        = dylib
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = xlC
-endif
-SOFLAGS       = -qmkshrobj -single_module -undefined $(UNDEFOPT)
-endif
-
-CXXFLAGS     += $(ROOTCFLAGS)
-LDFLAGS      += $(ROOTLDFLAGS)
-LIBS          = $(ROOTLIBS) $(SYSLIBS)
-GLIBS         = $(ROOTGLIBS) $(SYSLIBS)
-
-INCLUDE		= -I$(CLHEP_BASE_DIR)/include -I$(NPLIB)/include
+include ../base_Makefile
  
 #------------------------------------------------------------------------------
 SHARELIB      =  libGaspardData.so	\
diff --git a/NPLib/IORoot/Makefile b/NPLib/IORoot/Makefile
index ce8ea0702..1884d7d8b 100644
--- a/NPLib/IORoot/Makefile
+++ b/NPLib/IORoot/Makefile
@@ -1,270 +1,4 @@
-# Makefile for the ROOT test programs.
-# This Makefile shows nicely how to compile and link applications
-# using the ROOT libraries on all supported platforms.
-#
-# Copyright (c) 2000 Rene Brun and Fons Rademakers
-#
-# Author: Fons Rademakers, 29/2/2000
-
-ROOTCONFIG   := root-config
-
-ARCH         := $(shell $(ROOTCONFIG) --arch)
-PLATFORM     := $(shell $(ROOTCONFIG) --platform)
-ALTCC        := $(shell $(ROOTCONFIG) --cc)
-ALTCXX       := $(shell $(ROOTCONFIG) --cxx)
-ALTF77       := $(shell $(ROOTCONFIG) --f77)
-ALTLD        := $(shell $(ROOTCONFIG) --ld)
-
-#CXX           =
-ObjSuf        = o
-SrcSuf        = cxx
-ExeSuf        =
-DllSuf        = so
-OutPutOpt     = -o # keep whitespace after "-o"
-
-ifeq (debug,$(findstring debug,$(ROOTBUILD)))
-OPT           = -g
-OPT2          = -g
-else
-ifneq ($(findstring debug, $(strip $(shell $(ROOTCONFIG) --config))),)
-OPT           = -g
-OPT2          = -g
-else
-OPT           = -O
-OPT2          = -O2
-endif
-endif
-
-ROOTCFLAGS   := $(shell $(ROOTCONFIG) --cflags)
-ROOTLDFLAGS  := $(shell $(ROOTCONFIG) --ldflags)
-ROOTLIBS     := $(shell $(ROOTCONFIG) --libs)
-ROOTGLIBS    := $(shell $(ROOTCONFIG) --glibs)
-HASTHREAD    := $(shell $(ROOTCONFIG) --has-thread)
-ROOTDICTTYPE := $(shell $(ROOTCONFIG) --dicttype)
-ROOTCINT     := rootcint
-
-ifeq ($(ARCH),linux)
-# Linux with egcs, gcc 2.9x, gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxkcc)
-# Linux with the KAI compiler
-CXX           = KCC --one_instantiation_per_object
-CXXFLAGS      = $(OPT) -fPIC +K0
-LD            = KCC
-LDFLAGS       = $(OPT) $(shell $(ROOTCONFIG) --cflags)
-SOFLAGS       =
-endif
-
-ifeq ($(ARCH),linuxicc)
-# Linux with Intel icc compiler
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppcgcc)
-# PPC Linux with gcc and glibc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64gcc)
-# Itanium Linux with gcc 2.9x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64sgi)
-# Itanium Linux with sgiCC
-CXX           = sgiCC
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = gsgiCC
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64ecc)
-# Itanium Linux with Intel icc (was ecc)
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -ftz
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664gcc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppc64gcc)
-# PPC64 Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664icc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -wd1572
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxalphagcc)
-# Alpha Linux with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxmips)
-# GNU/Linux on mips (BE/LE, O32/N32/N64) with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxhppa)
-# GNU/Linux on hppa with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxarm)
-# ARM Linux with egcs
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),macosx)
-# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = g++
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined $(UNDEFOPT)
-endif
-
-ifeq ($(ARCH),macosxicc)
-# MacOS X with Intel icc compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-ifeq ($(MACOSX_MINOR),5)
-MACOSX_MINOR := 4
-endif
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = $(MACOSXTARGET) icpc
-LDFLAGS       = $(OPT)
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosx64)
-# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
-# Only specific option (-m64) comes from root-config
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++ -m64
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -m64 -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosxxlc)
-# MacOS X with IBM xlC compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = xlC
-CXXFLAGS      = $(OPT)
-LD            = $(MACOSXTARGET) xlC
-LDFLAGS       = $(OPT) -Wl,-bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-DllSuf        = dylib
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = xlC
-endif
-SOFLAGS       = -qmkshrobj -single_module -undefined $(UNDEFOPT)
-endif
-
-CXXFLAGS     += $(ROOTCFLAGS)
-LDFLAGS      += $(ROOTLDFLAGS)
-LIBS          = $(ROOTLIBS) $(SYSLIBS)
-GLIBS         = $(ROOTGLIBS) $(SYSLIBS)
-
-INCLUDE		= -I$(CLHEP_BASE_DIR)/include 
+include ../base_Makefile
  
 #------------------------------------------------------------------------------
 SHARELIB      =  libIORoot.so 
diff --git a/NPLib/InteractionCoordinates/Makefile b/NPLib/InteractionCoordinates/Makefile
index 682282e96..767f42184 100644
--- a/NPLib/InteractionCoordinates/Makefile
+++ b/NPLib/InteractionCoordinates/Makefile
@@ -1,270 +1,4 @@
-# Makefile for the ROOT test programs.
-# This Makefile shows nicely how to compile and link applications
-# using the ROOT libraries on all supported platforms.
-#
-# Copyright (c) 2000 Rene Brun and Fons Rademakers
-#
-# Author: Fons Rademakers, 29/2/2000
-
-ROOTCONFIG   := root-config
-
-ARCH         := $(shell $(ROOTCONFIG) --arch)
-PLATFORM     := $(shell $(ROOTCONFIG) --platform)
-ALTCC        := $(shell $(ROOTCONFIG) --cc)
-ALTCXX       := $(shell $(ROOTCONFIG) --cxx)
-ALTF77       := $(shell $(ROOTCONFIG) --f77)
-ALTLD        := $(shell $(ROOTCONFIG) --ld)
-
-#CXX           =
-ObjSuf        = o
-SrcSuf        = cxx
-ExeSuf        =
-DllSuf        = so
-OutPutOpt     = -o # keep whitespace after "-o"
-
-ifeq (debug,$(findstring debug,$(ROOTBUILD)))
-OPT           = -g
-OPT2          = -g
-else
-ifneq ($(findstring debug, $(strip $(shell $(ROOTCONFIG) --config))),)
-OPT           = -g
-OPT2          = -g
-else
-OPT           = -O
-OPT2          = -O2
-endif
-endif
-
-ROOTCFLAGS   := $(shell $(ROOTCONFIG) --cflags)
-ROOTLDFLAGS  := $(shell $(ROOTCONFIG) --ldflags)
-ROOTLIBS     := $(shell $(ROOTCONFIG) --libs)
-ROOTGLIBS    := $(shell $(ROOTCONFIG) --glibs)
-HASTHREAD    := $(shell $(ROOTCONFIG) --has-thread)
-ROOTDICTTYPE := $(shell $(ROOTCONFIG) --dicttype)
-ROOTCINT     := rootcint
-
-ifeq ($(ARCH),linux)
-# Linux with egcs, gcc 2.9x, gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxkcc)
-# Linux with the KAI compiler
-CXX           = KCC --one_instantiation_per_object
-CXXFLAGS      = $(OPT) -fPIC +K0
-LD            = KCC
-LDFLAGS       = $(OPT) $(shell $(ROOTCONFIG) --cflags)
-SOFLAGS       =
-endif
-
-ifeq ($(ARCH),linuxicc)
-# Linux with Intel icc compiler
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppcgcc)
-# PPC Linux with gcc and glibc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64gcc)
-# Itanium Linux with gcc 2.9x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64sgi)
-# Itanium Linux with sgiCC
-CXX           = sgiCC
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = gsgiCC
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64ecc)
-# Itanium Linux with Intel icc (was ecc)
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -ftz
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664gcc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppc64gcc)
-# PPC64 Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664icc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -wd1572
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxalphagcc)
-# Alpha Linux with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxmips)
-# GNU/Linux on mips (BE/LE, O32/N32/N64) with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxhppa)
-# GNU/Linux on hppa with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxarm)
-# ARM Linux with egcs
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),macosx)
-# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = g++
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined $(UNDEFOPT)
-endif
-
-ifeq ($(ARCH),macosxicc)
-# MacOS X with Intel icc compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-ifeq ($(MACOSX_MINOR),5)
-MACOSX_MINOR := 4
-endif
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = $(MACOSXTARGET) icpc
-LDFLAGS       = $(OPT)
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosx64)
-# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
-# Only specific option (-m64) comes from root-config
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++ -m64
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -m64 -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosxxlc)
-# MacOS X with IBM xlC compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = xlC
-CXXFLAGS      = $(OPT)
-LD            = $(MACOSXTARGET) xlC
-LDFLAGS       = $(OPT) -Wl,-bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-DllSuf        = dylib
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = xlC
-endif
-SOFLAGS       = -qmkshrobj -single_module -undefined $(UNDEFOPT)
-endif
-
-CXXFLAGS     += $(ROOTCFLAGS)
-LDFLAGS      += $(ROOTLDFLAGS)
-LIBS          = $(ROOTLIBS) $(SYSLIBS)
-GLIBS         = $(ROOTGLIBS) $(SYSLIBS)
-
-INCLUDE		= -I$(CLHEP_BASE_DIR)/include
+include ../base_Makefile
  
 #------------------------------------------------------------------------------
 SHARELIB      = libInteractionCoordinates.so
diff --git a/NPLib/MUST2/Makefile b/NPLib/MUST2/Makefile
index 9eae34621..2717c1641 100644
--- a/NPLib/MUST2/Makefile
+++ b/NPLib/MUST2/Makefile
@@ -1,271 +1,5 @@
-# Makefile for the ROOT test programs.
-# This Makefile shows nicely how to compile and link applications
-# using the ROOT libraries on all supported platforms.
-#
-# Copyright (c) 2000 Rene Brun and Fons Rademakers
-#
-# Author: Fons Rademakers, 29/2/2000
+include ../base_Makefile
 
-ROOTCONFIG   := root-config
-
-ARCH         := $(shell $(ROOTCONFIG) --arch)
-PLATFORM     := $(shell $(ROOTCONFIG) --platform)
-ALTCC        := $(shell $(ROOTCONFIG) --cc)
-ALTCXX       := $(shell $(ROOTCONFIG) --cxx)
-ALTF77       := $(shell $(ROOTCONFIG) --f77)
-ALTLD        := $(shell $(ROOTCONFIG) --ld)
-
-#CXX           =
-ObjSuf        = o
-SrcSuf        = cxx
-ExeSuf        =
-DllSuf        = so
-OutPutOpt     = -o # keep whitespace after "-o"
-
-ifeq (debug,$(findstring debug,$(ROOTBUILD)))
-OPT           = -g
-OPT2          = -g
-else
-ifneq ($(findstring debug, $(strip $(shell $(ROOTCONFIG) --config))),)
-OPT           = -g
-OPT2          = -g
-else
-OPT           = -O
-OPT2          = -O2
-endif
-endif
-
-ROOTCFLAGS   := $(shell $(ROOTCONFIG) --cflags)
-ROOTLDFLAGS  := $(shell $(ROOTCONFIG) --ldflags)
-ROOTLIBS     := $(shell $(ROOTCONFIG) --libs)
-ROOTGLIBS    := $(shell $(ROOTCONFIG) --glibs)
-HASTHREAD    := $(shell $(ROOTCONFIG) --has-thread)
-ROOTDICTTYPE := $(shell $(ROOTCONFIG) --dicttype)
-ROOTCINT     := rootcint
-
-ifeq ($(ARCH),linux)
-# Linux with egcs, gcc 2.9x, gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxkcc)
-# Linux with the KAI compiler
-CXX           = KCC --one_instantiation_per_object
-CXXFLAGS      = $(OPT) -fPIC +K0
-LD            = KCC
-LDFLAGS       = $(OPT) $(shell $(ROOTCONFIG) --cflags)
-SOFLAGS       =
-endif
-
-ifeq ($(ARCH),linuxicc)
-# Linux with Intel icc compiler
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppcgcc)
-# PPC Linux with gcc and glibc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64gcc)
-# Itanium Linux with gcc 2.9x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64sgi)
-# Itanium Linux with sgiCC
-CXX           = sgiCC
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = gsgiCC
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64ecc)
-# Itanium Linux with Intel icc (was ecc)
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -ftz
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664gcc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppc64gcc)
-# PPC64 Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664icc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -wd1572
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxalphagcc)
-# Alpha Linux with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxmips)
-# GNU/Linux on mips (BE/LE, O32/N32/N64) with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxhppa)
-# GNU/Linux on hppa with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxarm)
-# ARM Linux with egcs
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),macosx)
-# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = g++
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined $(UNDEFOPT)
-endif
-
-ifeq ($(ARCH),macosxicc)
-# MacOS X with Intel icc compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-ifeq ($(MACOSX_MINOR),5)
-MACOSX_MINOR := 4
-endif
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = $(MACOSXTARGET) icpc
-LDFLAGS       = $(OPT)
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosx64)
-# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
-# Only specific option (-m64) comes from root-config
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++ -m64
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -m64 -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosxxlc)
-# MacOS X with IBM xlC compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = xlC
-CXXFLAGS      = $(OPT)
-LD            = $(MACOSXTARGET) xlC
-LDFLAGS       = $(OPT) -Wl,-bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-DllSuf        = dylib
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = xlC
-endif
-SOFLAGS       = -qmkshrobj -single_module -undefined $(UNDEFOPT)
-endif
-
-CXXFLAGS     += $(ROOTCFLAGS)
-LDFLAGS      += $(ROOTLDFLAGS)
-LIBS          = $(ROOTLIBS) $(SYSLIBS)
-GLIBS         = $(ROOTGLIBS) $(SYSLIBS)
-
-INCLUDE		= -I$(CLHEP_BASE_DIR)/include -I$(NPLIB)/include
- 
 #------------------------------------------------------------------------------
 SHARELIB      =  libMust2Data.so	libMust2Physics.so
 
diff --git a/NPLib/Makefile b/NPLib/Makefile
index 0c67c7f50..290a20b2b 100644
--- a/NPLib/Makefile
+++ b/NPLib/Makefile
@@ -1,271 +1,5 @@
-# Makefile for the ROOT test programs.
-# This Makefile shows nicely how to compile and link applications
-# using the ROOT libraries on all supported platforms.
-#
-# Copyright (c) 2000 Rene Brun and Fons Rademakers
-#
-# Author: Fons Rademakers, 29/2/2000
 
-ROOTCONFIG   := root-config
-
-ARCH         := $(shell $(ROOTCONFIG) --arch)
-PLATFORM     := $(shell $(ROOTCONFIG) --platform)
-ALTCC        := $(shell $(ROOTCONFIG) --cc)
-ALTCXX       := $(shell $(ROOTCONFIG) --cxx)
-ALTF77       := $(shell $(ROOTCONFIG) --f77)
-ALTLD        := $(shell $(ROOTCONFIG) --ld)
-
-#CXX           =
-ObjSuf        = o
-SrcSuf        = cxx
-ExeSuf        =
-DllSuf        = so
-OutPutOpt     = -o # keep whitespace after "-o"
-
-ifeq (debug,$(findstring debug,$(ROOTBUILD)))
-OPT           = -g
-OPT2          = -g
-else
-ifneq ($(findstring debug, $(strip $(shell $(ROOTCONFIG) --config))),)
-OPT           = -g
-OPT2          = -g
-else
-OPT           = -O
-OPT2          = -O2
-endif
-endif
-
-ROOTCFLAGS   := $(shell $(ROOTCONFIG) --cflags)
-ROOTLDFLAGS  := $(shell $(ROOTCONFIG) --ldflags)
-ROOTLIBS     := $(shell $(ROOTCONFIG) --libs)
-ROOTGLIBS    := $(shell $(ROOTCONFIG) --glibs)
-HASTHREAD    := $(shell $(ROOTCONFIG) --has-thread)
-ROOTDICTTYPE := $(shell $(ROOTCONFIG) --dicttype)
-ROOTCINT     := rootcint
-
-ifeq ($(ARCH),linux)
-# Linux with egcs, gcc 2.9x, gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxkcc)
-# Linux with the KAI compiler
-CXX           = KCC --one_instantiation_per_object
-CXXFLAGS      = $(OPT) -fPIC +K0
-LD            = KCC
-LDFLAGS       = $(OPT) $(shell $(ROOTCONFIG) --cflags)
-SOFLAGS       =
-endif
-
-ifeq ($(ARCH),linuxicc)
-# Linux with Intel icc compiler
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppcgcc)
-# PPC Linux with gcc and glibc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64gcc)
-# Itanium Linux with gcc 2.9x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64sgi)
-# Itanium Linux with sgiCC
-CXX           = sgiCC
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = gsgiCC
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64ecc)
-# Itanium Linux with Intel icc (was ecc)
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -ftz
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664gcc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppc64gcc)
-# PPC64 Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664icc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -wd1572
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxalphagcc)
-# Alpha Linux with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxmips)
-# GNU/Linux on mips (BE/LE, O32/N32/N64) with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxhppa)
-# GNU/Linux on hppa with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxarm)
-# ARM Linux with egcs
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),macosx)
-# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = g++
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined $(UNDEFOPT)
-endif
-
-ifeq ($(ARCH),macosxicc)
-# MacOS X with Intel icc compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-ifeq ($(MACOSX_MINOR),5)
-MACOSX_MINOR := 4
-endif
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = $(MACOSXTARGET) icpc
-LDFLAGS       = $(OPT)
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosx64)
-# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
-# Only specific option (-m64) comes from root-config
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++ -m64
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -m64 -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosxxlc)
-# MacOS X with IBM xlC compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = xlC
-CXXFLAGS      = $(OPT)
-LD            = $(MACOSXTARGET) xlC
-LDFLAGS       = $(OPT) -Wl,-bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-DllSuf        = dylib
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = xlC
-endif
-SOFLAGS       = -qmkshrobj -single_module -undefined $(UNDEFOPT)
-endif
-
-CXXFLAGS     += $(ROOTCFLAGS)
-LDFLAGS      += $(ROOTLDFLAGS)
-LIBS          = $(ROOTLIBS) $(SYSLIBS)
-GLIBS         = $(ROOTGLIBS) $(SYSLIBS)
-
-INCLUDE		= -I$(CLHEP_BASE_DIR)/include
- 
+include base_Makefile
 #------------------------------------------------------------------------------
 SHARELIB	= SharedLib
 FILLINC		= FillIncludeDir
diff --git a/NPLib/Paris/Makefile b/NPLib/Paris/Makefile
index 3fe9d1d23..4eb407a85 100644
--- a/NPLib/Paris/Makefile
+++ b/NPLib/Paris/Makefile
@@ -1,270 +1,4 @@
-# Makefile for the ROOT test programs.
-# This Makefile shows nicely how to compile and link applications
-# using the ROOT libraries on all supported platforms.
-#
-# Copyright (c) 2000 Rene Brun and Fons Rademakers
-#
-# Author: Fons Rademakers, 29/2/2000
-
-ROOTCONFIG   := root-config
-
-ARCH         := $(shell $(ROOTCONFIG) --arch)
-PLATFORM     := $(shell $(ROOTCONFIG) --platform)
-ALTCC        := $(shell $(ROOTCONFIG) --cc)
-ALTCXX       := $(shell $(ROOTCONFIG) --cxx)
-ALTF77       := $(shell $(ROOTCONFIG) --f77)
-ALTLD        := $(shell $(ROOTCONFIG) --ld)
-
-#CXX           =
-ObjSuf        = o
-SrcSuf        = cxx
-ExeSuf        =
-DllSuf        = so
-OutPutOpt     = -o # keep whitespace after "-o"
-
-ifeq (debug,$(findstring debug,$(ROOTBUILD)))
-OPT           = -g
-OPT2          = -g
-else
-ifneq ($(findstring debug, $(strip $(shell $(ROOTCONFIG) --config))),)
-OPT           = -g
-OPT2          = -g
-else
-OPT           = -O
-OPT2          = -O2
-endif
-endif
-
-ROOTCFLAGS   := $(shell $(ROOTCONFIG) --cflags)
-ROOTLDFLAGS  := $(shell $(ROOTCONFIG) --ldflags)
-ROOTLIBS     := $(shell $(ROOTCONFIG) --libs)
-ROOTGLIBS    := $(shell $(ROOTCONFIG) --glibs)
-HASTHREAD    := $(shell $(ROOTCONFIG) --has-thread)
-ROOTDICTTYPE := $(shell $(ROOTCONFIG) --dicttype)
-ROOTCINT     := rootcint
-
-ifeq ($(ARCH),linux)
-# Linux with egcs, gcc 2.9x, gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxkcc)
-# Linux with the KAI compiler
-CXX           = KCC --one_instantiation_per_object
-CXXFLAGS      = $(OPT) -fPIC +K0
-LD            = KCC
-LDFLAGS       = $(OPT) $(shell $(ROOTCONFIG) --cflags)
-SOFLAGS       =
-endif
-
-ifeq ($(ARCH),linuxicc)
-# Linux with Intel icc compiler
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppcgcc)
-# PPC Linux with gcc and glibc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64gcc)
-# Itanium Linux with gcc 2.9x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64sgi)
-# Itanium Linux with sgiCC
-CXX           = sgiCC
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = gsgiCC
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64ecc)
-# Itanium Linux with Intel icc (was ecc)
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -ftz
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664gcc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppc64gcc)
-# PPC64 Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664icc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -wd1572
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxalphagcc)
-# Alpha Linux with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxmips)
-# GNU/Linux on mips (BE/LE, O32/N32/N64) with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxhppa)
-# GNU/Linux on hppa with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxarm)
-# ARM Linux with egcs
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),macosx)
-# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = g++
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined $(UNDEFOPT)
-endif
-
-ifeq ($(ARCH),macosxicc)
-# MacOS X with Intel icc compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-ifeq ($(MACOSX_MINOR),5)
-MACOSX_MINOR := 4
-endif
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = $(MACOSXTARGET) icpc
-LDFLAGS       = $(OPT)
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosx64)
-# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
-# Only specific option (-m64) comes from root-config
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++ -m64
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -m64 -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosxxlc)
-# MacOS X with IBM xlC compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = xlC
-CXXFLAGS      = $(OPT)
-LD            = $(MACOSXTARGET) xlC
-LDFLAGS       = $(OPT) -Wl,-bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-DllSuf        = dylib
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = xlC
-endif
-SOFLAGS       = -qmkshrobj -single_module -undefined $(UNDEFOPT)
-endif
-
-CXXFLAGS     += $(ROOTCFLAGS)
-LDFLAGS      += $(ROOTLDFLAGS)
-LIBS          = $(ROOTLIBS) $(SYSLIBS)
-GLIBS         = $(ROOTGLIBS) $(SYSLIBS)
-
-INCLUDE		= -I$(CLHEP_BASE_DIR)/include -I$(NPLIB)/include
+include ../base_Makefile
  
 #------------------------------------------------------------------------------
 SHARELIB      =  libParisData.so	libParisPhysics.so 
diff --git a/NPLib/SSSD/Makefile b/NPLib/SSSD/Makefile
index 95d06e3e3..66a476eda 100755
--- a/NPLib/SSSD/Makefile
+++ b/NPLib/SSSD/Makefile
@@ -1,270 +1,4 @@
-# Makefile for the ROOT test programs.
-# This Makefile shows nicely how to compile and link applications
-# using the ROOT libraries on all supported platforms.
-#
-# Copyright (c) 2000 Rene Brun and Fons Rademakers
-#
-# Author: Fons Rademakers, 29/2/2000
-
-ROOTCONFIG   := root-config
-
-ARCH         := $(shell $(ROOTCONFIG) --arch)
-PLATFORM     := $(shell $(ROOTCONFIG) --platform)
-ALTCC        := $(shell $(ROOTCONFIG) --cc)
-ALTCXX       := $(shell $(ROOTCONFIG) --cxx)
-ALTF77       := $(shell $(ROOTCONFIG) --f77)
-ALTLD        := $(shell $(ROOTCONFIG) --ld)
-
-#CXX           =
-ObjSuf        = o
-SrcSuf        = cxx
-ExeSuf        =
-DllSuf        = so
-OutPutOpt     = -o # keep whitespace after "-o"
-
-ifeq (debug,$(findstring debug,$(ROOTBUILD)))
-OPT           = -g
-OPT2          = -g
-else
-ifneq ($(findstring debug, $(strip $(shell $(ROOTCONFIG) --config))),)
-OPT           = -g
-OPT2          = -g
-else
-OPT           = -O
-OPT2          = -O2
-endif
-endif
-
-ROOTCFLAGS   := $(shell $(ROOTCONFIG) --cflags)
-ROOTLDFLAGS  := $(shell $(ROOTCONFIG) --ldflags)
-ROOTLIBS     := $(shell $(ROOTCONFIG) --libs)
-ROOTGLIBS    := $(shell $(ROOTCONFIG) --glibs)
-HASTHREAD    := $(shell $(ROOTCONFIG) --has-thread)
-ROOTDICTTYPE := $(shell $(ROOTCONFIG) --dicttype)
-ROOTCINT     := rootcint
-
-ifeq ($(ARCH),linux)
-# Linux with egcs, gcc 2.9x, gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxkcc)
-# Linux with the KAI compiler
-CXX           = KCC --one_instantiation_per_object
-CXXFLAGS      = $(OPT) -fPIC +K0
-LD            = KCC
-LDFLAGS       = $(OPT) $(shell $(ROOTCONFIG) --cflags)
-SOFLAGS       =
-endif
-
-ifeq ($(ARCH),linuxicc)
-# Linux with Intel icc compiler
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppcgcc)
-# PPC Linux with gcc and glibc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64gcc)
-# Itanium Linux with gcc 2.9x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64sgi)
-# Itanium Linux with sgiCC
-CXX           = sgiCC
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = gsgiCC
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64ecc)
-# Itanium Linux with Intel icc (was ecc)
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -ftz
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664gcc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppc64gcc)
-# PPC64 Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664icc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -wd1572
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxalphagcc)
-# Alpha Linux with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxmips)
-# GNU/Linux on mips (BE/LE, O32/N32/N64) with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxhppa)
-# GNU/Linux on hppa with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxarm)
-# ARM Linux with egcs
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),macosx)
-# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = g++
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined $(UNDEFOPT)
-endif
-
-ifeq ($(ARCH),macosxicc)
-# MacOS X with Intel icc compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-ifeq ($(MACOSX_MINOR),5)
-MACOSX_MINOR := 4
-endif
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = $(MACOSXTARGET) icpc
-LDFLAGS       = $(OPT)
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosx64)
-# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
-# Only specific option (-m64) comes from root-config
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++ -m64
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -m64 -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosxxlc)
-# MacOS X with IBM xlC compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = xlC
-CXXFLAGS      = $(OPT)
-LD            = $(MACOSXTARGET) xlC
-LDFLAGS       = $(OPT) -Wl,-bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-DllSuf        = dylib
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = xlC
-endif
-SOFLAGS       = -qmkshrobj -single_module -undefined $(UNDEFOPT)
-endif
-
-CXXFLAGS     += $(ROOTCFLAGS)
-LDFLAGS      += $(ROOTLDFLAGS)
-LIBS          = $(ROOTLIBS) $(SYSLIBS)
-GLIBS         = $(ROOTGLIBS) $(SYSLIBS)
-
-INCLUDE		= -I$(CLHEP_BASE_DIR)/include -I$(NPLIB)/include
+include ../base_Makefile
  
 #------------------------------------------------------------------------------
 SHARELIB      =  libSSSDData.so libSSSDPhysics.so
diff --git a/NPLib/Shield/Makefile b/NPLib/Shield/Makefile
index b06b5851b..2d3499be0 100644
--- a/NPLib/Shield/Makefile
+++ b/NPLib/Shield/Makefile
@@ -1,271 +1,5 @@
-# Makefile for the ROOT test programs.
-# This Makefile shows nicely how to compile and link applications
-# using the ROOT libraries on all supported platforms.
-#
-# Copyright (c) 2000 Rene Brun and Fons Rademakers
-#
-# Author: Fons Rademakers, 29/2/2000
+include ../base_Makefile
 
-ROOTCONFIG   := root-config
-
-ARCH         := $(shell $(ROOTCONFIG) --arch)
-PLATFORM     := $(shell $(ROOTCONFIG) --platform)
-ALTCC        := $(shell $(ROOTCONFIG) --cc)
-ALTCXX       := $(shell $(ROOTCONFIG) --cxx)
-ALTF77       := $(shell $(ROOTCONFIG) --f77)
-ALTLD        := $(shell $(ROOTCONFIG) --ld)
-
-#CXX           =
-ObjSuf        = o
-SrcSuf        = cxx
-ExeSuf        =
-DllSuf        = so
-OutPutOpt     = -o # keep whitespace after "-o"
-
-ifeq (debug,$(findstring debug,$(ROOTBUILD)))
-OPT           = -g
-OPT2          = -g
-else
-ifneq ($(findstring debug, $(strip $(shell $(ROOTCONFIG) --config))),)
-OPT           = -g
-OPT2          = -g
-else
-OPT           = -O
-OPT2          = -O2
-endif
-endif
-
-ROOTCFLAGS   := $(shell $(ROOTCONFIG) --cflags)
-ROOTLDFLAGS  := $(shell $(ROOTCONFIG) --ldflags)
-ROOTLIBS     := $(shell $(ROOTCONFIG) --libs)
-ROOTGLIBS    := $(shell $(ROOTCONFIG) --glibs)
-HASTHREAD    := $(shell $(ROOTCONFIG) --has-thread)
-ROOTDICTTYPE := $(shell $(ROOTCONFIG) --dicttype)
-ROOTCINT     := rootcint
-
-ifeq ($(ARCH),linux)
-# Linux with egcs, gcc 2.9x, gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxkcc)
-# Linux with the KAI compiler
-CXX           = KCC --one_instantiation_per_object
-CXXFLAGS      = $(OPT) -fPIC +K0
-LD            = KCC
-LDFLAGS       = $(OPT) $(shell $(ROOTCONFIG) --cflags)
-SOFLAGS       =
-endif
-
-ifeq ($(ARCH),linuxicc)
-# Linux with Intel icc compiler
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppcgcc)
-# PPC Linux with gcc and glibc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64gcc)
-# Itanium Linux with gcc 2.9x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64sgi)
-# Itanium Linux with sgiCC
-CXX           = sgiCC
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = gsgiCC
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64ecc)
-# Itanium Linux with Intel icc (was ecc)
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -ftz
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664gcc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppc64gcc)
-# PPC64 Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664icc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -wd1572
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxalphagcc)
-# Alpha Linux with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxmips)
-# GNU/Linux on mips (BE/LE, O32/N32/N64) with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxhppa)
-# GNU/Linux on hppa with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxarm)
-# ARM Linux with egcs
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),macosx)
-# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = g++
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined $(UNDEFOPT)
-endif
-
-ifeq ($(ARCH),macosxicc)
-# MacOS X with Intel icc compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-ifeq ($(MACOSX_MINOR),5)
-MACOSX_MINOR := 4
-endif
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = $(MACOSXTARGET) icpc
-LDFLAGS       = $(OPT)
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosx64)
-# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
-# Only specific option (-m64) comes from root-config
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++ -m64
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -m64 -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosxxlc)
-# MacOS X with IBM xlC compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = xlC
-CXXFLAGS      = $(OPT)
-LD            = $(MACOSXTARGET) xlC
-LDFLAGS       = $(OPT) -Wl,-bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-DllSuf        = dylib
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = xlC
-endif
-SOFLAGS       = -qmkshrobj -single_module -undefined $(UNDEFOPT)
-endif
-
-CXXFLAGS     += $(ROOTCFLAGS)
-LDFLAGS      += $(ROOTLDFLAGS)
-LIBS          = $(ROOTLIBS) $(SYSLIBS)
-GLIBS         = $(ROOTGLIBS) $(SYSLIBS)
-
-INCLUDE		= -I$(CLHEP_BASE_DIR)/include -I$(NPLIB)/include
- 
 #------------------------------------------------------------------------------
 SHARELIB      =  libShieldData.so 	libShieldPhysics.so
 
diff --git a/NPLib/Tools/Makefile b/NPLib/Tools/Makefile
index 54693b981..34a853636 100644
--- a/NPLib/Tools/Makefile
+++ b/NPLib/Tools/Makefile
@@ -1,270 +1,4 @@
-# Makefile for the ROOT test programs.
-# This Makefile shows nicely how to compile and link applications
-# using the ROOT libraries on all supported platforms.
-#
-# Copyright (c) 2000 Rene Brun and Fons Rademakers
-#
-# Author: Fons Rademakers, 29/2/2000
-
-ROOTCONFIG   := root-config
-
-ARCH         := $(shell $(ROOTCONFIG) --arch)
-PLATFORM     := $(shell $(ROOTCONFIG) --platform)
-ALTCC        := $(shell $(ROOTCONFIG) --cc)
-ALTCXX       := $(shell $(ROOTCONFIG) --cxx)
-ALTF77       := $(shell $(ROOTCONFIG) --f77)
-ALTLD        := $(shell $(ROOTCONFIG) --ld)
-
-#CXX           =
-ObjSuf        = o
-SrcSuf        = cxx
-ExeSuf        =
-DllSuf        = so
-OutPutOpt     = -o # keep whitespace after "-o"
-
-ifeq (debug,$(findstring debug,$(ROOTBUILD)))
-OPT           = -g
-OPT2          = -g
-else
-ifneq ($(findstring debug, $(strip $(shell $(ROOTCONFIG) --config))),)
-OPT           = -g
-OPT2          = -g
-else
-OPT           = -O
-OPT2          = -O2
-endif
-endif
-
-ROOTCFLAGS   := $(shell $(ROOTCONFIG) --cflags)
-ROOTLDFLAGS  := $(shell $(ROOTCONFIG) --ldflags)
-ROOTLIBS     := $(shell $(ROOTCONFIG) --libs)
-ROOTGLIBS    := $(shell $(ROOTCONFIG) --glibs)
-HASTHREAD    := $(shell $(ROOTCONFIG) --has-thread)
-ROOTDICTTYPE := $(shell $(ROOTCONFIG) --dicttype)
-ROOTCINT     := rootcint
-
-ifeq ($(ARCH),linux)
-# Linux with egcs, gcc 2.9x, gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxkcc)
-# Linux with the KAI compiler
-CXX           = KCC --one_instantiation_per_object
-CXXFLAGS      = $(OPT) -fPIC +K0
-LD            = KCC
-LDFLAGS       = $(OPT) $(shell $(ROOTCONFIG) --cflags)
-SOFLAGS       =
-endif
-
-ifeq ($(ARCH),linuxicc)
-# Linux with Intel icc compiler
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppcgcc)
-# PPC Linux with gcc and glibc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64gcc)
-# Itanium Linux with gcc 2.9x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64sgi)
-# Itanium Linux with sgiCC
-CXX           = sgiCC
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = gsgiCC
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64ecc)
-# Itanium Linux with Intel icc (was ecc)
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -ftz
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664gcc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppc64gcc)
-# PPC64 Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664icc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -wd1572
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxalphagcc)
-# Alpha Linux with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxmips)
-# GNU/Linux on mips (BE/LE, O32/N32/N64) with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxhppa)
-# GNU/Linux on hppa with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxarm)
-# ARM Linux with egcs
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),macosx)
-# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = g++
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined $(UNDEFOPT)
-endif
-
-ifeq ($(ARCH),macosxicc)
-# MacOS X with Intel icc compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-ifeq ($(MACOSX_MINOR),5)
-MACOSX_MINOR := 4
-endif
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = $(MACOSXTARGET) icpc
-LDFLAGS       = $(OPT)
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosx64)
-# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
-# Only specific option (-m64) comes from root-config
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++ -m64
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -m64 -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosxxlc)
-# MacOS X with IBM xlC compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = xlC
-CXXFLAGS      = $(OPT)
-LD            = $(MACOSXTARGET) xlC
-LDFLAGS       = $(OPT) -Wl,-bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-DllSuf        = dylib
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = xlC
-endif
-SOFLAGS       = -qmkshrobj -single_module -undefined $(UNDEFOPT)
-endif
-
-CXXFLAGS     += $(ROOTCFLAGS)
-LDFLAGS      += $(ROOTLDFLAGS)
-LIBS          = $(ROOTLIBS) $(SYSLIBS)
-GLIBS         = $(ROOTGLIBS) $(SYSLIBS)
-
-INCLUDE		= -I$(CLHEP_BASE_DIR)/include
+include ../base_Makefile
  
 #------------------------------------------------------------------------------
 SHARELIB      = libReaction.so libEnergyLoss.so libTagManager.so libOptionManager.so
diff --git a/NPLib/VDetector/Makefile b/NPLib/VDetector/Makefile
index 450913cc3..22b771581 100644
--- a/NPLib/VDetector/Makefile
+++ b/NPLib/VDetector/Makefile
@@ -1,270 +1,4 @@
-# Makefile for the ROOT test programs.
-# This Makefile shows nicely how to compile and link applications
-# using the ROOT libraries on all supported platforms.
-#
-# Copyright (c) 2000 Rene Brun and Fons Rademakers
-#
-# Author: Fons Rademakers, 29/2/2000
-
-ROOTCONFIG   := root-config
-
-ARCH         := $(shell $(ROOTCONFIG) --arch)
-PLATFORM     := $(shell $(ROOTCONFIG) --platform)
-ALTCC        := $(shell $(ROOTCONFIG) --cc)
-ALTCXX       := $(shell $(ROOTCONFIG) --cxx)
-ALTF77       := $(shell $(ROOTCONFIG) --f77)
-ALTLD        := $(shell $(ROOTCONFIG) --ld)
-
-#CXX           =
-ObjSuf        = o
-SrcSuf        = cxx
-ExeSuf        =
-DllSuf        = so
-OutPutOpt     = -o # keep whitespace after "-o"
-
-ifeq (debug,$(findstring debug,$(ROOTBUILD)))
-OPT           = -g
-OPT2          = -g
-else
-ifneq ($(findstring debug, $(strip $(shell $(ROOTCONFIG) --config))),)
-OPT           = -g
-OPT2          = -g
-else
-OPT           = -O
-OPT2          = -O2
-endif
-endif
-
-ROOTCFLAGS   := $(shell $(ROOTCONFIG) --cflags)
-ROOTLDFLAGS  := $(shell $(ROOTCONFIG) --ldflags)
-ROOTLIBS     := $(shell $(ROOTCONFIG) --libs)
-ROOTGLIBS    := $(shell $(ROOTCONFIG) --glibs)
-HASTHREAD    := $(shell $(ROOTCONFIG) --has-thread)
-ROOTDICTTYPE := $(shell $(ROOTCONFIG) --dicttype)
-ROOTCINT     := rootcint
-
-ifeq ($(ARCH),linux)
-# Linux with egcs, gcc 2.9x, gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxkcc)
-# Linux with the KAI compiler
-CXX           = KCC --one_instantiation_per_object
-CXXFLAGS      = $(OPT) -fPIC +K0
-LD            = KCC
-LDFLAGS       = $(OPT) $(shell $(ROOTCONFIG) --cflags)
-SOFLAGS       =
-endif
-
-ifeq ($(ARCH),linuxicc)
-# Linux with Intel icc compiler
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppcgcc)
-# PPC Linux with gcc and glibc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64gcc)
-# Itanium Linux with gcc 2.9x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64sgi)
-# Itanium Linux with sgiCC
-CXX           = sgiCC
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = gsgiCC
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64ecc)
-# Itanium Linux with Intel icc (was ecc)
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -ftz
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664gcc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppc64gcc)
-# PPC64 Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664icc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -wd1572
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxalphagcc)
-# Alpha Linux with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxmips)
-# GNU/Linux on mips (BE/LE, O32/N32/N64) with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxhppa)
-# GNU/Linux on hppa with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxarm)
-# ARM Linux with egcs
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),macosx)
-# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = g++
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined $(UNDEFOPT)
-endif
-
-ifeq ($(ARCH),macosxicc)
-# MacOS X with Intel icc compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-ifeq ($(MACOSX_MINOR),5)
-MACOSX_MINOR := 4
-endif
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = $(MACOSXTARGET) icpc
-LDFLAGS       = $(OPT)
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosx64)
-# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
-# Only specific option (-m64) comes from root-config
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++ -m64
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -m64 -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosxxlc)
-# MacOS X with IBM xlC compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = xlC
-CXXFLAGS      = $(OPT)
-LD            = $(MACOSXTARGET) xlC
-LDFLAGS       = $(OPT) -Wl,-bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-DllSuf        = dylib
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = xlC
-endif
-SOFLAGS       = -qmkshrobj -single_module -undefined $(UNDEFOPT)
-endif
-
-CXXFLAGS     += $(ROOTCFLAGS)
-LDFLAGS      += $(ROOTLDFLAGS)
-LIBS          = $(ROOTLIBS) $(SYSLIBS)
-GLIBS         = $(ROOTGLIBS) $(SYSLIBS)
-
-INCLUDE		= -I$(CLHEP_BASE_DIR)/include
+include ../base_Makefile
  
 #------------------------------------------------------------------------------
 SHARELIB      =  libVDetector.so libDetectorManager.so
diff --git a/NPLib/W1/Makefile b/NPLib/W1/Makefile
index 200ef4a91..36a433c29 100644
--- a/NPLib/W1/Makefile
+++ b/NPLib/W1/Makefile
@@ -1,270 +1,4 @@
-# Makefile for the ROOT test programs.
-# This Makefile shows nicely how to compile and link applications
-# using the ROOT libraries on all supported platforms.
-#
-# Copyright (c) 2000 Rene Brun and Fons Rademakers
-#
-# Author: Fons Rademakers, 29/2/2000
-
-ROOTCONFIG   := root-config
-
-ARCH         := $(shell $(ROOTCONFIG) --arch)
-PLATFORM     := $(shell $(ROOTCONFIG) --platform)
-ALTCC        := $(shell $(ROOTCONFIG) --cc)
-ALTCXX       := $(shell $(ROOTCONFIG) --cxx)
-ALTF77       := $(shell $(ROOTCONFIG) --f77)
-ALTLD        := $(shell $(ROOTCONFIG) --ld)
-
-#CXX           =
-ObjSuf        = o
-SrcSuf        = cxx
-ExeSuf        =
-DllSuf        = so
-OutPutOpt     = -o # keep whitespace after "-o"
-
-ifeq (debug,$(findstring debug,$(ROOTBUILD)))
-OPT           = -g
-OPT2          = -g
-else
-ifneq ($(findstring debug, $(strip $(shell $(ROOTCONFIG) --config))),)
-OPT           = -g
-OPT2          = -g
-else
-OPT           = -O
-OPT2          = -O2
-endif
-endif
-
-ROOTCFLAGS   := $(shell $(ROOTCONFIG) --cflags)
-ROOTLDFLAGS  := $(shell $(ROOTCONFIG) --ldflags)
-ROOTLIBS     := $(shell $(ROOTCONFIG) --libs)
-ROOTGLIBS    := $(shell $(ROOTCONFIG) --glibs)
-HASTHREAD    := $(shell $(ROOTCONFIG) --has-thread)
-ROOTDICTTYPE := $(shell $(ROOTCONFIG) --dicttype)
-ROOTCINT     := rootcint
-
-ifeq ($(ARCH),linux)
-# Linux with egcs, gcc 2.9x, gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxkcc)
-# Linux with the KAI compiler
-CXX           = KCC --one_instantiation_per_object
-CXXFLAGS      = $(OPT) -fPIC +K0
-LD            = KCC
-LDFLAGS       = $(OPT) $(shell $(ROOTCONFIG) --cflags)
-SOFLAGS       =
-endif
-
-ifeq ($(ARCH),linuxicc)
-# Linux with Intel icc compiler
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppcgcc)
-# PPC Linux with gcc and glibc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64gcc)
-# Itanium Linux with gcc 2.9x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64sgi)
-# Itanium Linux with sgiCC
-CXX           = sgiCC
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = gsgiCC
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxia64ecc)
-# Itanium Linux with Intel icc (was ecc)
-ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f1)
-ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
-                cut -d'.' -f2)
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -ftz
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664gcc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxppc64gcc)
-# PPC64 Linux with gcc 3.x
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxx8664icc)
-# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476 -wd1572
-LD            = icpc
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxalphagcc)
-# Alpha Linux with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxmips)
-# GNU/Linux on mips (BE/LE, O32/N32/N64) with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxhppa)
-# GNU/Linux on hppa with gcc
-CXX           = g++
-CXXFLAGS      = $(OPT2) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT2)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),linuxarm)
-# ARM Linux with egcs
-CXX           = g++
-CXXFLAGS      = $(OPT) -Wall -fPIC
-LD            = g++
-LDFLAGS       = $(OPT)
-SOFLAGS       = -shared
-endif
-
-ifeq ($(ARCH),macosx)
-# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = g++
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined $(UNDEFOPT)
-endif
-
-ifeq ($(ARCH),macosxicc)
-# MacOS X with Intel icc compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-ifeq ($(MACOSX_MINOR),5)
-MACOSX_MINOR := 4
-endif
-CXX           = icc
-CXXFLAGS      = $(OPT) -fPIC -wd1476
-LD            = $(MACOSXTARGET) icpc
-LDFLAGS       = $(OPT)
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosx64)
-# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
-# Only specific option (-m64) comes from root-config
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = g++
-CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
-LD            = $(MACOSXTARGET) g++ -m64
-LDFLAGS       = $(OPT2) -bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
-DllSuf        = so
-else
-DllSuf        = dylib
-endif
-SOFLAGS       = -m64 -dynamiclib -single_module -undefined dynamic_lookup
-endif
-
-ifeq ($(ARCH),macosxxlc)
-# MacOS X with IBM xlC compiler
-MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
-MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
-CXX           = xlC
-CXXFLAGS      = $(OPT)
-LD            = $(MACOSXTARGET) xlC
-LDFLAGS       = $(OPT) -Wl,-bind_at_load
-# The SOFLAGS will be used to create the .dylib,
-# the .so will be created separately
-DllSuf        = dylib
-UNDEFOPT      = dynamic_lookup
-ifneq ($(subst $(MACOSX_MINOR),,12),12)
-UNDEFOPT      = suppress
-LD            = xlC
-endif
-SOFLAGS       = -qmkshrobj -single_module -undefined $(UNDEFOPT)
-endif
-
-CXXFLAGS     += $(ROOTCFLAGS)
-LDFLAGS      += $(ROOTLDFLAGS)
-LIBS          = $(ROOTLIBS) $(SYSLIBS)
-GLIBS         = $(ROOTGLIBS) $(SYSLIBS)
-
-INCLUDE		= -I$(CLHEP_BASE_DIR)/include -I$(NPLIB)/include
+include ../base_Makefile
  
 #------------------------------------------------------------------------------
 SHARELIB      =  libW1Data.so libW1Physics.so
diff --git a/NPLib/base_Makefile b/NPLib/base_Makefile
new file mode 100644
index 000000000..43f3e0b1c
--- /dev/null
+++ b/NPLib/base_Makefile
@@ -0,0 +1,268 @@
+# Makefile for the ROOT test programs.
+# This Makefile shows nicely how to compile and link applications
+# using the ROOT libraries on all supported platforms.
+#
+# Copyright (c) 2000 Rene Brun and Fons Rademakers
+#
+# Author: Fons Rademakers, 29/2/2000
+
+ROOTCONFIG   := root-config
+
+ARCH         := $(shell $(ROOTCONFIG) --arch)
+PLATFORM     := $(shell $(ROOTCONFIG) --platform)
+ALTCC        := $(shell $(ROOTCONFIG) --cc)
+ALTCXX       := $(shell $(ROOTCONFIG) --cxx)
+ALTF77       := $(shell $(ROOTCONFIG) --f77)
+ALTLD        := $(shell $(ROOTCONFIG) --ld)
+
+#CXX           =
+ObjSuf        = o
+SrcSuf        = cxx
+ExeSuf        =
+DllSuf        = so
+OutPutOpt     = -o # keep whitespace after "-o"
+
+ifeq (debug,$(findstring debug,$(ROOTBUILD)))
+OPT           = -g
+OPT2          = -g
+else
+ifneq ($(findstring debug, $(strip $(shell $(ROOTCONFIG) --config))),)
+OPT           = -g
+OPT2          = -g
+else
+OPT           = -O
+OPT2          = -O2
+endif
+endif
+
+ROOTCFLAGS   := $(shell $(ROOTCONFIG) --cflags)
+ROOTLDFLAGS  := $(shell $(ROOTCONFIG) --ldflags)
+ROOTLIBS     := $(shell $(ROOTCONFIG) --libs)
+ROOTGLIBS    := $(shell $(ROOTCONFIG) --glibs)
+HASTHREAD    := $(shell $(ROOTCONFIG) --has-thread)
+ROOTDICTTYPE := $(shell $(ROOTCONFIG) --dicttype)
+ROOTCINT     := rootcint
+
+ifeq ($(ARCH),linux)
+# Linux with egcs, gcc 2.9x, gcc 3.x
+CXX           = g++
+CXXFLAGS      = $(OPT2) -Wall -fPIC
+LD            = g++
+LDFLAGS       = $(OPT2)
+SOFLAGS       = -shared
+endif
+
+ifeq ($(ARCH),linuxkcc)
+# Linux with the KAI compiler
+CXX           = KCC --one_instantiation_per_object
+CXXFLAGS      = $(OPT) -fPIC +K0
+LD            = KCC
+LDFLAGS       = $(OPT) $(shell $(ROOTCONFIG) --cflags)
+SOFLAGS       =
+endif
+
+ifeq ($(ARCH),linuxicc)
+# Linux with Intel icc compiler
+ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+                cut -d'.' -f1)
+ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+                cut -d'.' -f2)
+CXX           = icc
+CXXFLAGS      = $(OPT) -fPIC -wd1476
+LD            = icpc
+LDFLAGS       = $(OPT)
+SOFLAGS       = -shared
+endif
+
+ifeq ($(ARCH),linuxppcgcc)
+# PPC Linux with gcc and glibc
+CXX           = g++
+CXXFLAGS      = $(OPT2) -Wall -fPIC
+LD            = g++
+LDFLAGS       = $(OPT2)
+SOFLAGS       = -shared
+endif
+
+ifeq ($(ARCH),linuxia64gcc)
+# Itanium Linux with gcc 2.9x
+CXX           = g++
+CXXFLAGS      = $(OPT2) -Wall -fPIC
+LD            = g++
+LDFLAGS       = $(OPT2)
+SOFLAGS       = -shared
+endif
+
+ifeq ($(ARCH),linuxia64sgi)
+# Itanium Linux with sgiCC
+CXX           = sgiCC
+CXXFLAGS      = $(OPT) -Wall -fPIC
+LD            = gsgiCC
+LDFLAGS       = $(OPT)
+SOFLAGS       = -shared
+endif
+
+ifeq ($(ARCH),linuxia64ecc)
+# Itanium Linux with Intel icc (was ecc)
+ICC_MAJOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+                cut -d'.' -f1)
+ICC_MINOR    := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
+                cut -d'.' -f2)
+CXX           = icc
+CXXFLAGS      = $(OPT) -fPIC -wd1476 -ftz
+LD            = icpc
+LDFLAGS       = $(OPT)
+SOFLAGS       = -shared
+endif
+
+ifeq ($(ARCH),linuxx8664gcc)
+# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
+CXX           = g++
+CXXFLAGS      = $(OPT2) -Wall -fPIC
+LD            = g++
+LDFLAGS       = $(OPT2)
+SOFLAGS       = -shared
+endif
+
+ifeq ($(ARCH),linuxppc64gcc)
+# PPC64 Linux with gcc 3.x
+CXX           = g++
+CXXFLAGS      = $(OPT) -Wall -fPIC
+LD            = g++
+LDFLAGS       = $(OPT)
+SOFLAGS       = -shared
+endif
+
+ifeq ($(ARCH),linuxx8664icc)
+# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
+CXX           = icc
+CXXFLAGS      = $(OPT) -fPIC -wd1476 -wd1572
+LD            = icpc
+LDFLAGS       = $(OPT)
+SOFLAGS       = -shared
+endif
+
+ifeq ($(ARCH),linuxalphagcc)
+# Alpha Linux with gcc
+CXX           = g++
+CXXFLAGS      = $(OPT2) -Wall -fPIC
+LD            = g++
+LDFLAGS       = $(OPT2)
+SOFLAGS       = -shared
+endif
+
+ifeq ($(ARCH),linuxmips)
+# GNU/Linux on mips (BE/LE, O32/N32/N64) with gcc
+CXX           = g++
+CXXFLAGS      = $(OPT2) -Wall -fPIC
+LD            = g++
+LDFLAGS       = $(OPT2)
+SOFLAGS       = -shared
+endif
+
+ifeq ($(ARCH),linuxhppa)
+# GNU/Linux on hppa with gcc
+CXX           = g++
+CXXFLAGS      = $(OPT2) -Wall -fPIC
+LD            = g++
+LDFLAGS       = $(OPT2)
+SOFLAGS       = -shared
+endif
+
+ifeq ($(ARCH),linuxarm)
+# ARM Linux with egcs
+CXX           = g++
+CXXFLAGS      = $(OPT) -Wall -fPIC
+LD            = g++
+LDFLAGS       = $(OPT)
+SOFLAGS       = -shared
+endif
+
+ifeq ($(ARCH),macosx)
+# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
+CXX           = g++
+CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
+LD            = $(MACOSXTARGET) g++
+LDFLAGS       = $(OPT2) -bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
+DllSuf        = so
+else
+DllSuf        = dylib
+endif
+UNDEFOPT      = dynamic_lookup
+ifneq ($(subst $(MACOSX_MINOR),,12),12)
+UNDEFOPT      = suppress
+LD            = g++
+endif
+SOFLAGS       = -dynamiclib -single_module -undefined $(UNDEFOPT)
+endif
+
+ifeq ($(ARCH),macosxicc)
+# MacOS X with Intel icc compiler
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
+ifeq ($(MACOSX_MINOR),5)
+MACOSX_MINOR := 4
+endif
+CXX           = icc
+CXXFLAGS      = $(OPT) -fPIC -wd1476
+LD            = $(MACOSXTARGET) icpc
+LDFLAGS       = $(OPT)
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
+DllSuf        = so
+else
+DllSuf        = dylib
+endif
+SOFLAGS       = -dynamiclib -single_module -undefined dynamic_lookup
+endif
+
+ifeq ($(ARCH),macosx64)
+# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
+# Only specific option (-m64) comes from root-config
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
+CXX           = g++
+CXXFLAGS      = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
+LD            = $(MACOSXTARGET) g++ -m64
+LDFLAGS       = $(OPT2) -bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
+DllSuf        = so
+else
+DllSuf        = dylib
+endif
+SOFLAGS       = -m64 -dynamiclib -single_module -undefined dynamic_lookup
+endif
+
+ifeq ($(ARCH),macosxxlc)
+# MacOS X with IBM xlC compiler
+MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
+MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
+CXX           = xlC
+CXXFLAGS      = $(OPT)
+LD            = $(MACOSXTARGET) xlC
+LDFLAGS       = $(OPT) -Wl,-bind_at_load
+# The SOFLAGS will be used to create the .dylib,
+# the .so will be created separately
+DllSuf        = dylib
+UNDEFOPT      = dynamic_lookup
+ifneq ($(subst $(MACOSX_MINOR),,12),12)
+UNDEFOPT      = suppress
+LD            = xlC
+endif
+SOFLAGS       = -qmkshrobj -single_module -undefined $(UNDEFOPT)
+endif
+
+CXXFLAGS     += $(ROOTCFLAGS)
+LDFLAGS      += $(ROOTLDFLAGS)
+LIBS          = $(ROOTLIBS) $(SYSLIBS)
+GLIBS         = $(ROOTGLIBS) $(SYSLIBS)
+
+INCLUDE		= -I$(CLHEP_BASE_DIR)/include -I$(NPLIB)/include
+
-- 
GitLab