]>
Commit | Line | Data |
---|---|---|
d95a3ef8 | 1 | # -*- mode: makefile -*- |
b934f194 | 2 | # Makefile to build AliRoot for Linux |
3 | ||
6a772515 | 4 | # System dependent commands |
5 | ||
6 | XARGS = xargs -r | |
7 | ||
02a1d5c1 | 8 | # The compilers |
5f30d16c | 9 | CXX = $(shell root-config --cxx) |
10 | CC = $(shell root-config --cc) | |
02a1d5c1 | 11 | CCMAJORV = $(shell $(CC) -dumpversion | cut -d. -f1) |
19ca05d1 | 12 | CCMINORV = $(shell $(CC) -dumpversion | cut -d. -f2) |
d95a3ef8 | 13 | F77 = $(shell root-config --f77) |
874112da | 14 | |
02a1d5c1 | 15 | # Global optimisation |
c9c74649 | 16 | OPT = -O0 -g |
19ca05d1 | 17 | NOOPT = -g |
02a1d5c1 | 18 | |
19ca05d1 | 19 | CXXOPT = $(OPT) |
20 | CXXNOOPT = $(NOOPT) | |
02a1d5c1 | 21 | COPT = $(OPT) |
19ca05d1 | 22 | FOPT = $(OPT) |
02a1d5c1 | 23 | |
24 | # CERNLIB defines | |
02a1d5c1 | 25 | CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ |
26 | CLIBCXXOPTS = | |
27 | CLIBCOPT = | |
19ca05d1 | 28 | CLIBFOPT = $(CLIBDEFS) |
29 | ||
30 | # Compiler flags | |
31 | ifeq ($(CCMAJORV),2) | |
32 | CXXFLAGS = $(OPT) -W -Wall -fPIC -pipe | |
33 | CXXFLAGSNO = $(NOOPT) -W -Wall -fPIC -pipe | |
34 | else | |
0038d136 | 35 | ifeq ($(CCMAJORV),3) |
ec22f7b0 | 36 | CXXFLAGS = $(OPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux |
37 | CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi | |
0038d136 | 38 | else |
3deb9beb | 39 | ifeq ($(CCMAJORV),4) |
40 | CXXFLAGS = $(OPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux | |
41 | CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi | |
42 | else | |
0038d136 | 43 | CXXFLAGS = $(OPT) -W -Wall -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi -Dlinux |
ec22f7b0 | 44 | CXXFLAGSNO = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi |
0038d136 | 45 | endif |
19ca05d1 | 46 | endif |
3deb9beb | 47 | endif |
931c1b8a | 48 | CFLAGS = $(OPT) -Wall -Werror -fPIC -pipe -Wno-long-long -pedantic-errors -ansi |
55c0e7ad | 49 | FFLAGS = $(CLIBFOPT) $(FOPT) -fPIC -fno-second-underscore |
874112da | 50 | |
c9c74649 | 51 | ifneq (,$(findstring g95,$(F77))) |
874112da | 52 | FFLAGS +=-DFORTRAN_G95 |
53 | else | |
c9c74649 | 54 | ifneq (,$(findstring gfortran,$(F77))) |
874112da | 55 | FFLAGS +=-DFORTRAN_GFORTRAN |
56 | else | |
57 | FFLAGS += | |
58 | endif | |
59 | endif | |
60 | ||
19ca05d1 | 61 | # rmkdepend flags for building dependencies of FORTRAN files |
62 | DEPENDFFLAGS = $(FFLAGS) | |
63 | ||
64 | # rootcint flags | |
65 | CINTFLAGS = | |
02a1d5c1 | 66 | |
5f30d16c | 67 | LD = $(shell root-config --ld) |
02a1d5c1 | 68 | LDFLAGS = $(OPT) |
69 | ||
70 | SHLD = $(LD) | |
71 | SOFLAGS = $(OPT) -shared -Wl | |
02a1d5c1 | 72 | SOEXT = so |
73 | ||
874112da | 74 | #System libraries |
75 | SYSLIBS := -ldl -lcrypt -L/usr/X11R6/lib -lX11 | |
76 | ||
c9c74649 | 77 | ifneq (,$(findstring g95,$(F77))) |
78 | SHLIB += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95 | |
874112da | 79 | else |
c9c74649 | 80 | ifneq (,$(findstring gfortran,$(F77))) |
81 | SHLIB := $(shell $(F77) -print-file-name=libgfortran.so) | |
82 | SHLIB += $(shell $(F77) -print-file-name=libgfortranbegin.a) | |
c58d9e7d | 83 | SYSLIBS += $(SHLIB) |
874112da | 84 | else |
85 | SHLIB = -lg2c | |
86 | SYSLIBS += -lg2c | |
87 | endif | |
88 | endif | |
89 | ||
02a1d5c1 | 90 | ALLD = ar |
91 | ALFLAGS = cr | |
92 | ALLIB = | |
93 | AEXT = a | |
94 | ||
95 | # additional ROOT libraries | |
02a1d5c1 | 96 | |
02a1d5c1 | 97 | |
02a1d5c1 | 98 | |
99 | ||
100 | ||
101 |