]> git.uio.no Git - u/mrichter/AliRoot.git/blob - build/Makefile.macosx64
Connection to tree in Notify() seems to be safer.
[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 # Global optimisation
18 OPT           = -O -g
19 NOOPT         = -O0 -g
20
21 CXXOPT        = $(OPT) 
22 CXXNOOPT      = $(NOOPT) 
23 COPT          = $(OPT)
24 FOPT          = $(OPT) -fno-second-underscore
25 ifneq (,$(findstring g95,$(F77)))
26 FOPT         += -fbounds-check
27 endif
28
29 # CERNLIB defines
30 CLIBDEFS      = -DCERNLIB_LXIA64 -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC
31 CLIBCXXOPTS   =
32 CLIBCOPT      =
33 CLIBFOPT      = $(CLIBDEFS)
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
35
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
37
38 # Compiler flags
39 CXXFLAGS      = $(CXXOPT) $(CXXSTF)
40
41 CXXFLAGSNO    = $(CXXNOOPT) $(CXXSTF) 
42
43 CFLAGS        = $(COPT) -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include
44
45 FFLAGS        = $(CLIBFOPT) $(FOPT)
46 ifneq (,$(findstring g95,$(F77)))
47 FFLAGS        += -ftrace=full
48 FFLAGS        +=-DFORTRAN_G95
49 else
50 FFLAGS        +=-DFORTRAN_GFORTRAN
51 endif
52
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 ; \
61                 $(shell root-config --ld)
62 LDFLAGS       = $(OPT) $(DICTLOAD)
63
64 SHLD         := $(LD)
65 SOFLAGS      := -m64 -dynamiclib -undefined dynamic_lookup -single_module
66 SHLIB        := 
67 SOEXT        := so
68
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
82 ifneq (,$(findstring g95,$(F77)))
83 SYSLIBS += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95
84 else
85 SYSLIBS += -ldl $(shell $(F77) -m64 -print-file-name=libgfortran.dylib)
86 SYSLIBS += $(shell $(F77) -m64 -print-file-name=libgfortranbegin.a)
87 endif