|
|
1.1 ! root 1: all: build-all ! 2: # Dummy command so that make thinks it has done something ! 3: @true ! 4: ! 5: include ../../config-host.mak ! 6: ! 7: VPATH=$(SRC_PATH)/pc-bios/optionrom ! 8: ! 9: # from kernel sources - scripts/Kbuild.include ! 10: # try-run ! 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; \ ! 17: then echo "$(2)"; \ ! 18: else echo "$(3)"; \ ! 19: fi; \ ! 20: rm -f "$$TMP") ! 21: ! 22: # cc-option-yn ! 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) ! 26: ! 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 ! 31: endif ! 32: ! 33: build-all: multiboot.bin ! 34: ! 35: %.o: %.S ! 36: $(CC) $(CFLAGS) -o $@ -c $< ! 37: ! 38: %.img: %.o ! 39: $(LD) -Ttext 0 -e _start -s -o $@ $< ! 40: ! 41: %.raw: %.img ! 42: $(OBJCOPY) -O binary -j .text $< $@ ! 43: ! 44: %.bin: %.raw ! 45: $(SRC_PATH)/pc-bios/optionrom/signrom.sh $< $@ ! 46: ! 47: clean: ! 48: $(RM) *.o *.img *.bin *~
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.