]>
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 | ||
ee0345bd | 17 | # Global optimisation |
18 | OPT = -O -g | |
19 | NOOPT = -O0 -g | |
20 | ||
21 | CXXOPT = $(OPT) | |
22 | CXXNOOPT = $(NOOPT) | |
23 | COPT = $(OPT) | |
9be1be4e | 24 | FOPT = $(OPT) -fno-second-underscore |
c9c74649 | 25 | ifneq (,$(findstring g95,$(F77))) |
ee0345bd | 26 | FOPT += -fbounds-check |
27 | endif | |
28 | ||
29 | # CERNLIB defines | |
cb47c659 | 30 | CLIBDEFS = -DCERNLIB_LXIA64 -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC |
ee0345bd | 31 | CLIBCXXOPTS = |
32 | CLIBCOPT = | |
33 | CLIBFOPT = $(CLIBDEFS) | |
34 | ||
d76d4136 | 35 | CXXWARN = -Wall -Wno-long-long -W -Weffc++ -Wshadow -Woverloaded-virtual -ansi |
36 | ||
37 | CXXSTF = -pipe -fbounds-check -fsigned-char -fno-common -fmessage-length=0 -fno-default-inline -fno-inline -I/usr/X11R6/include -I$(FINK_ROOT)/include | |
ee0345bd | 38 | |
39 | # Compiler flags | |
1bbe2977 | 40 | CXXFLAGS = $(CXXOPT) $(CXXSTF) |
ee0345bd | 41 | |
ee0345bd | 42 | CXXFLAGSNO = $(CXXNOOPT) $(CXXSTF) |
43 | ||
9be1be4e | 44 | CFLAGS = $(COPT) -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include |
ee0345bd | 45 | |
f36e7e21 | 46 | FFLAGS = $(CLIBFOPT) $(FOPT) |
c9c74649 | 47 | ifneq (,$(findstring g95,$(F77))) |
ee0345bd | 48 | FFLAGS += -ftrace=full |
7da87db6 | 49 | FFLAGS +=-DFORTRAN_G95 |
50 | else | |
51 | FFLAGS +=-DFORTRAN_GFORTRAN | |
ee0345bd | 52 | endif |
7da87db6 | 53 | |
ee0345bd | 54 | # rmkdepend flags for building dependencies of FORTRAN files |
55 | DEPENDFFLAGS = $(FFLAGS) | |
56 | ||
57 | # rootcint flags | |
58 | CINTFLAGS = | |
59 | ||
60 | LD = export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_MAJOR).$(MACOSX_MINOR) ; \ | |
61 | unset LD_PREBIND ; \ | |
c9c74649 | 62 | $(shell root-config --ld) |
9be1be4e | 63 | LDFLAGS = $(OPT) $(DICTLOAD) |
ee0345bd | 64 | |
65 | SHLD := $(LD) | |
8e02d10e | 66 | SOFLAGS := -m64 -dynamiclib -undefined dynamic_lookup -single_module |
ee0345bd | 67 | SHLIB := |
68 | SOEXT := so | |
69 | ||
ee0345bd | 70 | ALLD = ar |
71 | ALFLAGS = cr | |
72 | ALLIB = | |
73 | AEXT = a | |
74 | ||
75 | DEPENDCXXFLAGS = $(CXXFLAGS) -I/usr/include/sys | |
76 | ||
77 | SYSLIBS := -L/usr/X11R6/lib -lX11 | |
78 | ||
79 | EXEFLAGS := -bind_at_load | |
80 | ||
81 | #System libraries | |
82 | ||
c9c74649 | 83 | ifneq (,$(findstring g95,$(F77))) |
84 | SYSLIBS += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95 | |
ee0345bd | 85 | else |
1bbe2977 | 86 | SYSLIBS += -ldl $(shell $(F77) -m64 -print-file-name=libgfortran.dylib) |
87 | SYSLIBS += $(shell $(F77) -m64 -print-file-name=libgfortranbegin.a) | |
ee0345bd | 88 | endif |