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