Vertex truncation settings moved to AliGenMC.
[u/mrichter/AliRoot.git] / Makefile.flat
CommitLineData
efaab2ef 1# Top level Makefile for AliRoot System
2#
3# Author: Jan-Erik Revsbech (revsbech@fys.ku.dk)
4# Developed on idea of Boris Polichtchouk (Boris.Polichtchouk@cern.ch), 15/4/2001
5
6
7##### include general path/location macros #####
8override ALICE_ROOT=$(shell pwd)
9
10include build/Makefile.config
11
12# Where to install libraries and binaries
13LIBPATH=lib/tgt_$(ALICE_TARGET)
14BINPATH=bin/tgt_$(ALICE_TARGET)
15
16##### include machine dependent macros #####
17
18#include $(filter-out DEBUG,build/Makefile.$(ALICE_TARGET))
19include build/Makefile.$(ALICE_TARGET)
20
21# Check if called with debug
22ifeq ($(ALIDEBUG),YES)
23override ALICE_TARGET:=$(ALICE_TARGET)DEBUG
24FFLAGS := -g $(filter-out -O%,$(FFLAGS))
25CXXFLAGS := -g $(filter-out -O%,$(CXXLAGS))
26CFLAGS := -g $(filter-out -O%,$(CLAGS))
27endif
28
29
30##### Modules to build #####
31
32#needs to add: VZERO TGeant4 AliGeant4 GEODB Euclid
33#
34
35MODULES:=STEER TPC PMD CONTAINERS ZDC STRUCT RALICE EMCAL \
36 ALIFAST CASTOR FMD START TGeant3 EVGEN THijing TMEVSIM \
37 MEVSIM PDF PYTHIA PYTHIA6 TRD GEANT321 MINICERN TOF \
38 ITS RICH PHOS MUON HIJING LHC HBTP THbtp
39
40MODULES += ALIROOT
41
42MODDIRS := MODULES
43
44# look for include files in each of the moduled
45CXXFLAGS += $(patsubst %,-I%,$(ALICE_ROOT))
46CXXFLAGS += $(patsubst %,-I$(ALICE_ROOT)/%,$(MODULES))
47CXXFLAGS += $(patsubst %,-I%,$(ROOTSYS)/include)
48
49FFLAGS += $(patsubst %,-I%,$(ALICE_ROOT))
50FFLAGS += $(patsubst %,-I$(ALICE_ROOT)/%,$(MODULES))
51FFLAGS += $(patsubst %,-I%,$(ROOTSYS)/include)
52
53CINTFLAGS += $(patsubst %,-I%,$(ALICE_ROOT))
54CINTFLAGS += $(patsubst %,-I$(ALICE_ROOT)/%,$(MODULES))
55CINTFLAGS += $(patsubst %,-I%,$(ROOTSYS)/include)
56
57DEPINC += $(patsubst %,-I%,$(ALICE_ROOT))
58DEPINC += $(patsubst %,-I$(ALICE_ROOT)/%,$(MODULES))
59DEPINC += $(patsubst %,-I%,$(ROOTSYS)/include)
60
61
62LIBS := $(ROOTLIBS) $(SYSLIBS) $(GLIBS)
63
64
65# default target
66default: alilibs aliroot
67
68# each module must add to this
69ALLLIBS :=
70ALLEXECS :=
71INCLUDEFILES :=
72BINLIBS :=
73
74
75BINLIBDIRS := -L$(ALICE_ROOT)/$(LIBPATH)
76
77.PHONY: alilibs aliroot makedistr
78
79#Dependencies of module.mk files
80
81include build/module.dep
82
83# Check if module.mk is present for the library
84%.mk:
85 @echo "***** Creating $@ file *****";
86 share/alibtool mkmodule $(patsubst %/module.mk,%,$@) > $@;
87
88# If cleaning, do not include dependencies or module.mk files.
89ifneq ($(findstring clean,$(MAKECMDGOALS)),clean)
90
91# description of each module
92include $(patsubst %,%/module.mk,$(MODULES))
93
94# include dependencies if not making them!
95ifneq ($(MAKECMDGOALS),depend)
96include $(INCLUDEFILES)
97endif
98
99endif
100
101# targets
102
103aliroot: $(BINPATH) $(ALLEXECS) bin
104
105
106alilibs: $(LIBPATH) $(ALLLIBS) lib
107
108# Single Makefile "distribution": Makefile + modules + mkdepend scripts
109makedistr: $(MODULES)
110 tar -cvf MakeDistr.tar $(patsubst %,%/*.pkg,$(MODULES)) \
111 Makefile create build/*
112
113all: aliroot
114
115depend: $(INCLUDEFILES)
116
117debug:
118 @echo "***** Entering DEBUG mode. *****"
119 @(export ALIDEBUG=YES && $(MAKE) -f Makefile.flat )
120lib:
121 @mkdir lib
122 @mkdir lib/tgt_$(ALICE_TARGET)
123
124bin:
125 @mkdir bin
126 @mkdir bin/tgt_$(ALICE_TARGET)
127
128$(MODULES):
129 @echo "***** Making $@ *****"
130 mkdir -p $@
131
132$(BINPATH):
133 @echo "***** Making $@ *****"
134 mkdir -p $@
135
136$(LIBPATH):
137 @echo "***** Making $@ *****"
138 mkdir -p $@
139
140
141cleanall:
142 @echo "***** Cleaning up everything ****"
143 rm -rf $(patsubst %,%/module.mk,$(MODULES))
144 rm -rf $(patsubst %,%/tgt_$(ALICE_TARGET),$(MODULES))
145 rm -rf lib/tgt_$(ALICE_TARGET)
146 rm -rf bin/tgt_$(ALICE_TARGET)
147
148clean: clean-modules clean-depend clean-objects clean-libs clean-bins
149
150clean-modules:
151 @echo "***** Cleaning up module.mk files *****"
152 rm -rf $(patsubst %,%/module.mk,$(MODULES))
153
154clean-depend:
155 @echo "***** Cleaning up dependencies *****"
156 rm -rf */tgt_$(ALICE_TARGET)/*.d
157 rm -rf */tgt_$(ALICE_TARGET)/*/*.d
158 rm -rf */tgt_$(ALICE_TARGET)/*/*/*.d
159 rm -rf */tgt_$(ALICE_TARGET)/*/*/*/*.d
160
161clean-objects:
162 @echo "***** Cleaning up .o files *****"
163 rm -rf */tgt_$(ALICE_TARGET)/*.o
164 rm -rf */tgt_$(ALICE_TARGET)/*/*.o
165 rm -rf */tgt_$(ALICE_TARGET)/*/*/*.o
166 rm -rf */tgt_$(ALICE_TARGET)/*/*/*/*.o
167
168clean-libs:
169 @echo "***** Cleaning up library files *****"
170 rm -rf lib/tgt_$(ALICE_TARGET)/*
171
172clean-bins:
173 @echo "***** Cleaning up binary files *****"
174 rm -rf bin/tgt_$(ALICE_TARGET)
175
176
177
178
179
180
181