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