# Source files
SRC16=floppy.c disk.c system.c clock.c serial.c kbd.c mouse.c output.c \
- boot.c ata.c cdrom.c apm.c
-SRC32=post.c output.c
+ boot.c ata.c cdrom.c apm.c util.c
+SRC32=post.c output.c rombios32.c util.c ata.c kbd.c
TABLESRC=font.c cbt.c floppy_dbt.c
cc-option = $(shell if test -z "`$(1) $(2) -S -o /dev/null -xc \
# Default compiler flags
COMMONCFLAGS = -Wall -Os -MD -m32 -march=i386 -mregparm=2 \
- -ffreestanding -fwhole-program
+ -ffreestanding -fwhole-program -fomit-frame-pointer \
+ -fno-delete-null-pointer-checks
COMMONCFLAGS += $(call cc-option,$(CC),-nopie,)
COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,)
@echo " Linking $@"
$(Q)ld -melf_i386 -e post16 -Ttext 0 $< -o $@
-$(OUT)rom16.bin: $(OUT)rom16.o
- @echo " Extracting binary $@"
- $(Q)objcopy -O binary $< $@
-
$(OUT)romlayout32.o: $(OUT)rom16.offset.auto.h ; $(call whole-compile, $(CFLAGS), $(addprefix src/, $(SRC32)),$@)
$(OUT)rom32.o: $(OUT)romlayout32.o $(OUT)rombios32.lds