1 # Locations of utilities
3 ISOLINUX_BIN = /usr/lib/syslinux/isolinux.bin
5 # i386-specific directories containing source files
7 SRCDIRS += arch/i386/core arch/i386/transitions arch/i386/prefix
8 SRCDIRS += arch/i386/firmware/pcbios
9 SRCDIRS += arch/i386/image
10 SRCDIRS += arch/i386/drivers
11 SRCDIRS += arch/i386/drivers/net
12 SRCDIRS += arch/i386/interface/pcbios
13 SRCDIRS += arch/i386/interface/pxe
15 # The various xxx_loader.c files are #included into core/loader.c and
16 # should not be compiled directly.
18 NON_AUTO_SRCS += arch/i386/core/aout_loader.c
19 NON_AUTO_SRCS += arch/i386/core/freebsd_loader.c
20 NON_AUTO_SRCS += arch/i386/core/wince_loader.c
22 # unnrv2b.S is used to generate a 16-bit as well as a 32-bit object.
24 OBJS_unnrv2b = unnrv2b unnrv2b16
25 CFLAGS_unnrv2b16 = -DCODE16
27 # We need to undefine the default macro "i386" when compiling .S
28 # files, otherwise ".arch i386" translates to ".arch 1"...
32 # The i386 linker script
34 LDSCRIPT = arch/i386/scripts/i386.lds
54 # Special target for building Master Boot Record binary
55 $(BIN)/mbr.bin : $(BIN)/mbr.o
56 $(OBJCOPY) -O binary $< $@
58 # Some suffixes (e.g. %.fd0) are generated directly from other
59 # finished files (e.g. %.dsk), rather than having their own prefix.
61 # rule to write disk images to /dev/fd0
64 dd if=$< bs=512 conv=sync of=/dev/fd0
67 # rule to create padded disk images
68 NON_AUTO_MEDIA += pdsk
71 $(PERL) ./util/dskpad.pl $@
73 # rule to make a non-emulation ISO boot image
75 %iso: %lkrn util/geniso
76 ISOLINUX_BIN=$(ISOLINUX_BIN) bash util/geniso $@ $<
78 # rule to make a floppy emulation ISO boot image
79 NON_AUTO_MEDIA += liso
80 %liso: %lkrn util/genliso
81 bash util/genliso $@ $<
83 # rule to make a USB disk image
84 $(BIN)/usbdisk.bin : $(BIN)/usbdisk.o
85 $(OBJCOPY) -O binary $< $@
88 %usb: $(BIN)/usbdisk.bin %hd
91 # Add NON_AUTO_MEDIA to the media list, so that they show up in the
94 MEDIA += $(NON_AUTO_MEDIA)
96 # Shortcut to allow typing just
99 # make -f arch/i386/kir-Makefile bin-kir/%
100 # for building a KEEP_IT_REAL flavour.
102 $(BIN)-kir/% : kir-target
103 $(MAKE) -f arch/i386/kir-Makefile $(MAKECMDGOALS)