]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TGeant4/Makefile.flugg
Enable creation of fast rec points for ITS, when input argument for ITS = 2.
[u/mrichter/AliRoot.git] / TGeant4 / Makefile.flugg
CommitLineData
615bb363 1# $Id$
2
3############################### TGeant4 Makefile ###############################
4
5# Include Geant4 specific definitions
6
7include $(G4INSTALL)/config/architecture.gmk
8
9# Include machine specific definitions
10
11include $(ALICE_ROOT)/conf/GeneralDef
12include $(ALICE_ROOT)/conf/MachineDef.$(ALICE_TARGET)
13
14# Include Alice Geant4 specific definitions
15
16include $(ALICE_ROOT)/conf/Geant4.gmk
17
18PACKAGE = TGeant4
19
20# C++ sources
21
22#SRCS1 = $(wildcard *.cxx)
23
24SRCS1 = $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: global" {} \; | sed sx./xxg )
25SRCS1 += $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: geometry" {} \; | sed sx./xxg )
26
27SRCS2 = $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: digits+hits" {} \; | sed sx./xxg )
28SRCS2 += $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: physics" {} \; | sed sx./xxg )
29SRCS2 += $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: event" {} \; | sed sx./xxg )
30SRCS2 += $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: run" {} \; | sed sx./xxg )
31SRCS2 += $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: visualization" {} \; | sed sx./xxg )
32SRCS2 += $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: interfaces" {} \; | sed sx./xxg )
33
34# C++ Headers
35
36HDRS = $(wildcard *.icc) $(wildcard *.h)
37
38# Library Root dictionary
39# only for selected classes
40# (temporarily excluded for OSF1 due to compilation errors)
41
42ifneq ($(ALICE_TARGET),OSF1)
43DICT = TGeant4Cint.cxx
44DICTH = TGeant4.h TG4VRunConfiguration.h \
45 TG4Editor.h TG4MainFrame.h TG4GeometryGUI.h TG4GuiVolume.h \
46 TG4MaterialsFrames.h TG4VolumesFrames.h TG4ListTreeFrame.h \
47 TGeant4LinkDef.h
48DICTO = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(DICT))
49endif
50
51# C++ Objects
52
53OBJS1 = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(SRCS1))
54OBJS2 = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(SRCS2)) $(DICTO)
55
56# C++ compilation flags
57
58CXXFLAGS = $(CXXOPTS) -I$(ROOTSYS)/include -I. -I$(ALICE_ROOT)/include/
59
60
61##### TARGETS #####
62
63# Target
64
65SLIBRARY = $(LIBDIR)/libTGeant4_1.$(SL) $(LIBDIR)/libTGeant4_2.$(SL)
66ALIBRARY = $(LIBDIR)/libTGeant4_1.a $(LIBDIR)/libTGeant4_2.a
67
68default: $(SLIBRARY)
69
70$(LIBDIR)/libTGeant4_1.$(SL): $(OBJS1)
71$(LIBDIR)/libTGeant4_1.a: $(OBJS1)
72
73$(LIBDIR)/libTGeant4_2.$(SL): $(OBJS2)
74$(LIBDIR)/libTGeant4_2.a: $(OBJS2)
75
76$(DICT): $(DICTH)
77
78depend: $(SRCS1) $(SRCS2)
79
80clean: macroclean
81
82#HEADERS = $(filter-out %LinkDef.h,$(HDRS))
83
84TOCLEAN = $(OBJS1) $(OBJS2) *Cint.cxx *Cint.h
85
86CHECKS = $(patsubst %.cxx,check/%.viol,$(SRCS))
87
88############################### General Macros ################################
89
90include $(ALICE_ROOT)/conf/GeneralMacros
91
92# Geant4 specific compiler flags
93
94CXXFLAGS += $(CPPFLAGS)
95
96# Remove optimisation for TG4PhysicsConstructorHadron
97
98ifeq ($(ALICE_TARGET),Linux)
99 COMPILER := $(shell g++ -v 2>&1 | grep version | grep egcs)
100 ifeq ($(findstring 1.1,$(COMPILER)),1.1)
101 CXXFLAGS_WITHOUT_O := $(filter-out -O% -Wuninitialized, $(CXXFLAGS))
102 tgt_$(ALICE_TARGET)/TG4PhysicsConstructorHadron.o : TG4PhysicsConstructorHadron.cxx
103 ifeq ($(CXXVERBOSE),)
104 @$(CXX) $(CXXFLAGS_WITHOUT_O) -c -o $@ TG4PhysicsConstructorHadron.cxx
105 else
106 $(CXX) $(CXXFLAGS_WITHOUT_O) -c -o $@ TG4PhysicsConstructorHadron.cxx
107 endif
108 endif
109endif
110
111ifeq ($(ALICE_TARGET),HP-UX.aCC)
112 # remove optimisation for TG4PhysicsConstructorHadron
113 # to be tested
114 COMPILER := $(shell aCC -V 2>&1)
115 ifeq ($(COMPILER), aCC: HP ANSI C++ B3910B A.01.15)
116 CXXFLAGS_WITHOUT_O := $(filter-out -O% , $(CXXFLAGS))
117 CXXFLAGS_WITHOUT_O := $(filter-out +O% , $(CXXFLAGS_WITHOUT_O))
118 tgt_$(ALICE_TARGET)/TG4PhysicsConstructorHadron.o : TG4PhysicsConstructorHadron.cxx
119 ifeq ($(CXXVERBOSE),)
120 @$(CXX) $(CXXFLAGS_WITHOUT_O) -c $*.cxx -o tgt_$(ALICE_TARGET)/$*.o
121 else
122 $(CXX) $(CXXFLAGS_WITHOUT_O) -c $*.cxx -o tgt_$(ALICE_TARGET)/$*.o
123 endif
124 endif
125endif
126
127
128############################ Dependencies #####################################
129
130-include tgt_$(ALICE_TARGET)/Make-depend