[makefile] Split platform-dependent portions out of arch/i386/Makefile
This commit is contained in:
parent
98abd48a26
commit
5c695db474
@ -35,10 +35,6 @@ CFLAGS += -mrtd
|
|||||||
#
|
#
|
||||||
CFLAGS += -freg-struct-return
|
CFLAGS += -freg-struct-return
|
||||||
|
|
||||||
# Stop ld from complaining about our customised linker script
|
|
||||||
#
|
|
||||||
LDFLAGS += -N --no-check-sections
|
|
||||||
|
|
||||||
# Force 32-bit code even on an x86-64 machine
|
# Force 32-bit code even on an x86-64 machine
|
||||||
#
|
#
|
||||||
CFLAGS += -m32
|
CFLAGS += -m32
|
||||||
@ -81,31 +77,10 @@ NON_AUTO_SRCS += arch/i386/core/wince_loader.c
|
|||||||
OBJS_unnrv2b = unnrv2b unnrv2b16
|
OBJS_unnrv2b = unnrv2b unnrv2b16
|
||||||
CFLAGS_unnrv2b16 = -DCODE16
|
CFLAGS_unnrv2b16 = -DCODE16
|
||||||
|
|
||||||
# The i386 linker script
|
# Include platform-specific Makefile
|
||||||
#
|
#
|
||||||
LDSCRIPT = arch/i386/scripts/i386.lds
|
MAKEDEPS += arch/i386/Makefile.$(PLATFORM)
|
||||||
|
include arch/i386/Makefile.$(PLATFORM)
|
||||||
# Media types.
|
|
||||||
#
|
|
||||||
MEDIA += rom
|
|
||||||
MEDIA += pxe
|
|
||||||
MEDIA += kpxe
|
|
||||||
MEDIA += elf
|
|
||||||
MEDIA += elfd
|
|
||||||
MEDIA += lmelf
|
|
||||||
MEDIA += lmelfd
|
|
||||||
MEDIA += lkrn
|
|
||||||
MEDIA += bImage
|
|
||||||
MEDIA += dsk
|
|
||||||
MEDIA += nbi
|
|
||||||
MEDIA += hd
|
|
||||||
MEDIA += raw
|
|
||||||
MEDIA += com
|
|
||||||
MEDIA += exe
|
|
||||||
|
|
||||||
# Special target for building Master Boot Record binary
|
|
||||||
$(BIN)/mbr.bin : $(BIN)/mbr.o
|
|
||||||
$(OBJCOPY) -O binary $< $@
|
|
||||||
|
|
||||||
# Some suffixes (e.g. %.fd0) are generated directly from other
|
# Some suffixes (e.g. %.fd0) are generated directly from other
|
||||||
# finished files (e.g. %.dsk), rather than having their own prefix.
|
# finished files (e.g. %.dsk), rather than having their own prefix.
|
||||||
@ -122,24 +97,6 @@ NON_AUTO_MEDIA += pdsk
|
|||||||
cp $< $@
|
cp $< $@
|
||||||
$(PERL) ./util/dskpad.pl $@
|
$(PERL) ./util/dskpad.pl $@
|
||||||
|
|
||||||
# rule to make a non-emulation ISO boot image
|
|
||||||
NON_AUTO_MEDIA += iso
|
|
||||||
%iso: %lkrn util/geniso
|
|
||||||
ISOLINUX_BIN=$(ISOLINUX_BIN) bash util/geniso $@ $<
|
|
||||||
|
|
||||||
# rule to make a floppy emulation ISO boot image
|
|
||||||
NON_AUTO_MEDIA += liso
|
|
||||||
%liso: %lkrn util/genliso
|
|
||||||
bash util/genliso $@ $<
|
|
||||||
|
|
||||||
# rule to make a USB disk image
|
|
||||||
$(BIN)/usbdisk.bin : $(BIN)/usbdisk.o
|
|
||||||
$(OBJCOPY) -O binary $< $@
|
|
||||||
|
|
||||||
NON_AUTO_MEDIA += usb
|
|
||||||
%usb: $(BIN)/usbdisk.bin %hd
|
|
||||||
cat $^ > $@
|
|
||||||
|
|
||||||
# Add NON_AUTO_MEDIA to the media list, so that they show up in the
|
# Add NON_AUTO_MEDIA to the media list, so that they show up in the
|
||||||
# output of "make"
|
# output of "make"
|
||||||
#
|
#
|
||||||
|
49
src/arch/i386/Makefile.pcbios
Normal file
49
src/arch/i386/Makefile.pcbios
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
# -*- makefile -*- : Force emacs to use Makefile mode
|
||||||
|
|
||||||
|
# The i386 linker script
|
||||||
|
#
|
||||||
|
LDSCRIPT = arch/i386/scripts/i386.lds
|
||||||
|
|
||||||
|
# Stop ld from complaining about our customised linker script
|
||||||
|
#
|
||||||
|
LDFLAGS += -N --no-check-sections
|
||||||
|
|
||||||
|
# Media types.
|
||||||
|
#
|
||||||
|
MEDIA += rom
|
||||||
|
MEDIA += pxe
|
||||||
|
MEDIA += kpxe
|
||||||
|
MEDIA += elf
|
||||||
|
MEDIA += elfd
|
||||||
|
MEDIA += lmelf
|
||||||
|
MEDIA += lmelfd
|
||||||
|
MEDIA += lkrn
|
||||||
|
MEDIA += bImage
|
||||||
|
MEDIA += dsk
|
||||||
|
MEDIA += nbi
|
||||||
|
MEDIA += hd
|
||||||
|
MEDIA += raw
|
||||||
|
MEDIA += com
|
||||||
|
MEDIA += exe
|
||||||
|
|
||||||
|
# rule to make a non-emulation ISO boot image
|
||||||
|
NON_AUTO_MEDIA += iso
|
||||||
|
%iso: %lkrn util/geniso
|
||||||
|
ISOLINUX_BIN=$(ISOLINUX_BIN) bash util/geniso $@ $<
|
||||||
|
|
||||||
|
# rule to make a floppy emulation ISO boot image
|
||||||
|
NON_AUTO_MEDIA += liso
|
||||||
|
%liso: %lkrn util/genliso
|
||||||
|
bash util/genliso $@ $<
|
||||||
|
|
||||||
|
# Special target for building Master Boot Record binary
|
||||||
|
$(BIN)/mbr.bin : $(BIN)/mbr.o
|
||||||
|
$(OBJCOPY) -O binary $< $@
|
||||||
|
|
||||||
|
# rule to make a USB disk image
|
||||||
|
$(BIN)/usbdisk.bin : $(BIN)/usbdisk.o
|
||||||
|
$(OBJCOPY) -O binary $< $@
|
||||||
|
|
||||||
|
NON_AUTO_MEDIA += usb
|
||||||
|
%usb: $(BIN)/usbdisk.bin %hd
|
||||||
|
cat $^ > $@
|
Reference in New Issue
Block a user