/[PAMELA software]/trieste/pamVMC/Makefile
ViewVC logotype

Annotation of /trieste/pamVMC/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Wed Mar 4 12:51:03 2009 UTC (15 years, 8 months ago) by pamelats
Branch point for: MAIN, pamVMC
Initial revision

1 pamelats 1.1 # $Id: Makefile,v 1.0 2007/06/01
2    
3     ############################### geant4vmc Makefile ###########################
4    
5    
6     PACKAGE = PamVMC_fc
7    
8     ifeq ($(PLATFORM),)
9     PLATFORM = $(shell root-config --arch)
10     endif
11    
12     TOPDIR = $(G4VMC_DIR)
13     BINDIR = $(G4WORKDIR)/tmp/tgt_$(PLATFORM)/$(PACKAGE)
14     LIBDIR = $(G4WORKDIR)/lib/tgt_$(PLATFORM)
15    
16     ifeq ($(ROOTSYS),)
17     ROOT_INCDIR = $(shell root-config --incdir)
18     ROOT_BINDIR = $(shell root-config --prefix)/bin
19     ROOT_ETCDIR = $(shell root-config --prefix)/etc/vmc
20     else
21     ROOT_INCDIR = $(ROOTSYS)/include
22     ROOT_BINDIR = $(ROOTSYS)/bin
23     ROOT_ETCDIR = $(ROOTSYS)/etc/vmc
24     endif
25    
26     include $(ROOT_ETCDIR)/Makefile.$(PLATFORM)
27    
28     ############################### Sources #######################################
29    
30     # Rules
31     #
32     include $(ROOT_ETCDIR)/MakeRules
33    
34     # Dictionary
35     #
36     GDICT := $(BINDIR)/$(PACKAGE)Cint.cxx
37     GDICTH := $(GDICT:.cxx=.h)
38     GDICTO := $(patsubst %.cxx,%.o,$(GDICT))
39    
40     # Sources
41     #
42     CXXSRC := $(wildcard src/*.cxx)
43     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
57     #
58     HDRS := $(wildcard include/*.h)
59     HDRS += $(wildcard cal/include/*.h)
60     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
70     #
71     CXXOBJ := $(patsubst %.cxx,$(BINDIR)/%.o,$(SRCS))
72     FOBJ := $(patsubst %.F,$(BINDIR)/%.o,$(FSRCS))
73     OBJS := $(CXXOBJ) $(GDICTO) $(FOBJ)
74    
75     # PAMELA LIBS
76     #
77     #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}
82     # Make include list
83     #
84     #PAMINC := -I${PAM_INC} -I${PAM_INC}/yoda -I${ALIROOT}/TFluka/
85     #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
100     #
101     CXXFLAGS := $(CXXOPTS) -I. $(INCDIR) -I$(ROOT_INCDIR) ${PAMOPTS}
102     FFLAGS := $(FINCDIR) -fvxt -fno-automatic -Wno-globals
103    
104     DEPINC += -I. -I$(ROOT_INCDIR) $(INCDIR)
105    
106     ############################### 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)
115     ALIBRARY = $(LIBDIR)/lib$(PACKAGE).a
116    
117     default: depend $(SLIBRARY)
118    
119    
120     $(LIBDIR)/lib$(PACKAGE).$(SL):$(CP_FILE) $(OBJS) $(FOBS)
121    
122     $(LIBDIR)/lib$(PACKAGE).a: $(CP_FILE) $(OBJS) $(FOBS)
123    
124     DICT:= $(GDICT)
125    
126     $(DICT): $(HDRS)
127    
128     depend: $(SRCS) $(FSRCS)
129    
130     TOCLEAN = $(BINDIR) $(RM_FILE)
131     TOCLEANALL = $(BINDIR) $(LIBDIR) $(RM_FILE)
132    
133     include $(ROOT_ETCDIR)/MakeMacros
134    
135    
136     ############################### Dependencies ##################################
137    
138     -include $(BINDIR)/Make-depend

  ViewVC Help
Powered by ViewVC 1.1.23