1 # -*- mode: makefile -*-
2 # Makefile for AliRoot for MacOS X with gcc
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))
11 FINK_ROOT := $(shell which fink | sed -e 's?/bin/fink??')
13 # No fink, build will probably fail, but we try a guess
18 CXX = $(shell root-config --cxx)
19 CC = $(shell root-config --cc)
20 F77 = $(shell root-config --f77)
29 FOPT = $(OPT) -fno-second-underscore
30 ifeq (,$(findstring g95,$(F77)))
31 FOPT += -fbounds-check
35 CLIBDEFS = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC
38 CLIBFOPT = $(CLIBDEFS)
40 CXXSTF = -pipe -Wall -W -Wno-long-double -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
43 CXXFLAGS = $(CXXOPT) $(CXXSTF)
45 CXXFLAGSNO = $(CXXNOOPT) $(CXXSTF)
47 CFLAGS = $(COPT) -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include
49 FFLAGS = $(CLIBFOPT) $(FOPT)
50 ifneq (,$(findstring g95,$(F77)))
51 FFLAGS += -ftrace=full
52 FFLAGS +=-DFORTRAN_G95
54 FFLAGS +=-DFORTRAN_GFORTRAN
57 # rmkdepend flags for building dependencies of FORTRAN files
58 DEPENDFFLAGS = $(FFLAGS)
63 LD = export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_MAJOR).$(MACOSX_MINOR) ; \
65 $(shell root-config --ld)
66 LDFLAGS = $(OPT) $(DICTLOAD)
69 SOFLAGS := -bundle -undefined dynamic_lookup
74 DYFLAGS = -dynamiclib -undefined dynamic_lookup -single_module
83 DEPENDCXXFLAGS = $(CXXFLAGS) -I/usr/include/sys
85 SYSLIBS := -L/usr/X11R6/lib -lX11
87 EXEFLAGS := -bind_at_load
91 ifneq (,$(findstring g95,$(F77)))
92 SYSLIBS += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95
93 DYLIB += -L$(shell $(F77) --print-search-dirs | sed -n -e 's/install: //p') -lf95
95 SYSLIBS += -ldl $(shell $(F77) -print-file-name=libgfortran.dylib)
96 SYSLIBS += $(shell $(F77) -print-file-name=libgfortranbegin.a)