1 ****************************************************
3 * Flat makefile for AliRoot *
5 * This README describes how to use the *
6 * Makefile.flat for AliRoot *
8 * Author: Jan-Erik Revsbech <revsbech@fys.ku.dk> *
9 *****************************************************
14 As the name suggests this is a flat makefile structure for
15 Aliroot. That means that there is only one makefile for aliroot and
16 not as before on makefile for every package. This way the
17 Makefile.flat knows about all dependencies and does not have to
18 recursively go through all directories several time.
20 Instead of having a makefile for each package, all the packages have
21 one module.mk file. This file contains information about the package.
22 Each package can contain several libraries
23 and binaries to be made. The module.mk file is automatically created
24 by a script, by using a template. The script must know about what
25 files each desired library or binary consists of. This is specified
26 in .pkg files. For example a module in directory STEER could make two
27 libraries libSTEER and libSTEERDummy.so and one binary called
28 STEERTest. In this example the directory STEER would contain three
29 files: libSTEER.pkg, libSTEERDummy.pkg and binSTEERTest.pkg. These
30 files will contain information about which source and header files the
31 library or binary consists of and specific options. See the section package file for
32 further information about what the pkg files contains.
33 The libraries are put in the directory LIBPATH, set in Makefile.flat
34 and binaries in BINPATH. These directories are set to
35 bin/tgt_$ALICE_TARGET and lib/tgt_$ALICE_TARGET respectively.
37 The module.mk files will be automatically generated by Makefile.flat
38 if they do not exist. Also the build/moudle.dep contains a list of
39 dependencies for the module.mk files. This means that for the above
40 example the build/module.dep would contain a line like this:
42 STEER/module.mk: libSTEER.pkg libSTEERDummy.pkg binSTEERTest.pkg
44 In this way if a change is made to one of the package-files (a
45 source-file is added or something), the module.mk file will be re-generated.
47 The Makefile.flat has in the start a variable called MODULES, this
48 variables lists all the subdirectories to look for module.mk files.
52 The .pkg files uses make syntax, so be careful with tabs!!!
54 As a minimum all package files must specify which source-code files and
55 headers it consist of. This is done with the variables
56 HDRS,SRCS,FSRCS,CSRCS which is Heades, C++ sources, Fortran sources
59 For example the Package libSTEERDummy.pkg could consist of
61 SRCS:= AliSTEERDummy.cxx
63 FSRCS:= AliSTEERFortranRoutines.f
65 HDRS:= AliSTEERDummy.cxx
67 Since the pkg files use make syntax HDRS can also be specified as
71 which is useful if there is a lot of files.
73 If the library (or binary) uses include files in other directories
74 than itself it should be specified in the variable EHDRS (for External
75 headers). By default the Makefile.flat will look in $ALICE_ROOT,
76 $ALICE_ROOT/MODULE (in this case $ALICE_ROOT/STEER), $ROOTSYS/inlude
77 and in $ALICE_ROOT/include. If more include directories is needed it
78 can be specified with the variable EINCLUDE. *DO NOT* put the -I flag
79 it will be put automatically, just write the name of the directory.
81 If a root dictionary file is used it can be specified with
85 This will be processed with rootcint with all the header-files
86 (specified in HDRS), and default cint includedir (set in CINTFLAGS)
87 plus the directories specified in EINCLUDE
89 By default all libraries are linked against libraries specified in
90 SHLIB and binaries against LIBS. If desired extra libraries can be
91 specified with the ELIBS variable. *DO NOT* specify the -l flag, just
92 write the library like
96 this will be translated into -lCONTAINERS
98 Extra library directories can be specified with ELIBSDIR
100 If very special compilation flags is needed it can be specified with
107 *WARNING* if these flags are set, the default FFLAGS,CXXFLAGS and CFLAGS
108 will be overwritten. Normally they will be used like this:
110 PACKCXXFLAGS:= $(filter-out -O%,CXXFLAGS)
112 This will set the C++ compiler-flags to the default ones, but without
115 ** LIST OF Variables in .pkg files **