3 |
############################### geant4vmc Makefile ########################### |
############################### geant4vmc Makefile ########################### |
4 |
|
|
5 |
|
|
6 |
PACKAGE = Pam_VMC |
PACKAGE = PamVMC_fc |
7 |
|
|
8 |
ifeq ($(PLATFORM),) |
ifeq ($(PLATFORM),) |
9 |
PLATFORM = $(shell root-config --arch) |
PLATFORM = $(shell root-config --arch) |
16 |
ifeq ($(ROOTSYS),) |
ifeq ($(ROOTSYS),) |
17 |
ROOT_INCDIR = $(shell root-config --incdir) |
ROOT_INCDIR = $(shell root-config --incdir) |
18 |
ROOT_BINDIR = $(shell root-config --prefix)/bin |
ROOT_BINDIR = $(shell root-config --prefix)/bin |
19 |
|
ROOT_ETCDIR = $(shell root-config --prefix)/etc/vmc |
20 |
else |
else |
21 |
ROOT_INCDIR = $(ROOTSYS)/include |
ROOT_INCDIR = $(ROOTSYS)/include |
22 |
ROOT_BINDIR = $(ROOTSYS)/bin |
ROOT_BINDIR = $(ROOTSYS)/bin |
23 |
|
ROOT_ETCDIR = $(ROOTSYS)/etc/vmc |
24 |
endif |
endif |
25 |
|
|
26 |
include $(TOPDIR)/config/Makefile.$(PLATFORM) |
include $(ROOT_ETCDIR)/Makefile.$(PLATFORM) |
27 |
|
|
28 |
############################### Sources ####################################### |
############################### Sources ####################################### |
29 |
|
|
30 |
# Rules |
# Rules |
31 |
# |
# |
32 |
include $(TOPDIR)/config/MakeRules |
include $(ROOT_ETCDIR)/MakeRules |
33 |
|
|
34 |
# Dictionary |
# Dictionary |
35 |
# |
# |
36 |
GDICT := $(BINDIR)/$(PACKAGE)Cint.cxx |
GDICT := $(BINDIR)/$(PACKAGE)Cint.cxx |
37 |
GDICTH := $(GDICT:.cxx=.h) |
GDICTH := $(GDICT:.cxx=.h) |
38 |
GDICTO := $(patsubst %.cxx,$(BINDIR)/%.o,$(GDICT)) |
GDICTO := $(patsubst %.cxx,%.o,$(GDICT)) |
39 |
|
|
40 |
# Sources |
# Sources |
41 |
# |
# |
42 |
CXXSRC := $(wildcard src/*.cxx) |
CXXSRC := $(wildcard src/*.cxx) |
43 |
SRCS := $(CXXSRC) |
CALSRC := $(wildcard cal/src/*.cxx) |
44 |
|
TRKSRC := $(wildcard trk/src/*.cxx) |
45 |
|
TRKFSRCS :=$(wildcard trk/src/f77/*.F) |
46 |
|
TOFSRC := $(wildcard tof/src/*.cxx) |
47 |
|
ACSRC := $(wildcard ac/src/*.cxx) |
48 |
|
S4SRC := $(wildcard s4/src/*.cxx) |
49 |
|
NDSRC := $(wildcard nd/src/*.cxx) |
50 |
|
|
51 |
|
|
52 |
|
SRCS := $(CXXSRC) $(CALSRC) $(TRKSRC) $(TOFSRC) $(ACSRC) $(S4SRC) $(NDSRC) |
53 |
|
FSRCS := $(TRKFSRCS) |
54 |
|
|
55 |
|
|
56 |
# C++ Headers |
# C++ Headers |
57 |
# |
# |
58 |
HDRS := $(wildcard inc/*.h) |
HDRS := $(wildcard include/*.h) |
59 |
HDRS := $(filter-out inc/$(PACKAGE)LinkDef.h,$(HDRS)) |
HDRS += $(wildcard cal/include/*.h) |
60 |
HDRS += inc/$(PACKAGE)LinkDef.h |
HDRS += $(wildcard trk/include/*.h) |
61 |
|
HDRS += $(wildcard tof/include/*.h) |
62 |
|
HDRS += $(wildcard ac/include/*.h) |
63 |
|
HDRS += $(wildcard s4/include/*.h) |
64 |
|
HDRS += $(wildcard nd/include/*.h) |
65 |
|
|
66 |
|
HDRS := $(filter-out include/$(PACKAGE)LinkDef.h,$(HDRS)) |
67 |
|
HDRS += include/$(PACKAGE)LinkDef.h |
68 |
|
|
69 |
# Objects |
# Objects |
70 |
# |
# |
71 |
CXXOBJ := $(patsubst %.cxx,$(BINDIR)/%.o,$(CXXSRC)) |
CXXOBJ := $(patsubst %.cxx,$(BINDIR)/%.o,$(SRCS)) |
72 |
OBJS := $(CXXOBJ) $(GDICTO) |
FOBJ := $(patsubst %.F,$(BINDIR)/%.o,$(FSRCS)) |
73 |
|
OBJS := $(CXXOBJ) $(GDICTO) $(FOBJ) |
74 |
|
|
75 |
# PAMELA LIBS |
# PAMELA LIBS |
76 |
# |
# |
77 |
PAMLIBS := -L${PAM_LIB} -lTrkLevel2 |
#ALIROOT=/home/nikolas/francesco/aliroot/test/pro/ |
78 |
|
ALIROOT=/home/nikolas/francesco/vmc/fluka_vmc/ |
79 |
|
#PAMLIBS := -L${PAM_LIB} -lTrkLevel2 -L${ALIROOT}/lib/tgt_linux/ -lTFluka |
80 |
|
PAMLIBS := -L${PAM_LIB} -lTrkLevel2 -L${ALIROOT}/lib/tgt_linux/ -lfluka |
81 |
SHLIBS := ${PAMLIBS} |
SHLIBS := ${PAMLIBS} |
82 |
# Make include list |
# Make include list |
83 |
# |
# |
84 |
PAMINC := -I${PAM_INC} -I${PAM_INC}/yoda |
#PAMINC := -I${PAM_INC} -I${PAM_INC}/yoda -I${ALIROOT}/TFluka/ |
85 |
INCDIR := -Iinc ${PAMINC} |
#PAMINC := -I${PAM_INC} -I${PAM_INC}/yoda -I${ALIROOT}/source/ |
86 |
|
PAMINC := -I$(PAMELA_SOFTWARE)/include/yoda -I$(PAMELA_SOFTWARE)/inc -I${ALIROOT}/source |
87 |
|
INCDIR := -Iinclude $(PAMINC) \ |
88 |
|
-Ical/include \ |
89 |
|
-Itrk/include \ |
90 |
|
-Itof/include \ |
91 |
|
-Iac/include \ |
92 |
|
-Is4/include \ |
93 |
|
-Ind/include \ |
94 |
|
-I$(TOPDIR)/include \ |
95 |
|
-I$(CLHEP_BASE_DIR)/include \ |
96 |
|
-Iinclude -I$(G4INCLUDE) |
97 |
|
|
98 |
|
FINCDIR := -Itrk/include/f77 |
99 |
# C++ compilation flags |
# C++ compilation flags |
100 |
# |
# |
101 |
CXXFLAGS := $(CXXOPTS) -I. $(INCDIR) -I$(ROOT_INCDIR) ${PAMOPTS} |
CXXFLAGS := $(CXXOPTS) -I. $(INCDIR) -I$(ROOT_INCDIR) ${PAMOPTS} |
102 |
|
FFLAGS := $(FINCDIR) -fvxt -fno-automatic -Wno-globals |
103 |
|
|
104 |
DEPINC += -I. -I$(ROOT_INCDIR) $(INCDIR) |
DEPINC += -I. -I$(ROOT_INCDIR) $(INCDIR) |
105 |
|
|
106 |
############################### Targets ####################################### |
############################### Targets ####################################### |
107 |
|
|
108 |
|
RM_FILE=$(shell rm -f $(LIBDIR)/resxy_new.root)\ |
109 |
|
$(shell rm -f $(LIBDIR)/CalibTrk_00110_000_000.root) |
110 |
|
|
111 |
|
CP_FILE=$(shell mkdir -p ${LIBDIR})\ |
112 |
|
$(shell cp -rf resxy_new.root CalibTrk_00110_000_000.root ${LIBDIR}/) |
113 |
|
|
114 |
SLIBRARY = $(LIBDIR)/lib$(PACKAGE).$(SL) |
SLIBRARY = $(LIBDIR)/lib$(PACKAGE).$(SL) |
115 |
ALIBRARY = $(LIBDIR)/lib$(PACKAGE).a |
ALIBRARY = $(LIBDIR)/lib$(PACKAGE).a |
117 |
default: depend $(SLIBRARY) |
default: depend $(SLIBRARY) |
118 |
|
|
119 |
|
|
120 |
$(LIBDIR)/lib$(PACKAGE).$(SL): $(OBJS) |
$(LIBDIR)/lib$(PACKAGE).$(SL):$(CP_FILE) $(OBJS) $(FOBS) |
121 |
$(LIBDIR)/lib$(PACKAGE).a: $(OBJS) |
|
122 |
|
$(LIBDIR)/lib$(PACKAGE).a: $(CP_FILE) $(OBJS) $(FOBS) |
123 |
|
|
124 |
DICT:= $(GDICT) |
DICT:= $(GDICT) |
125 |
|
|
126 |
$(DICT): $(HDRS) |
$(DICT): $(HDRS) |
127 |
|
|
128 |
depend: $(SRCS) |
depend: $(SRCS) $(FSRCS) |
129 |
|
|
130 |
|
TOCLEAN = $(BINDIR) $(RM_FILE) |
131 |
|
TOCLEANALL = $(BINDIR) $(LIBDIR) $(RM_FILE) |
132 |
|
|
133 |
TOCLEAN = $(BINDIR) |
include $(ROOT_ETCDIR)/MakeMacros |
|
TOCLEANALL = $(BINDIR) $(LIBDIR) |
|
134 |
|
|
|
include $(TOPDIR)/config/MakeMacros |
|
135 |
|
|
136 |
############################### Dependencies ################################## |
############################### Dependencies ################################## |
137 |
|
|