]>
git.proxmox.com Git - qemu.git/blob - pc-bios/optionrom/Makefile
69e6c22acc98d28a029176ffb02443eac9870dc6
3 include ..
/..
/config-host.mak
5 VPATH
=$(SRC_PATH
)/pc-bios
/optionrom
7 # from kernel sources - scripts/Kbuild.include
9 # Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise)
10 # Exit code chooses option. "$$TMP" is can be used as temporary file and
11 # is automatically cleaned up.
12 try-run
= $(shell set
-e
; \
13 TMP
="$(TMPOUT).$$$$.tmp"; \
14 if
($(1)) >/dev
/null
2>&1; \
21 # Usage: flag := $(call cc-option-yn,-march=winchip-c6)
22 cc-option-yn
= $(call try-run
,\
23 $(CC
) $(KBUILD_CFLAGS
) $(1) -S
-xc
/dev
/null
-o
"$$TMP",y
,n
)
25 CFLAGS
= -Wall
-Wstrict-prototypes
-Werror
-fomit-frame-pointer
-fno-builtin
26 CFLAGS
+= -I
$(SRC_PATH
)
27 ifeq ($(call cc-option-yn
,-fno-stack-protector
),y
)
28 CFLAGS
+= -fno-stack-protector
31 build-all
: multiboot.bin
34 $(CC
) $(CFLAGS
) -o
$@
-c
$<
37 $(LD
) -Ttext
0 -e _start
-s
-o
$@
$<
40 $(OBJCOPY
) -O binary
-j .text
$< $@
43 $(SRC_PATH
)/pc-bios
/optionrom
/signrom.sh
$< $@
44 cp
$@
$(SRC_PATH
)/pc-bios
/
47 $(RM
) *.o
*.img
*.bin
*~