/[PAMELA software]/PamCAL/PamVMC/PamG4RunConfiguration/Makefile
ViewVC logotype

Contents of /PamCAL/PamVMC/PamG4RunConfiguration/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Mon Nov 12 10:10:14 2007 UTC (17 years, 1 month ago) by nikolas
Branch: MAIN
CVS Tags: HEAD
More basic files added

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

  ViewVC Help
Powered by ViewVC 1.1.23