]>
Commit | Line | Data |
---|---|---|
d95a3ef8 | 1 | # -*- mode: makefile -*- |
f36e7e21 | 2 | # Makefile for AliRoot for MacOS X with gcc |
ee0345bd | 3 | |
4 | XARGS = xargs | |
5 | ||
6 | # OS version | |
7 | MACOSX_MAJOR := $(strip $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 1)) | |
8 | MACOSX_MINOR := $(strip $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)) | |
9 | ||
10 | # fink directories | |
11 | FINK_ROOT := $(shell which fink | sed -e 's?/bin/fink??') | |
12 | ifeq (,$(FINK_ROOT)) | |
13 | # No fink, build will probably fail, but we try a guess | |
14 | FINK_ROOT=/usr/local | |
15 | endif | |
16 | ||
17 | # The compilers | |
c9c74649 | 18 | CXX = $(shell root-config --cxx) |
19 | CC = $(shell root-config --cc) | |
d95a3ef8 | 20 | F77 = $(shell root-config --f77) |
ee0345bd | 21 | |
22 | # Global optimisation | |
23 | OPT = -O -g | |
24 | NOOPT = -O0 -g | |
25 | ||
26 | CXXOPT = $(OPT) | |
27 | CXXNOOPT = $(NOOPT) | |
28 | COPT = $(OPT) | |
f36e7e21 | 29 | FOPT = $(OPT) -fno-second-underscore -m64 |
c9c74649 | 30 | ifneq (,$(findstring g95,$(F77))) |
ee0345bd | 31 | FOPT += -fbounds-check |
32 | endif | |
33 | ||
34 | # CERNLIB defines | |
cb47c659 | 35 | CLIBDEFS = -DCERNLIB_LXIA64 -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC |
ee0345bd | 36 | CLIBCXXOPTS = |
37 | CLIBCOPT = | |
38 | CLIBFOPT = $(CLIBDEFS) | |
110b30cc | 39 | CXXSTF = -m64 -pipe -Wall -W -pipe -fbounds-check -fsigned-char -fno-common -fmessage-length=0 -Woverloaded-virtual -Weffc++ -Wconversion -Wshadow -fno-default-inline -fno-inline -I/usr/X11R6/include -I$(FINK_ROOT)/include |
ee0345bd | 40 | |
110b30cc | 41 | CXXSTF = -m64 -pipe -Wall -W -pipe -fbounds-check -fsigned-char -fno-common -fmessage-length=0 -Woverloaded-virtual -Weffc++ -Wshadow -fno-default-inline -fno-inline -I/usr/X11R6/include -I$(FINK_ROOT)/include |
ee0345bd | 42 | |
43 | # Compiler flags | |
1bbe2977 | 44 | CXXFLAGS = $(CXXOPT) $(CXXSTF) |
ee0345bd | 45 | |
ee0345bd | 46 | CXXFLAGSNO = $(CXXNOOPT) $(CXXSTF) |
47 | ||
48 | CFLAGS = $(COPT) -m64 -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include | |
49 | ||
f36e7e21 | 50 | FFLAGS = $(CLIBFOPT) $(FOPT) |
c9c74649 | 51 | ifneq (,$(findstring g95,$(F77))) |
ee0345bd | 52 | FFLAGS += -ftrace=full |
7da87db6 | 53 | FFLAGS +=-DFORTRAN_G95 |
54 | else | |
55 | FFLAGS +=-DFORTRAN_GFORTRAN | |
ee0345bd | 56 | endif |
7da87db6 | 57 | |
ee0345bd | 58 | # rmkdepend flags for building dependencies of FORTRAN files |
59 | DEPENDFFLAGS = $(FFLAGS) | |
60 | ||
61 | # rootcint flags | |
62 | CINTFLAGS = | |
63 | ||
64 | LD = export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_MAJOR).$(MACOSX_MINOR) ; \ | |
65 | unset LD_PREBIND ; \ | |
c9c74649 | 66 | $(shell root-config --ld) |
f36e7e21 | 67 | LDFLAGS = $(OPT) -m64 $(DICTLOAD) |
ee0345bd | 68 | |
69 | SHLD := $(LD) | |
70 | SOFLAGS := -m64 -bundle -undefined dynamic_lookup | |
71 | SHLIB := | |
72 | SOEXT := so | |
73 | ||
74 | DYLD := $(LD) | |
75 | DYFLAGS = -m64 -dynamiclib -undefined dynamic_lookup -single_module | |
76 | DYLIB := | |
77 | DYEXT := dylib | |
78 | ||
79 | ALLD = ar | |
80 | ALFLAGS = cr | |
81 | ALLIB = | |
82 | AEXT = a | |
83 | ||
84 | DEPENDCXXFLAGS = $(CXXFLAGS) -I/usr/include/sys | |
85 | ||
86 | SYSLIBS := -L/usr/X11R6/lib -lX11 | |
87 | ||
88 | EXEFLAGS := -bind_at_load | |
89 | ||
90 | #System libraries | |
91 | ||
c9c74649 | 92 | ifneq (,$(findstring g95,$(F77))) |
93 | SYSLIBS += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95 | |
ee0345bd | 94 | else |
1bbe2977 | 95 | SYSLIBS += -ldl $(shell $(F77) -m64 -print-file-name=libgfortran.dylib) |
96 | SYSLIBS += $(shell $(F77) -m64 -print-file-name=libgfortranbegin.a) | |
ee0345bd | 97 | endif |