]> git.uio.no Git - u/mrichter/AliRoot.git/blob - build/Makefile.macosx64
renamed a method to load libs so that it does not clash with earlier runs
[u/mrichter/AliRoot.git] / build / Makefile.macosx64
1 # -*- mode: makefile -*-
2 # Makefile for AliRoot for MacOS X with gcc
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
18 CXX           = $(shell root-config --cxx) 
19 CC            = $(shell root-config --cc)
20 F77           = $(shell root-config --f77)
21
22 # Global optimisation
23 OPT           = -O -g
24 NOOPT         = -O0 -g
25
26 CXXOPT        = $(OPT) 
27 CXXNOOPT      = $(NOOPT) 
28 COPT          = $(OPT)
29 FOPT          = $(OPT) -fno-second-underscore -m64
30 ifneq (,$(findstring g95,$(F77)))
31 FOPT         += -fbounds-check
32 endif
33
34 # CERNLIB defines
35 CLIBDEFS      = -DCERNLIB_LXIA64 -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC
36 CLIBCXXOPTS   =
37 CLIBCOPT      =
38 CLIBFOPT      = $(CLIBDEFS)
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
40
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
42
43 # Compiler flags
44 CXXFLAGS      = $(CXXOPT) $(CXXSTF)
45
46 CXXFLAGSNO    = $(CXXNOOPT) $(CXXSTF) 
47
48 CFLAGS        = $(COPT) -m64 -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include
49
50 FFLAGS        = $(CLIBFOPT) $(FOPT)
51 ifneq (,$(findstring g95,$(F77)))
52 FFLAGS        += -ftrace=full
53 FFLAGS        +=-DFORTRAN_G95
54 else
55 FFLAGS        +=-DFORTRAN_GFORTRAN
56 endif
57
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 ; \
66                 $(shell root-config --ld)
67 LDFLAGS       = $(OPT) -m64 $(DICTLOAD)
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
92 ifneq (,$(findstring g95,$(F77)))
93 SYSLIBS += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95
94 else
95 SYSLIBS += -ldl $(shell $(F77) -m64 -print-file-name=libgfortran.dylib)
96 SYSLIBS += $(shell $(F77) -m64 -print-file-name=libgfortranbegin.a)
97 endif