aboutsummaryrefslogtreecommitdiff
path: root/tests/multiboot/Makefile
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2018-03-14 13:33:49 +0100
committerKevin Wolf <kwolf@redhat.com>2018-03-21 15:13:25 +0100
commit1c8c426fb44bf5b3ffbcad1b00c7def4b89b03ec (patch)
tree5fe77a6301b1347d00dc4baf57d6d1fa7ef03851 /tests/multiboot/Makefile
parent49713c413a65ab4b02124aabe83f8539cc6ece5e (diff)
downloadqemu-1c8c426fb44bf5b3ffbcad1b00c7def4b89b03ec.zip
qemu-1c8c426fb44bf5b3ffbcad1b00c7def4b89b03ec.tar.gz
qemu-1c8c426fb44bf5b3ffbcad1b00c7def4b89b03ec.tar.bz2
tests/multiboot: Add tests for the a.out kludge
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Jack Schwartz <jack.schwartz@oracle.com>
Diffstat (limited to 'tests/multiboot/Makefile')
-rw-r--r--tests/multiboot/Makefile22
1 files changed, 16 insertions, 6 deletions
diff --git a/tests/multiboot/Makefile b/tests/multiboot/Makefile
index 36f01dc..ed4225e 100644
--- a/tests/multiboot/Makefile
+++ b/tests/multiboot/Makefile
@@ -3,16 +3,26 @@ CCFLAGS=-m32 -Wall -Wextra -Werror -fno-stack-protector -nostdinc -fno-builtin
ASFLAGS=-m32
LD=ld
-LDFLAGS=-melf_i386 -T link.ld
+LDFLAGS_ELF=-melf_i386 -T link.ld
+LDFLAGS_BIN=-melf_i386 -T link.ld --oformat=binary
LIBS=$(shell $(CC) $(CCFLAGS) -print-libgcc-file-name)
-all: mmap.elf modules.elf
+AOUT_KLUDGE_BIN=$(foreach x,$(shell seq 1 9),aout_kludge_$x.bin)
-mmap.elf: start.o mmap.o libc.o
- $(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
+all: mmap.elf modules.elf $(AOUT_KLUDGE_BIN)
-modules.elf: start.o modules.o libc.o
- $(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
+mmap.elf: start.o mmap.o libc.o link.ld
+ $(LD) $(LDFLAGS_ELF) -o $@ $^ $(LIBS)
+
+modules.elf: start.o modules.o libc.o link.ld
+ $(LD) $(LDFLAGS_ELF) -o $@ $^ $(LIBS)
+
+aout_kludge_%.bin: aout_kludge_%.o link.ld
+ $(LD) $(LDFLAGS_BIN) -o $@ $^ $(LIBS)
+
+.PRECIOUS: aout_kludge_%.o
+aout_kludge_%.o: aout_kludge.S
+ $(CC) $(ASFLAGS) -DSCENARIO=$* -c -o $@ $^
%.o: %.c
$(CC) $(CCFLAGS) -c -o $@ $^