2 # Dummy command so that make thinks it has done something
5 include ..
/..
/config-host.mak
7 VPATH
=$(SRC_PATH
)/pc-bios
/optionrom
9 # from kernel sources - scripts/Kbuild.include
11 # Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise)
12 # Exit code chooses option. "$$TMP" is can be used as temporary file and
13 # is automatically cleaned up.
14 try-run
= $(shell set
-e
; \
15 TMP
="$(TMPOUT).$$$$.tmp"; \
16 if
($(1)) >/dev
/null
2>&1; \
23 # Usage: flag := $(call cc-option-yn,-march=winchip-c6)
24 cc-option-yn
= $(call try-run
,\
25 $(CC
) $(KBUILD_CFLAGS
) $(1) -S
-xc
/dev
/null
-o
"$$TMP",y
,n
)
27 CFLAGS
= -Wall
-Wstrict-prototypes
-Werror
-fomit-frame-pointer
-fno-builtin
28 CFLAGS
+= -I
$(SRC_PATH
)
29 ifeq ($(call cc-option-yn
,-fno-stack-protector
),y
)
30 CFLAGS
+= -fno-stack-protector
33 build-all
: multiboot.bin extboot.bin
36 $(CC
) $(CFLAGS
) -o
$@
-c
$<
39 $(LD
) -Ttext
0 -e _start
-s
-o
$@
$<
42 $(OBJCOPY
) -O binary
-j .text
$< $@
45 $(SRC_PATH
)/pc-bios
/optionrom
/signrom.sh
$< $@
48 $(RM
) *.o
*.img
*.bin
*~