Fold testsuite.git into ghc.git (re #8545)
[ghc.git] / rules / way-prelims.mk
1 # -----------------------------------------------------------------------------
2 #
3 # (c) 2009 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 # http://ghc.haskell.org/trac/ghc/wiki/Building/Architecture
9 # http://ghc.haskell.org/trac/ghc/wiki/Building/Modifying
10 #
11 # -----------------------------------------------------------------------------
12
13 define way-prelims # $1 = way
14 ifeq "$1" "v"
15 $1__way =
16 $1_way_ =
17 else
18 $1__way = _$1
19 $1_way_ = $1_
20 endif
21 $1_osuf = $$($1_way_)o
22 $1_hisuf = $$($1_way_)hi
23 $1_hcsuf = $$($1_way_)hc
24
25 ifneq "$(findstring dyn,$1)" ""
26 # If the way includes "dyn" then it's a dynamic lib way. We mangle the
27 # way name to remove "dyn" (or "_dyn") and we change the suffix to
28 # include the versioned dynamic lib extension (eg .so or .dynlib).
29 # For example: thr_debug_dyn_libsuf="_thr_debug-ghc6.11.20090426.so"
30 $1_libsuf = $$($(subst dyn,,$(subst _dyn,,$1))__way)-ghc$(ProjectVersion)$(soext)
31 else
32 $1_libsuf = $$($1__way).a
33 endif
34 endef