remove equals sign in rpath definition to work with mac, changed linker options in compile_CoreModule to work with linux again, please let me know if mac doesn't work anymore (it should)

This commit is contained in:
Martin Diehl 2014-01-30 13:07:44 +00:00
parent 7a9fa061de
commit 986591682c
2 changed files with 9 additions and 7 deletions

View File

@ -46,7 +46,7 @@ COMPILERNAME ?= $(F90)
INCLUDE_DIRS :=-I../lib
LIBRARIES :=-lfftw3
LIB_DIRS :=-L$(FFTW_ROOT)/lib
RUN_PATH :=-Wl,-rpath=$(FFTW_ROOT)/lib
RUN_PATH :=-Wl,-rpath,$(FFTW_ROOT)/lib
ifeq "$(FASTBUILD)" "YES"
OPENMP := OFF
@ -101,18 +101,18 @@ endif
ifneq "x$(IMKL_ROOT)" "x"
LIB_DIRS :=-L$(IMKL_ROOT)/lib/intel64
RUN_PATH +=$(RUN_PATH),-rpath=$(IMKL_ROOT)/lib/intel64
RUN_PATH +=$(RUN_PATH),-rpath,$(IMKL_ROOT)/lib/intel64
INCLUDE_DIRS +=-I$(IMKL_ROOT)/include
LIBRARIES +=-lmkl_$(IMKL_COMPILER_$(F90))_lp64 -lmkl_core -lmkl_$(IMKL_ARCH) -lm -lpthread -liomp5
else
ifneq "x$(ACML_ROOT)" "x"
LIB_DIRS +=-L$(ACML_ROOT)/$(F90)64$(ACML_ARCH)/lib
RUN_PATH +=$(RUN_PATH),-rpath=$(ACML_ROOT)/$(F90)64$(ACML_ARCH)/lib
RUN_PATH +=$(RUN_PATH),-rpath,$(ACML_ROOT)/$(F90)64$(ACML_ARCH)/lib
LIBRARIES +=-lacml$(ACML_ARCH)
else
ifneq "x$(LAPACK_ROOT)" "x"
LIB_DIRS +=-L$(LAPACK_ROOT)/lib64 -L$(LAPACK_ROOT)/lib
RUN_PATH +=$(RUN_PATH),-rpath=$(LAPACK_ROOT)/lib64,-rpath=$(LAPACK_ROOT)/lib
RUN_PATH +=$(RUN_PATH),-rpath,$(LAPACK_ROOT)/lib64,-rpath,$(LAPACK_ROOT)/lib
LIBRARIES +=-llapack
endif
endif
@ -122,7 +122,7 @@ endif
ifeq "$(HDF5)" "ON"
LIBRARIES +=-lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5
LIB_DIRS +=-L$(HDF5_ROOT)/lib
RUN_PATH +=$(RUN_PATH),-rpath=$(HDF5_ROOT)/lib
RUN_PATH +=$(RUN_PATH),-rpath,$(HDF5_ROOT)/lib
INCLUDE_DIRS +=-I$(HDF5_ROOT)/include -DHDF
endif

View File

@ -45,8 +45,10 @@ compiler = {
compileOptions = ' -DSpectral -DFLOAT=8 -DINT=4 -I%s/lib'%damaskEnv.rootDir()
#--- this saves the path of libraries to core.so, hence it is known during runtime ----------------
LDFLAGS = ' -undefined dynamic_lookup' # solved error: Undefined symbols for architecture x86_64: "_PyArg_ParseTupleAndKeywords" as found on https://lists.macosforge.org/pipermail/macports-dev/2013-May/022735.html
LDFLAGS += ' -shared -Wl,-rpath,%s/lib,-rpath,%s/lib64'%(options['FFTW_ROOT'],options['FFTW_ROOT'])
LDFLAGS = '-Wl,-rpath,%s/lib,-rpath,%s/lib64'%(options['FFTW_ROOT'],options['FFTW_ROOT'])
if options['F90'] == 'gfortran':
LDFLAGS += ' -shared -Wl,-undefined,dynamic_lookup' # solved error: Undefined symbols for architecture x86_64: "_PyArg_ParseTupleAndKeywords" as found on https://lists.macosforge.org/pipermail/macports-dev/2013-May/022735.html
# see http://cens.ioc.ee/pipermail/f2py-users/2003-December/000621.html
if options['IMKL_ROOT']: