]>
Commit | Line | Data |
---|---|---|
b934f194 | 1 | # Makefile to build AliRoot for Linux |
2 | ||
02a1d5c1 | 3 | # The compilers |
4 | CXX = g++ | |
5 | F77 = g77 | |
6 | CC = gcc | |
7 | CCMAJORV = $(shell $(CC) -dumpversion | cut -d. -f1) | |
19ca05d1 | 8 | CCMINORV = $(shell $(CC) -dumpversion | cut -d. -f2) |
02a1d5c1 | 9 | |
10 | # Global optimisation | |
11 | OPT = -O -g | |
19ca05d1 | 12 | NOOPT = -g |
02a1d5c1 | 13 | |
19ca05d1 | 14 | CXXOPT = $(OPT) |
15 | CXXNOOPT = $(NOOPT) | |
02a1d5c1 | 16 | COPT = $(OPT) |
19ca05d1 | 17 | FOPT = $(OPT) |
02a1d5c1 | 18 | |
19 | # CERNLIB defines | |
02a1d5c1 | 20 | CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ |
21 | CLIBCXXOPTS = | |
22 | CLIBCOPT = | |
19ca05d1 | 23 | CLIBFOPT = $(CLIBDEFS) |
24 | ||
25 | # Compiler flags | |
26 | ifeq ($(CCMAJORV),2) | |
27 | CXXFLAGS = $(OPT) -W -Wall -fPIC -pipe | |
28 | CXXFLAGSNO = $(NOOPT) -W -Wall -fPIC -pipe | |
29 | else | |
bdfb9593 | 30 | CXXFLAGS = $(OPT) -W -Wall -Werror -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux |
19ca05d1 | 31 | CXXFLAGSNO = $(NOOPT) -W -Wall -Werror -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi |
32 | endif | |
33 | CFLAGS = $(OPT) -Wall -Werror -fPIC -pipe -Wno-long-long -pedantic-errors -ansi | |
34 | FFLAGS = $(CLIBFOPT) $(FOPT) -fno-second-underscore | |
35 | # rmkdepend flags for building dependencies of FORTRAN files | |
36 | DEPENDFFLAGS = $(FFLAGS) | |
37 | ||
38 | # rootcint flags | |
39 | CINTFLAGS = | |
02a1d5c1 | 40 | |
02a1d5c1 | 41 | LD = g++ |
42 | LDFLAGS = $(OPT) | |
43 | ||
44 | SHLD = $(LD) | |
45 | SOFLAGS = $(OPT) -shared -Wl | |
46 | SHLIB = -lg2c | |
47 | SOEXT = so | |
48 | ||
49 | ALLD = ar | |
50 | ALFLAGS = cr | |
51 | ALLIB = | |
52 | AEXT = a | |
53 | ||
54 | # additional ROOT libraries | |
55 | ROOTLIBS += -lcrypt | |
56 | ||
02a1d5c1 | 57 | LIBNOVER = `find /lib -name 'libNoVersion*.so' | xargs --replace basename {} .so | sed -e 's/lib/ -l/'` |
58 | GLIBS = -L/usr/X11R6/lib -lX11 $(LIBNOVER) | |
59 | ||
60 | #System libraries | |
61 | SYSLIBS = -ldl | |
62 | ||
63 | EXEFLAGS+= -lg2c | |
64 | ||
65 | ||
66 | ||
67 |