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