summaryrefslogtreecommitdiff
path: root/rules/c-objs.mk
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-09-09 17:02:15 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-11-18 22:27:20 -0500
commit78d4bca01c1efe481c6ce2356497593d3058fb95 (patch)
tree18896178678a62cecafb5082819e949a12cd6ad0 /rules/c-objs.mk
parent12d023d1b4706665645cc0783dd1ae67625357a3 (diff)
downloadhaskell-78d4bca01c1efe481c6ce2356497593d3058fb95.tar.gz
ghc-cabal, make: Add support for building C++ object code
Co-Authored By: Matthew Pickering <matthew@well-typed.com>
Diffstat (limited to 'rules/c-objs.mk')
-rw-r--r--rules/c-objs.mk7
1 files changed, 4 insertions, 3 deletions
diff --git a/rules/c-objs.mk b/rules/c-objs.mk
index 415998ab60..6b43fb54cd 100644
--- a/rules/c-objs.mk
+++ b/rules/c-objs.mk
@@ -11,7 +11,8 @@
# -----------------------------------------------------------------------------
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))
+# C, 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_CXX_OBJS = $$(patsubst %.cpp,$1/$2/build/%.$$($3_osuf),$$($1_$2_CXX_SRCS))
+$1_$2_$3_S_OBJS = $$(patsubst %.S,$1/$2/build/%.$$($3_osuf),$$($1_$2_S_SRCS))
endef