summaryrefslogtreecommitdiff
path: root/rules/library-path.mk
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-10-24 17:49:42 +0100
committerIan Lynagh <ian@well-typed.com>2012-10-24 18:03:34 +0100
commit68ae113299dbf2928cf0a8c4400b960620136738 (patch)
treedba89f6d09b9ba5ce19ebd287d9e5701e7fd6d26 /rules/library-path.mk
parentb8da5dd3c55d766f0229abb46a1e5c7819d2cd73 (diff)
downloadhaskell-68ae113299dbf2928cf0a8c4400b960620136738.tar.gz
Make it possible to build with only way dyn
Diffstat (limited to 'rules/library-path.mk')
-rw-r--r--rules/library-path.mk21
1 files changed, 21 insertions, 0 deletions
diff --git a/rules/library-path.mk b/rules/library-path.mk
new file mode 100644
index 0000000000..d6e39743e2
--- /dev/null
+++ b/rules/library-path.mk
@@ -0,0 +1,21 @@
+# -----------------------------------------------------------------------------
+#
+# (c) 2010 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
+# $1 = paths to prepend
+ifeq "$(TargetOS_CPP)" "linux"
+prependLibraryPath = export LD_LIBRARY_PATH="$1:$$LD_LIBRARY_PATH"
+else ifeq "$(TargetOS_CPP)" "darwin"
+prependLibraryPath = export DYLD_LIBRARY_PATH="$1:$$DYLD_LIBRARY_PATH"
+else
+prependLibraryPath = $(error Do not know how to prependLibraryPath on $(TargetOS_CPP))
+endif
+