2007-01-14 11:52:22 +00:00
|
|
|
# Locations of utilities
|
|
|
|
#
|
|
|
|
ISOLINUX_BIN = /usr/lib/syslinux/isolinux.bin
|
|
|
|
|
2005-04-08 15:01:17 +00:00
|
|
|
# i386-specific directories containing source files
|
|
|
|
#
|
|
|
|
SRCDIRS += arch/i386/core arch/i386/transitions arch/i386/prefix
|
2005-05-18 11:11:57 +00:00
|
|
|
SRCDIRS += arch/i386/firmware/pcbios
|
2005-05-17 13:34:25 +00:00
|
|
|
SRCDIRS += arch/i386/image
|
2005-04-25 19:29:02 +00:00
|
|
|
SRCDIRS += arch/i386/drivers/bus
|
|
|
|
SRCDIRS += arch/i386/drivers/net
|
|
|
|
SRCDIRS += arch/i386/drivers/disk
|
2006-05-13 11:35:29 +00:00
|
|
|
SRCDIRS += arch/i386/interface/pcbios
|
2006-08-02 23:08:10 +00:00
|
|
|
SRCDIRS += arch/i386/interface/pxe
|
2005-04-08 15:01:17 +00:00
|
|
|
|
|
|
|
# The various xxx_loader.c files are #included into core/loader.c and
|
|
|
|
# should not be compiled directly.
|
|
|
|
#
|
|
|
|
NON_AUTO_SRCS += arch/i386/core/aout_loader.c
|
|
|
|
NON_AUTO_SRCS += arch/i386/core/freebsd_loader.c
|
|
|
|
NON_AUTO_SRCS += arch/i386/core/wince_loader.c
|
|
|
|
|
2007-01-14 11:52:22 +00:00
|
|
|
# unnrv2b.S is used to generate a 16-bit as well as a 32-bit object.
|
2005-04-08 15:01:17 +00:00
|
|
|
#
|
|
|
|
OBJS_unnrv2b = unnrv2b unnrv2b16
|
|
|
|
CFLAGS_unnrv2b16 = -DCODE16
|
|
|
|
|
|
|
|
# We need to undefine the default macro "i386" when compiling .S
|
|
|
|
# files, otherwise ".arch i386" translates to ".arch 1"...
|
|
|
|
#
|
|
|
|
CFLAGS_S += -Ui386
|
|
|
|
|
|
|
|
# The i386 linker script
|
|
|
|
#
|
|
|
|
LDSCRIPT = arch/i386/scripts/i386.lds
|
|
|
|
|
|
|
|
# Media types.
|
|
|
|
#
|
|
|
|
# It's ugly that we have to define these repetitive combinations by
|
|
|
|
# hand. Unforunately, $(eval ...) is available only in make >= 3.80,
|
|
|
|
# and using an external Makefile fragment doesn't work because
|
|
|
|
# OBJS_xxx need to be defined *before* the external Makefile fragments
|
|
|
|
# for the source files are generated...
|
|
|
|
|
|
|
|
CFLAGS_ZPREFIX = -DCOMPRESS
|
|
|
|
|
|
|
|
MEDIA += rom
|
2006-06-06 15:41:21 +00:00
|
|
|
OBJS_romprefix = romprefix zromprefix
|
|
|
|
CFLAGS_zromprefix = $(CFLAGS_ZPREFIX)
|
2005-04-08 15:01:17 +00:00
|
|
|
|
|
|
|
MEDIA += pxe
|
|
|
|
OBJS_pxeprefix = pxeprefix zpxeprefix
|
|
|
|
CFLAGS_zpxeprefix = $(CFLAGS_ZPREFIX)
|
|
|
|
|
|
|
|
MEDIA += elf
|
|
|
|
OBJS_elfprefix = elfprefix zelfprefix
|
|
|
|
CFLAGS_zelfprefix = $(CFLAGS_ZPREFIX)
|
|
|
|
|
|
|
|
MEDIA += elfd
|
|
|
|
OBJS_elfdprefix = elfdprefix zelfdprefix
|
|
|
|
CFLAGS_zelfdprefix = $(CFLAGS_ZPREFIX)
|
|
|
|
|
|
|
|
MEDIA += lmelf
|
|
|
|
OBJS_lmelfprefix = lmelfprefix zlmelfprefix
|
|
|
|
CFLAGS_zlmelfprefix = $(CFLAGS_ZPREFIX)
|
|
|
|
|
|
|
|
MEDIA += lmelfd
|
|
|
|
OBJS_lmelfdprefix = lmelfdprefix zlmelfdprefix
|
|
|
|
CFLAGS_zlmelfdprefix = $(CFLAGS_ZPREFIX)
|
|
|
|
|
|
|
|
MEDIA += lilo
|
|
|
|
OBJS_liloprefix = liloprefix zliloprefix
|
|
|
|
CFLAGS_zliloprefix = $(CFLAGS_ZPREFIX)
|
|
|
|
|
|
|
|
MEDIA += bImage
|
|
|
|
OBJS_bImageprefix = bImageprefix zbImageprefix
|
|
|
|
CFLAGS_zbImageprefix = $(CFLAGS_ZPREFIX)
|
|
|
|
|
|
|
|
MEDIA += dsk
|
|
|
|
OBJS_dskprefix = dskprefix zdskprefix
|
|
|
|
CFLAGS_zdskprefix = $(CFLAGS_ZPREFIX)
|
|
|
|
|
2007-03-11 00:57:26 +00:00
|
|
|
MEDIA += nbi
|
|
|
|
OBJS_nbiprefix = nbiprefix znbiprefix
|
|
|
|
CFLAGS_znbiprefix = $(CFLAGS_ZPREFIX)
|
|
|
|
|
2006-03-16 17:59:51 +00:00
|
|
|
MEDIA += hd
|
|
|
|
OBJS_hdprefix = hdprefix zhdprefix
|
|
|
|
CFLAGS_zhdprefix = $(CFLAGS_ZPREFIX)
|
|
|
|
|
2005-04-08 15:01:17 +00:00
|
|
|
MEDIA += raw
|
|
|
|
OBJS_rawprefix = rawprefix zrawprefix
|
|
|
|
CFLAGS_zrawprefix = $(CFLAGS_ZPREFIX)
|
|
|
|
|
|
|
|
# These media cannot handle compressed payloads
|
|
|
|
|
|
|
|
MEDIA += com
|
|
|
|
|
|
|
|
MEDIA += exe
|
|
|
|
|
2007-07-05 13:15:43 +00:00
|
|
|
# Special target for building Master Boot Record binary
|
|
|
|
$(BIN)/mbr.bin : $(BIN)/mbr.o
|
|
|
|
$(OBJCOPY) -O binary $< $@
|
|
|
|
|
2005-04-08 15:01:17 +00:00
|
|
|
# Some suffixes (e.g. %.zfd0) are generated directly from other
|
|
|
|
# finished files (e.g. %.zdsk), rather than having their own prefix.
|
|
|
|
|
|
|
|
# rule to write disk images to /dev/fd0
|
|
|
|
NON_AUTO_MEDIA += fd0
|
|
|
|
%fd0 : %dsk
|
2005-03-08 18:53:11 +00:00
|
|
|
dd if=$< bs=512 conv=sync of=/dev/fd0
|
|
|
|
sync
|
|
|
|
|
2007-07-05 22:37:17 +00:00
|
|
|
# rule to create padded disk images
|
|
|
|
NON_AUTO_MEDIA += pdsk
|
|
|
|
%pdsk : %dsk
|
|
|
|
cp $< $@
|
|
|
|
$(PERL) ./util/dskpad.pl $@
|
|
|
|
|
2005-03-08 18:53:11 +00:00
|
|
|
# rule to make a non-emulation ISO boot image
|
2005-04-08 15:01:17 +00:00
|
|
|
NON_AUTO_MEDIA += iso
|
|
|
|
%iso: %lilo util/geniso
|
|
|
|
ISOLINUX_BIN=$(ISOLINUX_BIN) bash util/geniso $@ $<
|
2005-03-08 18:53:11 +00:00
|
|
|
|
|
|
|
# rule to make a floppy emulation ISO boot image
|
2005-04-08 15:01:17 +00:00
|
|
|
NON_AUTO_MEDIA += liso
|
|
|
|
%liso: %lilo util/genliso
|
|
|
|
bash util/genliso $@ $<
|
|
|
|
|
2007-07-05 13:15:43 +00:00
|
|
|
# rule to make a USB disk image
|
|
|
|
$(BIN)/usbdisk.bin : $(BIN)/usbdisk.o
|
|
|
|
$(OBJCOPY) -O binary $< $@
|
|
|
|
|
2007-07-05 22:37:17 +00:00
|
|
|
NON_AUTO_MEDIA += usb
|
2007-07-05 13:15:43 +00:00
|
|
|
%usb: $(BIN)/usbdisk.bin %hd
|
|
|
|
cat $^ > $@
|
|
|
|
|
2005-04-08 15:01:17 +00:00
|
|
|
# Add NON_AUTO_MEDIA to the media list, so that they show up in the
|
|
|
|
# output of "make"
|
|
|
|
#
|
|
|
|
MEDIA += $(NON_AUTO_MEDIA)
|
|
|
|
|
|
|
|
# Shortcut to allow typing just
|
|
|
|
# make bin-kir/%
|
|
|
|
# rather than
|
|
|
|
# make -f arch/i386/kir-Makefile bin-kir/%
|
|
|
|
# for building a KEEP_IT_REAL flavour.
|
|
|
|
#
|
|
|
|
$(BIN)-kir/% : kir-target
|
|
|
|
$(MAKE) -f arch/i386/kir-Makefile $(MAKECMDGOALS)
|
|
|
|
|
|
|
|
.PHONY : kir-target
|