X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=rules%2Fway-prelims.mk;h=ae4db30f3b4341d84cd76d66ea2e61069ded9b68;hp=9df9a5bc6986638a6edaf0a440cdf56f6afd50a3;hb=0856ac59cfb455d32a3042317fdba0f5e85cab9c;hpb=34cc75e1a62638f2833815746ebce0a9114dc26b diff --git a/rules/way-prelims.mk b/rules/way-prelims.mk index 9df9a5b..ae4db30 100644 --- a/rules/way-prelims.mk +++ b/rules/way-prelims.mk @@ -1,3 +1,14 @@ +# ----------------------------------------------------------------------------- +# +# (c) 2009 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 +# +# ----------------------------------------------------------------------------- define way-prelims # $1 = way ifeq "$1" "v" @@ -10,4 +21,14 @@ endif $1_osuf = $$($1_way_)o $1_hisuf = $$($1_way_)hi $1_hcsuf = $$($1_way_)hc + +ifneq "$(findstring dyn,$1)" "" +# If the way includes "dyn" then it's a dynamic lib way. We mangle the +# way name to remove "dyn" (or "_dyn") and we change the suffix to +# include the versioned dynamic lib extension (eg .so or .dynlib). +# For example: thr_debug_dyn_libsuf="_thr_debug-ghc6.11.20090426.so" +$1_libsuf = $$($(subst dyn,,$(subst _dyn,,$1))__way)-ghc$(ProjectVersion)$(soext) +else +$1_libsuf = $$($1__way).a +endif endef