Makefile 789 字节
Newer Older
A
Alexander Graf 已提交
1
all: build-all
P
Paul Brook 已提交
2 3
# Dummy command so that make thinks it has done something
	@true
A
Alexander Graf 已提交
4 5

include ../../config-host.mak
6
include $(SRC_PATH)/rules.mak
A
Alexander Graf 已提交
7 8

VPATH=$(SRC_PATH)/pc-bios/optionrom
J
Juan Quintela 已提交
9
.PHONY : all clean build-all
A
Alexander Graf 已提交
10

11
CFLAGS := -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin
J
Juan Quintela 已提交
12
CFLAGS += -I$(SRC_PATH)
13
CFLAGS += $(call cc-option, $(CFLAGS), -fno-stack-protector)
14
QEMU_CFLAGS = $(CFLAGS)
A
Alexander Graf 已提交
15 16 17 18

build-all: multiboot.bin

%.img: %.o
19
	$(call quiet-command,$(LD) -Ttext 0 -e _start -s -o $@ $<,"  Building $(TARGET_DIR)$@")
A
Alexander Graf 已提交
20

21
%.raw: %.img
22
	$(call quiet-command,$(OBJCOPY) -O binary -j .text $< $@,"  Building $(TARGET_DIR)$@")
23 24

%.bin: %.raw
25
	$(call quiet-command,$(SHELL) $(SRC_PATH)/pc-bios/optionrom/signrom.sh $< $@,"  Signing $(TARGET_DIR)$@")
A
Alexander Graf 已提交
26 27

clean:
28
	rm -f *.o *.d *.raw *.img *.bin *~