From 898cb090c8812704448ec4cb1c10d50df4b7d664 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Tue, 25 Sep 2012 19:50:09 +0100 Subject: Build the dynamic way by default on Linux/amd64 This required various build system changes to get the build to go through. In the inplace shell wrappers, we set LD_LIBRARY_PATH to allow programs to find their libraries. In the future, we might change the inplace tree to be the same shape as an installed tree instead. However, this would mean changing the way we do installation, as currently we use cabal's installation methods to install the libraries, but that only works if the libraries are under libraries/foo/dist-install/build/..., rather than in inplace/lib/... --- rules/build-package.mk | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'rules/build-package.mk') diff --git a/rules/build-package.mk b/rules/build-package.mk index c97f8c4b2c..d21f449d93 100644 --- a/rules/build-package.mk +++ b/rules/build-package.mk @@ -115,6 +115,13 @@ $$(foreach way,$$($1_$2_WAYS),$$(eval \ $$(call build-package-way,$1,$2,$$(way),$3) \ )) +# Programs will need to depend on either the vanilla lib (if -static +# is the default) or the dyn lib (if -dynamic is the default). We +# conservatively make them depend on both, to keep things simple. +# If dyn libs are not being built then $$($1_$2_dyn_LIB) will just +# expand to the empty string, and be ignored. +$1_$2_PROGRAM_DEP_LIB = $$($1_$2_v_LIB) $$($1_$2_dyn_LIB) + # C and S files are possibly built the "dyn" way. ifeq "$$(BuildSharedLibs)" "YES" $(call c-objs,$1,$2,dyn) -- cgit v1.2.1