diff options
author | Duncan Coutts <duncan@well-typed.com> | 2009-04-28 12:35:29 +0000 |
---|---|---|
committer | Duncan Coutts <duncan@well-typed.com> | 2009-04-28 12:35:29 +0000 |
commit | 66b0d2dea58a0eb13889e86069b9d8297de4c19c (patch) | |
tree | e4ed628f427be1cc0b3c0c52abfa46a309d95e51 /rules/way-prelims.mk | |
parent | ce14988222b8da2abc57c68a087a61efe5ba709b (diff) | |
download | haskell-66b0d2dea58a0eb13889e86069b9d8297de4c19c.tar.gz |
Add a new $way_libsuf variable for library suffix+extension
This allows the library file type to depend on the way. This is needed
to use .so/.dll libs for the "dyn" way rather than always using .a libs.
For example: thr_debug_dyn_libsuf="_thr_debug-ghc6.11.20090426.so"
Diffstat (limited to 'rules/way-prelims.mk')
-rw-r--r-- | rules/way-prelims.mk | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rules/way-prelims.mk b/rules/way-prelims.mk index 48852645ca..ae4db30f3b 100644 --- a/rules/way-prelims.mk +++ b/rules/way-prelims.mk @@ -21,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 |