xref: /openbmc/qemu/tests/multiboot/Makefile (revision d6032e06)
1CC=gcc
2CCFLAGS=-m32 -Wall -Wextra -Werror -fno-stack-protector -nostdinc -fno-builtin
3ASFLAGS=-m32
4
5LD=ld
6LDFLAGS=-melf_i386 -T link.ld
7LIBS=$(shell $(CC) $(CCFLAGS) -print-libgcc-file-name)
8
9all: mmap.elf
10
11mmap.elf: start.o mmap.o libc.o
12	$(LD) $(LDFLAGS) -o $@ $^ $(LIBS)
13
14%.o: %.c
15	$(CC) $(CCFLAGS) -c -o $@ $^
16
17%.o: %.S
18	$(CC) $(ASFLAGS) -c -o $@ $^
19