* [Qemu-devel] [PATCH] tests: fix out-of-tree building for lm32 target
@ 2012-01-16 23:02 Michael Walle
0 siblings, 0 replies; only message in thread
From: Michael Walle @ 2012-01-16 23:02 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Michael Walle
Signed-off-by: Michael Walle <michael@walle.cc>
---
configure | 4 +++-
tests/tcg/lm32/Makefile | 13 ++++++++-----
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/configure b/configure
index 467e87b..168be85 100755
--- a/configure
+++ b/configure
@@ -3775,7 +3775,8 @@ echo "QEMU_INCLUDES+=$includes" >> $config_target_mak
done # for target in $targets
# build tree in object directory in case the source is not in the current directory
-DIRS="tests tests/tcg tests/tcg/cris slirp audio block net pc-bios/optionrom"
+DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32"
+DIRS="$DIRS slirp audio block net pc-bios/optionrom"
DIRS="$DIRS pc-bios/spapr-rtas"
DIRS="$DIRS roms/seabios roms/vgabios"
DIRS="$DIRS fsdev ui"
@@ -3783,6 +3784,7 @@ DIRS="$DIRS qapi qapi-generated"
DIRS="$DIRS qga trace"
FILES="Makefile tests/tcg/Makefile qdict-test-data.txt"
FILES="$FILES tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit"
+FILES="$FILES tests/tcg/lm32/Makefile"
FILES="$FILES pc-bios/optionrom/Makefile pc-bios/keymaps"
FILES="$FILES pc-bios/spapr-rtas/Makefile"
FILES="$FILES roms/seabios/Makefile roms/vgabios/Makefile"
diff --git a/tests/tcg/lm32/Makefile b/tests/tcg/lm32/Makefile
index 03a1abb..9a00ef7 100644
--- a/tests/tcg/lm32/Makefile
+++ b/tests/tcg/lm32/Makefile
@@ -1,4 +1,4 @@
--include ../../config-host.mak
+-include ../../../config-host.mak
CROSS=lm32-elf-
@@ -12,7 +12,10 @@ SIZE = $(CROSS)size
LD = $(CC)
OBJCOPY = $(CROSS)objcopy
-LDFLAGS = -Tlinker.ld
+TSRC_PATH = $(SRC_PATH)/tests/tcg/lm32
+
+LDFLAGS = -T$(TSRC_PATH)/linker.ld
+ASFLAGS += -Wa,-I,$(TSRC_PATH)/
CRT = crt.o
TESTCASES += test_add.tst
@@ -82,13 +85,13 @@ TESTCASES += test_xori.tst
all: build
-%.o: $(SRC_PATH)/tests/lm32/%.c
+%.o: $(TSRC_PATH)/%.c
$(CC) $(CFLAGS) -c $< -o $@
-%.o: $(SRC_PATH)/tests/lm32/%.S
+%.o: $(TSRC_PATH)/%.S
$(AS) $(ASFLAGS) -c $< -o $@
-%.tst: %.o macros.inc $(CRT)
+%.tst: %.o $(TSRC_PATH)/macros.inc $(CRT)
$(LD) $(LDFLAGS) $(NOSTDFLAGS) $(CRT) $< -o $@
build: $(CRT) $(TESTCASES)
--
1.7.2.5
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-01-16 23:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-16 23:02 [Qemu-devel] [PATCH] tests: fix out-of-tree building for lm32 target Michael Walle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).