|
@@ -35,10 +35,6 @@ CFLAGS += -mrtd
|
35
|
35
|
#
|
36
|
36
|
CFLAGS += -freg-struct-return
|
37
|
37
|
|
38
|
|
-# Stop ld from complaining about our customised linker script
|
39
|
|
-#
|
40
|
|
-LDFLAGS += -N --no-check-sections
|
41
|
|
-
|
42
|
38
|
# Force 32-bit code even on an x86-64 machine
|
43
|
39
|
#
|
44
|
40
|
CFLAGS += -m32
|
|
@@ -78,68 +74,29 @@ NON_AUTO_SRCS += arch/i386/core/wince_loader.c
|
78
|
74
|
|
79
|
75
|
# unnrv2b.S is used to generate a 16-bit as well as a 32-bit object.
|
80
|
76
|
#
|
81
|
|
-OBJS_unnrv2b = unnrv2b unnrv2b16
|
82
|
|
-CFLAGS_unnrv2b16 = -DCODE16
|
|
77
|
+OBJS_unnrv2b = unnrv2b unnrv2b16
|
|
78
|
+CFLAGS_unnrv2b16 = -DCODE16
|
83
|
79
|
|
84
|
|
-# The i386 linker script
|
|
80
|
+# Include platform-specific Makefile
|
85
|
81
|
#
|
86
|
|
-LDSCRIPT = arch/i386/scripts/i386.lds
|
87
|
|
-
|
88
|
|
-# Media types.
|
89
|
|
-#
|
90
|
|
-MEDIA += rom
|
91
|
|
-MEDIA += pxe
|
92
|
|
-MEDIA += kpxe
|
93
|
|
-MEDIA += elf
|
94
|
|
-MEDIA += elfd
|
95
|
|
-MEDIA += lmelf
|
96
|
|
-MEDIA += lmelfd
|
97
|
|
-MEDIA += lkrn
|
98
|
|
-MEDIA += bImage
|
99
|
|
-MEDIA += dsk
|
100
|
|
-MEDIA += nbi
|
101
|
|
-MEDIA += hd
|
102
|
|
-MEDIA += raw
|
103
|
|
-MEDIA += com
|
104
|
|
-MEDIA += exe
|
105
|
|
-
|
106
|
|
-# Special target for building Master Boot Record binary
|
107
|
|
-$(BIN)/mbr.bin : $(BIN)/mbr.o
|
108
|
|
- $(OBJCOPY) -O binary $< $@
|
|
82
|
+MAKEDEPS += arch/i386/Makefile.$(PLATFORM)
|
|
83
|
+include arch/i386/Makefile.$(PLATFORM)
|
109
|
84
|
|
110
|
85
|
# Some suffixes (e.g. %.fd0) are generated directly from other
|
111
|
86
|
# finished files (e.g. %.dsk), rather than having their own prefix.
|
112
|
87
|
|
113
|
88
|
# rule to write disk images to /dev/fd0
|
114
|
|
-NON_AUTO_MEDIA += fd0
|
|
89
|
+NON_AUTO_MEDIA += fd0
|
115
|
90
|
%fd0 : %dsk
|
116
|
91
|
dd if=$< bs=512 conv=sync of=/dev/fd0
|
117
|
92
|
sync
|
118
|
93
|
|
119
|
94
|
# rule to create padded disk images
|
120
|
|
-NON_AUTO_MEDIA += pdsk
|
|
95
|
+NON_AUTO_MEDIA += pdsk
|
121
|
96
|
%pdsk : %dsk
|
122
|
97
|
cp $< $@
|
123
|
98
|
$(PERL) ./util/dskpad.pl $@
|
124
|
99
|
|
125
|
|
-# rule to make a non-emulation ISO boot image
|
126
|
|
-NON_AUTO_MEDIA += iso
|
127
|
|
-%iso: %lkrn util/geniso
|
128
|
|
- ISOLINUX_BIN=$(ISOLINUX_BIN) bash util/geniso $@ $<
|
129
|
|
-
|
130
|
|
-# rule to make a floppy emulation ISO boot image
|
131
|
|
-NON_AUTO_MEDIA += liso
|
132
|
|
-%liso: %lkrn util/genliso
|
133
|
|
- bash util/genliso $@ $<
|
134
|
|
-
|
135
|
|
-# rule to make a USB disk image
|
136
|
|
-$(BIN)/usbdisk.bin : $(BIN)/usbdisk.o
|
137
|
|
- $(OBJCOPY) -O binary $< $@
|
138
|
|
-
|
139
|
|
-NON_AUTO_MEDIA += usb
|
140
|
|
-%usb: $(BIN)/usbdisk.bin %hd
|
141
|
|
- cat $^ > $@
|
142
|
|
-
|
143
|
100
|
# Add NON_AUTO_MEDIA to the media list, so that they show up in the
|
144
|
101
|
# output of "make"
|
145
|
102
|
#
|