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/bus
11 SRCDIRS += arch/i386/drivers/net
12 SRCDIRS += arch/i386/drivers/disk
13 SRCDIRS += arch/i386/interface/pcbios
14 SRCDIRS += arch/i386/interface/pxe
16 # The various xxx_loader.c files are #included into core/loader.c and
17 # should not be compiled directly.
19 NON_AUTO_SRCS += arch/i386/core/aout_loader.c
20 NON_AUTO_SRCS += arch/i386/core/freebsd_loader.c
21 NON_AUTO_SRCS += arch/i386/core/wince_loader.c
23 # unnrv2b.S is used to generate a 16-bit as well as a 32-bit object.
25 OBJS_unnrv2b = unnrv2b unnrv2b16
26 CFLAGS_unnrv2b16 = -DCODE16
28 # We need to undefine the default macro "i386" when compiling .S
29 # files, otherwise ".arch i386" translates to ".arch 1"...
33 # The i386 linker script
35 LDSCRIPT = arch/i386/scripts/i386.lds
55 # Special target for building Master Boot Record binary
56 $(BIN)/mbr.bin : $(BIN)/mbr.o
57 $(OBJCOPY) -O binary $< $@
59 # Some suffixes (e.g. %.fd0) are generated directly from other
60 # finished files (e.g. %.dsk), rather than having their own prefix.
62 # rule to write disk images to /dev/fd0
65 dd if=$< bs=512 conv=sync of=/dev/fd0
68 # rule to create padded disk images
69 NON_AUTO_MEDIA += pdsk
72 $(PERL) ./util/dskpad.pl $@
74 # rule to make a non-emulation ISO boot image
76 %iso: %lkrn util/geniso
77 ISOLINUX_BIN=$(ISOLINUX_BIN) bash util/geniso $@ $<
79 # rule to make a floppy emulation ISO boot image
80 NON_AUTO_MEDIA += liso
81 %liso: %lkrn util/genliso
82 bash util/genliso $@ $<
84 # rule to make a USB disk image
85 $(BIN)/usbdisk.bin : $(BIN)/usbdisk.o
86 $(OBJCOPY) -O binary $< $@
89 %usb: $(BIN)/usbdisk.bin %hd
92 # Add NON_AUTO_MEDIA to the media list, so that they show up in the
95 MEDIA += $(NON_AUTO_MEDIA)
97 # Shortcut to allow typing just
100 # make -f arch/i386/kir-Makefile bin-kir/%
101 # for building a KEEP_IT_REAL flavour.
103 $(BIN)-kir/% : kir-target
104 $(MAKE) -f arch/i386/kir-Makefile $(MAKECMDGOALS)