summaryrefslogtreecommitdiff
path: root/rules/c-objs.mk
diff options
context:
space:
mode:
authorDuncan Coutts <duncan@well-typed.com>2009-04-28 12:34:52 +0000
committerDuncan Coutts <duncan@well-typed.com>2009-04-28 12:34:52 +0000
commitce14988222b8da2abc57c68a087a61efe5ba709b (patch)
tree0c7a95ff6a1585cb8938e70441633ccefdfa180b /rules/c-objs.mk
parentde75026f5a48d3d052135a973ab4dff76c5b20f5 (diff)
downloadhaskell-ce14988222b8da2abc57c68a087a61efe5ba709b.tar.gz
extend the rules/c-objs macro to take the way as a parameter
Previously we only built library package "cbits" the vanilla way, afterall C code does not need to be built differently for profiling builds. However for dynamic libs the C code needs to be built with -fPIC, so we do need to be able to build package .c (and .s?) files multiple ways.
Diffstat (limited to 'rules/c-objs.mk')
-rw-r--r--rules/c-objs.mk8
1 files changed, 4 insertions, 4 deletions
diff --git a/rules/c-objs.mk b/rules/c-objs.mk
index fbf35535fc..3263f5b336 100644
--- a/rules/c-objs.mk
+++ b/rules/c-objs.mk
@@ -10,8 +10,8 @@
#
# -----------------------------------------------------------------------------
-define c-objs # args: $1 = dir, $2 = distdir
-# C and S files are built only once, not once per way
-$1_$2_C_OBJS = $$(patsubst %.c,$1/$2/build/%.$$(v_osuf),$$($1_$2_C_SRCS))
-$1_$2_S_OBJS = $$(patsubst %.S,$1/$2/build/%.$$(v_osuf),$$($1_$2_S_SRCS))
+define c-objs # args: $1 = dir, $2 = distdir, $3 = way
+# C and S files are usually only built for way "v", but sometimes "dyn" too
+$1_$2_$3_C_OBJS = $$(patsubst %.c,$1/$2/build/%.$$($3_osuf),$$($1_$2_C_SRCS))
+$1_$2_$3_S_OBJS = $$(patsubst %.S,$1/$2/build/%.$$($3_osuf),$$($1_$2_S_SRCS))
endef