/[PAMELA software]/PamVMC_update/PamG4RunConfiguration/Makefile
ViewVC logotype

Annotation of /PamVMC_update/PamG4RunConfiguration/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Tue Oct 15 15:52:33 2013 UTC (11 years, 1 month ago) by formato
Branch point for: MAIN, rel
Initial revision

1 formato 1.1 # $Id: Makefile 503 2010-05-20 09:22:09Z ivana $
2    
3     ############################### geant4_vmc Makefile ###########################
4    
5     PACKAGE = PamG4RunConfiguration
6    
7     ifeq ($(PLATFORM),)
8     PLATFORM = $(shell root-config --arch)
9     endif
10    
11     TOPDIR = $(shell pwd)/..
12     BINDIR = $(TOPDIR)/tmp/tgt_$(PLATFORM)/$(PACKAGE)
13     LIBDIR = $(TOPDIR)/lib/tgt_$(PLATFORM)
14    
15     ifeq ($(ROOTSYS),)
16     ROOT_INCDIR = $(shell root-config --incdir)
17     ROOT_BINDIR = $(shell root-config --prefix)/bin
18     ROOT_ETCDIR = $(shell root-config --etcdir)/vmc
19     else
20     ROOT_INCDIR = $(ROOTSYS)/include
21     ROOT_BINDIR = $(ROOTSYS)/bin
22     ROOT_ETCDIR = $(ROOTSYS)/etc/vmc
23     endif
24    
25     include $(ROOT_ETCDIR)/Makefile.$(PLATFORM)
26    
27     ############################### Sources #######################################
28    
29     # Rules
30     #
31     include $(ROOT_ETCDIR)/MakeRules
32    
33     # Dictionary
34     #
35     GDICT := $(BINDIR)/$(PACKAGE)Cint.cxx
36     GDICTH := $(GDICT:.cxx=.h)
37     GDICTO := $(patsubst %.cxx,%.o,$(GDICT))
38    
39     # Sources
40     #
41     CXXSRC := $(wildcard src/*.cxx)
42     SRCS := $(CXXSRC)
43    
44     # C++ Headers processed by CINT
45     #
46     HDRS := include/PamG4RunConfiguration.h \
47     include/$(PACKAGE)LinkDef.h
48    
49     # Objects
50     #
51     CXXOBJ := $(patsubst %.cxx,$(BINDIR)/%.o,$(CXXSRC))
52     OBJS := $(CXXOBJ) $(GDICTO)
53    
54     # Make include list
55     #
56     ifndef G4INCLUDE
57     G4INCLUDE := $(G4INSTALL)/include
58     endif
59    
60     INCLUDES := -Iinclude -I$(G4INCLUDE) \
61     -I$(CLHEP_BASE_DIR)/include \
62     -I$(G4INSTALL)/physics_lists/hadronic/LHEP_BERT/include \
63     -I$(G4INSTALL)/physics_lists/hadronic/Packaging/include \
64     -I$(G4VMC_DIR)/include/geant4vmc \
65     -I$(PWD)/include
66    
67     ifneq ($(USE_VGM),)
68     INCLUDES += -I$(VGM_INSTALL)/packages/VGM/include \
69     -I$(VGM_INSTALL)/packages/ClhepVGM/include \
70     -I$(VGM_INSTALL)/packages/BaseVGM/include \
71     -I$(VGM_INSTALL)/packages/Geant4GM/include \
72     -I$(VGM_INSTALL)/packages/RootGM/include \
73     -I$(VGM_INSTALL)/packages/XmlVGM/include
74     endif
75    
76     # C++ compilation flags
77     #
78     CXXFLAGS := $(CXXOPTS) $(G4MCDEFS) -I. $(INCLUDES) -I$(ROOT_INCDIR)
79    
80     # Debug option
81     #
82     ifdef G4DEBUG
83     CXXFLAGS += -DMCDEBUG
84     endif
85    
86     # Use VGM flag
87     #
88     ifneq ($(USE_VGM),)
89     CXXFLAGS += -DUSE_VGM
90     endif
91    
92     ######################## Supported Geant4 VIS, UI #############################
93     #
94     # Supported Geant4 VIS, UI setting:
95     # OPENGLX, OPENGLXM, XM, TCSH
96     #
97     ifndef G4VIS_NONE
98     CPPFLAGS += -DG4VIS_USE
99     ifdef G4VIS_USE_OPENGLX
100     G4VIS_USE_OPENGL = 1
101     CPPFLAGS += -DG4VIS_USE_OPENGLX
102     INC_X11 = 1
103     endif
104     ifdef G4VIS_USE_OPENGLXM
105     G4VIS_USE_OPENGL = 1
106     CPPFLAGS += -DG4VIS_USE_OPENGLXM
107     INC_XM = 1
108     endif
109     ifdef G4VIS_USE_OPENGL
110     CPPFLAGS += -DG4VIS_USE_OPENGL
111     CPPFLAGS += -I$(G4INSTALL)/source/visualization/OpenGL/include
112     INC_GL = 1
113     endif
114     CPPFLAGS += -I$(G4INSTALL)/source/visualization/management/include
115     CPPFLAGS += -I$(G4INSTALL)/source/visualization/modeling/include
116     endif #G4VIS_NONE
117    
118     ifndef G4UI_NONE
119     CPPFLAGS += -I$(G4INSTALL)/source/interfaces/basic/include
120     CPPFLAGS += -I$(G4INSTALL)/source/interfaces/common/include
121     CPPFLAGS += -I$(G4INSTALL)/source/interfaces/GAG/include
122     CPPFLAGS += -DG4UI_USE_TERMINAL
123     ifdef G4UI_USE_TCSH
124     G4UI_USE = 1
125     CPPFLAGS += -DG4UI_USE_TCSH
126     endif
127     endif #G4UI_NONE
128    
129     ifdef INC_GL
130     CPPFLAGS += $(OGLFLAGS)
131     endif
132     ifdef INC_XM
133     INC_X11 = 1
134     CPPFLAGS += $(XMFLAGS)
135     endif
136     ifdef INC_X11
137     CPPFLAGS += $(X11FLAGS)
138     endif
139    
140    
141     ######################## Full Geant4 VIS, UI ##################################
142     #
143     # Full Geant4 UI, VIS, interactivity setting.
144     # It enables to use all Geant4 graphics drivers and UIs,
145     # however not all these options were tested with Geant4 VMC
146     # and even though a correct behaviour is expected,
147     # it is not guaranteed.
148     #
149     #include $(G4INSTALL)/config/G4UI_USE.gmk
150     #include $(G4INSTALL)/config/G4VIS_USE.gmk
151     #include $(G4INSTALL)/config/interactivity.gmk
152    
153     CXXFLAGS += $(CPPFLAGS)
154    
155     DEPINC += -I. -I$(ROOT_INCDIR) $(INCLUDES)
156    
157     ############################### Targets #######################################
158    
159    
160     SLIBRARY = $(LIBDIR)/lib$(PACKAGE).$(SL)
161     ALIBRARY = $(LIBDIR)/lib$(PACKAGE).a
162    
163     default: depend $(SLIBRARY)
164     all: default includes
165    
166    
167     $(LIBDIR)/lib$(PACKAGE).$(SL): $(OBJS)
168     $(LIBDIR)/lib$(PACKAGE).a: $(OBJS)
169    
170     DICT:= $(GDICT)
171    
172     $(DICT): $(HDRS)
173    
174     depend: $(SRCS)
175    
176     TOCLEAN = $(BINDIR)
177     TOCLEANALL = $(BINDIR) $(LIBDIR)
178    
179     MAKEDIST = ../config/makedist.sh lib
180     MAKEDISTSRC = ../config/makedist.sh
181    
182     include $(ROOT_ETCDIR)/MakeMacros
183    
184     ############################### Dependencies ##################################
185    
186     -include $(BINDIR)/Make-depend

  ViewVC Help
Powered by ViewVC 1.1.23