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