]>
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) | |
9be1be4e | 34 | CXXSTF = -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 | 35 | |
9be1be4e | 36 | CXXSTF = -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 | 37 | |
38 | # Compiler flags | |
1bbe2977 | 39 | CXXFLAGS = $(CXXOPT) $(CXXSTF) |
ee0345bd | 40 | |
ee0345bd | 41 | CXXFLAGSNO = $(CXXNOOPT) $(CXXSTF) |
42 | ||
9be1be4e | 43 | CFLAGS = $(COPT) -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include |
ee0345bd | 44 | |
f36e7e21 | 45 | FFLAGS = $(CLIBFOPT) $(FOPT) |
c9c74649 | 46 | ifneq (,$(findstring g95,$(F77))) |
ee0345bd | 47 | FFLAGS += -ftrace=full |
7da87db6 | 48 | FFLAGS +=-DFORTRAN_G95 |
49 | else | |
50 | FFLAGS +=-DFORTRAN_GFORTRAN | |
ee0345bd | 51 | endif |
7da87db6 | 52 | |
ee0345bd | 53 | # rmkdepend flags for building dependencies of FORTRAN files |
54 | DEPENDFFLAGS = $(FFLAGS) | |
55 | ||
56 | # rootcint flags | |
57 | CINTFLAGS = | |
58 | ||
59 | LD = export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_MAJOR).$(MACOSX_MINOR) ; \ | |
60 | unset LD_PREBIND ; \ | |
c9c74649 | 61 | $(shell root-config --ld) |
9be1be4e | 62 | LDFLAGS = $(OPT) $(DICTLOAD) |
ee0345bd | 63 | |
64 | SHLD := $(LD) | |
8e02d10e | 65 | SOFLAGS := -m64 -dynamiclib -undefined dynamic_lookup -single_module |
ee0345bd | 66 | SHLIB := |
67 | SOEXT := so | |
68 | ||
ee0345bd | 69 | ALLD = ar |
70 | ALFLAGS = cr | |
71 | ALLIB = | |
72 | AEXT = a | |
73 | ||
74 | DEPENDCXXFLAGS = $(CXXFLAGS) -I/usr/include/sys | |
75 | ||
76 | SYSLIBS := -L/usr/X11R6/lib -lX11 | |
77 | ||
78 | EXEFLAGS := -bind_at_load | |
79 | ||
80 | #System libraries | |
81 | ||
c9c74649 | 82 | ifneq (,$(findstring g95,$(F77))) |
83 | SYSLIBS += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95 | |
ee0345bd | 84 | else |
1bbe2977 | 85 | SYSLIBS += -ldl $(shell $(F77) -m64 -print-file-name=libgfortran.dylib) |
86 | SYSLIBS += $(shell $(F77) -m64 -print-file-name=libgfortranbegin.a) | |
ee0345bd | 87 | endif |