]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TGeant4/Makefile
added comment only
[u/mrichter/AliRoot.git] / TGeant4 / Makefile
CommitLineData
2817d3e2 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
22SRCS = $(wildcard *.cxx)
23
24# C++ Headers
25
26HDRS = $(wildcard *.icc) $(wildcard *.h)
27
28# Library Root dictionary
29# only for selected classes
56a00aec 30# (temporarily excluded for OSF1 due to compilation errors)
2817d3e2 31
56a00aec 32ifneq ($(ALICE_TARGET),OSF1)
2817d3e2 33DICT = TGeant4Cint.cxx
466ac87b 34DICTH = TGeant4.h TG4VRunConfiguration.h \
35 TG4Editor.h TG4GUI.h TG4GeometryGUI.h TG4GuiVolume.h \
36 TGeant4LinkDef.h
2817d3e2 37DICTO = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(DICT))
56a00aec 38endif
2817d3e2 39
40# C++ Objects
41
42OBJS = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(SRCS)) $(DICTO)
43
44# C++ compilation flags
45
46CXXFLAGS = $(CXXOPTS) -I$(ROOTSYS)/include -I. -I$(ALICE_ROOT)/include/
47
48
49##### TARGETS #####
50
51# Target
52
53SLIBRARY = $(LIBDIR)/libTGeant4.$(SL)
56a00aec 54ALIBRARY = $(LIBDIR)/libTGeant4.a
2817d3e2 55
56default: $(SLIBRARY)
57
58$(LIBDIR)/libTGeant4.$(SL): $(OBJS)
56a00aec 59$(LIBDIR)/libTGeant4.a: $(OBJS)
2817d3e2 60
61$(DICT): $(DICTH)
62
63depend: $(SRCS)
64
2f5a2f2d 65clean: macroclean
66
2817d3e2 67#HEADERS = $(filter-out %LinkDef.h,$(HDRS))
68
69TOCLEAN = $(OBJS) *Cint.cxx *Cint.h
70
71CHECKS = $(patsubst %.cxx,check/%.viol,$(SRCS))
72
73############################### General Macros ################################
74
75include $(ALICE_ROOT)/conf/GeneralMacros
76
2817d3e2 77# Geant4 specific compiler flags
78
79CXXFLAGS += $(CPPFLAGS)
80
75777b5a 81# Remove optimisation for TG4PhysicsConstructorHadron
82
83ifeq ($(ALICE_TARGET),Linux)
84 COMPILER := $(shell g++ -v 2>&1 | grep version | grep egcs)
85 ifeq ($(findstring 1.1,$(COMPILER)),1.1)
86 CXXFLAGS_WITHOUT_O := $(filter-out -O% -Wuninitialized, $(CXXFLAGS))
87 tgt_$(ALICE_TARGET)/TG4PhysicsConstructorHadron.o : TG4PhysicsConstructorHadron.cxx
88 ifeq ($(CXXVERBOSE),)
89 @$(CXX) $(CXXFLAGS_WITHOUT_O) -c -o $@ TG4PhysicsConstructorHadron.cxx
90 else
91 $(CXX) $(CXXFLAGS_WITHOUT_O) -c -o $@ TG4PhysicsConstructorHadron.cxx
92 endif
93 endif
94endif
95
96ifeq ($(ALICE_TARGET),HP-UX.aCC)
97 # remove optimisation for TG4PhysicsConstructorHadron
98 # to be tested
99 COMPILER := $(shell aCC -V 2>&1)
100 ifeq ($(COMPILER), aCC: HP ANSI C++ B3910B A.01.15)
101 CXXFLAGS_WITHOUT_O := $(filter-out -O% , $(CXXFLAGS))
102 CXXFLAGS_WITHOUT_O := $(filter-out +O% , $(CXXFLAGS_WITHOUT_O))
103 tgt_$(ALICE_TARGET)/TG4PhysicsConstructorHadron.o : TG4PhysicsConstructorHadron.cxx
104 ifeq ($(CXXVERBOSE),)
105 @$(CXX) $(CXXFLAGS_WITHOUT_O) -c $*.cxx -o tgt_$(ALICE_TARGET)/$*.o
106 else
107 $(CXX) $(CXXFLAGS_WITHOUT_O) -c $*.cxx -o tgt_$(ALICE_TARGET)/$*.o
108 endif
109 endif
110endif
111
2817d3e2 112
113############################ Dependencies #####################################
114
115-include tgt_$(ALICE_TARGET)/Make-depend