]> git.uio.no Git - u/mrichter/AliRoot.git/blob - build/Makefile.macosx64
Set flag: -DCERNLIB_LXIA64.
[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 ifneq (,$(findstring g95,$(ROOTBUILD)))
50 FFLAGS        +=-DFORTRAN_G95
51 else
52 ifneq (,$(findstring gfortran,$(ROOTBUILD)))
53 FFLAGS        +=-DFORTRAN_GFORTRAN
54 else
55 FFLAGS        +=
56 endif
57 endif
58
59 CXXFLAGSNO    = $(CXXNOOPT) $(CXXSTF) 
60
61 CFLAGS        = $(COPT) -m64 -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include
62
63 FFLAGS        = $(CLIBFOPT) $(FOPT)
64 ifeq (g95,$(findstring g95,$(ROOTBUILD)))
65 FFLAGS        += -ftrace=full
66 endif
67 # rmkdepend flags for building dependencies of FORTRAN files
68 DEPENDFFLAGS  = $(FFLAGS)
69
70 # rootcint flags
71 CINTFLAGS     = 
72
73 LD            = export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_MAJOR).$(MACOSX_MINOR) ; \
74                 unset LD_PREBIND ; \
75                 g++
76 LDFLAGS       = $(OPT) -m64 $(DICTLOAD)
77
78 SHLD         := $(LD)
79 SOFLAGS      := -m64 -bundle -undefined dynamic_lookup
80 SHLIB        := 
81 SOEXT        := so
82
83 DYLD         := $(LD)
84 DYFLAGS       = -m64 -dynamiclib -undefined dynamic_lookup -single_module
85 DYLIB        := 
86 DYEXT        := dylib
87
88 ALLD          = ar
89 ALFLAGS       = cr
90 ALLIB         = 
91 AEXT          = a
92
93 DEPENDCXXFLAGS = $(CXXFLAGS) -I/usr/include/sys
94
95 SYSLIBS      := -L/usr/X11R6/lib -lX11
96
97 EXEFLAGS     := -bind_at_load 
98
99 #System libraries
100
101 ifeq (g95,$(findstring g95,$(ROOTBUILD)))
102 SYSLIBS += -L$(shell g95 --print-search-dirs | sed -n -e 's/install: //p') -lf95
103 else
104 SYSLIBS += -ldl $(shell $(F77) -m64 -print-file-name=libgfortran.dylib)
105 SYSLIBS += $(shell $(F77) -m64 -print-file-name=libgfortranbegin.a)
106 endif