aboutsummaryrefslogtreecommitdiff
path: root/rules.mak
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-02-05 17:27:27 +0000
committerPeter Maydell <peter.maydell@linaro.org>2014-02-08 14:50:48 +0000
commitc3dc9fd5ac892b88b956d8c90c0e8de14c08e0fc (patch)
treea37987d8f6a17d04ac1b6f0426580d9ea9b3217d /rules.mak
parenta9d477c4e3d614409a48d12f34624c2dd9f1ec2d (diff)
downloadqemu-arm-c3dc9fd5ac892b88b956d8c90c0e8de14c08e0fc.tar.gz
rules.mak: Support .cc as a C++ source file suffix
The A64 disassembler libvixl uses .cc as its suffix for C++ source files, so add support for it (we already support .cpp). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'rules.mak')
-rw-r--r--rules.mak6
1 files changed, 5 insertions, 1 deletions
diff --git a/rules.mak b/rules.mak
index 49edb9bf07..cd9187e504 100644
--- a/rules.mak
+++ b/rules.mak
@@ -8,6 +8,7 @@ MAKEFLAGS += -rR
%.d:
%.h:
%.c:
+%.cc:
%.cpp:
%.m:
%.mak:
@@ -54,6 +55,9 @@ endif
%.o: %.asm
$(call quiet-command,$(AS) $(ASFLAGS) -o $@ $<," AS $(TARGET_DIR)$@")
+%.o: %.cc
+ $(call quiet-command,$(CXX) $(QEMU_INCLUDES) $(QEMU_CXXFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<," CXX $(TARGET_DIR)$@")
+
%.o: %.cpp
$(call quiet-command,$(CXX) $(QEMU_INCLUDES) $(QEMU_CXXFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<," CXX $(TARGET_DIR)$@")
@@ -77,7 +81,7 @@ quiet-command = $(if $(V),$1,$(if $(2),@echo $2 && $1, @$1))
cc-option = $(if $(shell $(CC) $1 $2 -S -o /dev/null -xc /dev/null \
>/dev/null 2>&1 && echo OK), $2, $3)
-VPATH_SUFFIXES = %.c %.h %.S %.cpp %.m %.mak %.texi %.sh %.rc
+VPATH_SUFFIXES = %.c %.h %.S %.cc %.cpp %.m %.mak %.texi %.sh %.rc
set-vpath = $(if $1,$(foreach PATTERN,$(VPATH_SUFFIXES),$(eval vpath $(PATTERN) $1)))
# find-in-path