1# ----------------------------------------------------------------------------- 2# 3# (c) 2010 The University of Glasgow 4# 5# This file is part of the GHC build system. 6# 7# To understand how the build system works and how to modify it, see 8# https://gitlab.haskell.org/ghc/ghc/wikis/building/architecture 9# https://gitlab.haskell.org/ghc/ghc/wikis/building/modifying 10# 11# ----------------------------------------------------------------------------- 12 13# $1 = paths to prepend 14ifeq "$(TargetOS_CPP)" "mingw32" 15prependLibraryPath = $(error Do not know how to prependLibraryPath on Windows) 16else ifeq "$(TargetOS_CPP)" "darwin" 17prependLibraryPath = export DYLD_LIBRARY_PATH="$1$${DYLD_LIBRARY_PATH:+:$$DYLD_LIBRARY_PATH}" 18else 19prependLibraryPath = export LD_LIBRARY_PATH="$1$${LD_LIBRARY_PATH:+:$$LD_LIBRARY_PATH}" 20endif 21 22