1 | ARCH_FORMAT= elf32-i386
|
---|
2 |
|
---|
3 | # For debugging, don't delete intermediates
|
---|
4 | #.SECONDARY:
|
---|
5 |
|
---|
6 | LDSCRIPT= arch/i386/core/etherboot.lds
|
---|
7 | PLDSCRIPT= arch/i386/core/etherboot.prefix.lds
|
---|
8 |
|
---|
9 | LCONFIG+= -Ui386
|
---|
10 |
|
---|
11 | ROMLIMIT= 524288
|
---|
12 | CHECKSIZE= { read d1; read d1 d2 d3 size d4; [ $$size -gt $(ROMLIMIT) ] &&\
|
---|
13 | { $(RM) $@; echo "ERROR: code size exceeds limit!"; exit 1; }; exit 0; }
|
---|
14 |
|
---|
15 | START= $(BIN)/start32.o $(BIN)/linuxbios.o \
|
---|
16 | $(BIN)/bios.o $(BIN)/console.o $(BIN)/memsizes.o $(BIN)/basemem.o \
|
---|
17 | $(BIN)/hidemem.o $(BIN)/e820mangler.o \
|
---|
18 | $(BIN)/realmode.o $(BIN)/realmode_asm.o \
|
---|
19 | $(BIN)/callbacks.o $(BIN)/pxe_callbacks.o
|
---|
20 |
|
---|
21 | SRCS+= arch/i386/prefix/hdprefix.S
|
---|
22 | SRCS+= arch/i386/prefix/floppyprefix.S
|
---|
23 | SRCS+= arch/i386/prefix/unhuf.S
|
---|
24 | SRCS+= arch/i386/prefix/unnrv2b.S
|
---|
25 | SRCS+= arch/i386/firmware/pcbios/bios.c
|
---|
26 | SRCS+= arch/i386/firmware/pcbios/console.c
|
---|
27 | SRCS+= arch/i386/firmware/pcbios/memsizes.c
|
---|
28 | SRCS+= arch/i386/firmware/pcbios/basemem.c
|
---|
29 | SRCS+= arch/i386/firmware/pcbios/hidemem.c
|
---|
30 | SRCS+= arch/i386/firmware/pcbios/e820mangler.S
|
---|
31 | SRCS+= arch/i386/prefix/liloprefix.S
|
---|
32 | SRCS+= arch/i386/prefix/elfprefix.S
|
---|
33 | SRCS+= arch/i386/prefix/lmelf_prefix.S
|
---|
34 | SRCS+= arch/i386/prefix/elf_dprefix.S
|
---|
35 | SRCS+= arch/i386/prefix/lmelf_dprefix.S
|
---|
36 | SRCS+= arch/i386/prefix/comprefix.S
|
---|
37 | SRCS+= arch/i386/prefix/exeprefix.S
|
---|
38 | SRCS+= arch/i386/prefix/pxeprefix.S
|
---|
39 | SRCS+= arch/i386/prefix/romprefix.S
|
---|
40 |
|
---|
41 | SRCS+= arch/i386/core/init.S
|
---|
42 | SRCS+= arch/i386/core/start32.S
|
---|
43 | SRCS+= arch/i386/core/pci_io.c
|
---|
44 | SRCS+= arch/i386/core/i386_timer.c
|
---|
45 | SRCS+= arch/i386/core/elf.c
|
---|
46 | SRCS+= arch/i386/core/cpu.c
|
---|
47 | SRCS+= arch/i386/core/video_subr.c
|
---|
48 | SRCS+= arch/i386/core/pic8259.c
|
---|
49 | SRCS+= arch/i386/core/hooks.c
|
---|
50 | SRCS+= arch/i386/core/callbacks.c
|
---|
51 | SRCS+= arch/i386/core/realmode.c
|
---|
52 | SRCS+= arch/i386/core/realmode_asm.S
|
---|
53 | SRCS+= arch/i386/core/pxe_callbacks.c
|
---|
54 |
|
---|
55 | # ROM loaders: ISA and PCI versions
|
---|
56 | ISAPREFIX= $(BIN)/isaprefix.o
|
---|
57 | ISAENTRY= $(BIN)/isaprefix.entry.o
|
---|
58 | ISAEXIT= $(BIN)/isaprefix.exit.o
|
---|
59 | PCIPREFIX= $(BIN)/pciprefix.o
|
---|
60 | PCIENTRY= $(BIN)/pciprefix.entry.o
|
---|
61 | PCIEXIT= $(BIN)/pciprefix.exit.o
|
---|
62 | # Variables xxx_ROMTYPE are defined by genrules.pl. ROMENTRY and
|
---|
63 | # ROMEXIT will evaluate to give the correct objects to use.
|
---|
64 | TARGETBASE=$(basename $(notdir $@))
|
---|
65 | ROMCARD=$(firstword $(subst --, ,$(TARGETBASE)))
|
---|
66 | ROMTYPE=$(firstword $(ROMTYPE_$(ROMCARD)) ISA)
|
---|
67 | romENTRY=$($(ROMTYPE)ENTRY)
|
---|
68 | romEXIT=$($(ROMTYPE)EXIT)
|
---|
69 |
|
---|
70 | # Target type for generic prf rules
|
---|
71 | TARGETTYPE=$(patsubst .%,%, $(suffix $(basename $@)))
|
---|
72 | TARGETENTRY=$($(TARGETTYPE)ENTRY)
|
---|
73 | TARGETEXIT=$($(TARGETTYPE)EXIT)
|
---|
74 |
|
---|
75 | # Other real-mode entry loaders
|
---|
76 | hdPREFIX= $(BIN)/hdprefix.o
|
---|
77 | hdENTRY= $(BIN)/hdprefix.entry.o
|
---|
78 | hdEXIT= $(BIN)/hdprefix.exit.o
|
---|
79 | dskPREFIX= $(BIN)/floppyprefix.o
|
---|
80 | dskENTRY= $(BIN)/floppyprefix.entry.o
|
---|
81 | dskEXIT= $(BIN)/floppyprefix.exit.o
|
---|
82 | comPREFIX= $(BIN)/comprefix.o
|
---|
83 | comENTRY= $(BIN)/comprefix.entry.o
|
---|
84 | comEXIT= $(BIN)/comprefix.exit.o
|
---|
85 | exePREFIX= $(BIN)/exeprefix.o
|
---|
86 | exeENTRY= $(BIN)/exeprefix.entry.o
|
---|
87 | exeEXIT= $(BIN)/exeprefix.exit.o
|
---|
88 | liloPREFIX= $(BIN)/liloprefix.o
|
---|
89 | liloENTRY= $(BIN)/liloprefix.entry.o
|
---|
90 | liloEXIT= $(BIN)/liloprefix.exit.o
|
---|
91 | bImagePREFIX= $(BIN)/bImageprefix.o
|
---|
92 | bImageENTRY= $(BIN)/bImageprefix.entry.o
|
---|
93 | bImageEXIT= $(BIN)/bImageprefix.exit.o
|
---|
94 | pxePREFIX= $(BIN)/pxeprefix.o
|
---|
95 | pxeENTRY= $(BIN)/pxeprefix.entry.o
|
---|
96 | pxeEXIT= $(BIN)/pxeprefix.exit.o
|
---|
97 | rawPREFIX= $(BIN)/nullprefix.o
|
---|
98 | rawENTRY= $(BIN)/nullprefix.entry.o
|
---|
99 | rawEXIT= $(BIN)/nullprefix.exit.o
|
---|
100 |
|
---|
101 | # Protected mode entry loaders
|
---|
102 | elfPREFIX= $(BIN)/elfprefix.o
|
---|
103 | elfENTRY= $(BIN)/elfprefix.entry.o
|
---|
104 | elfEXIT= $(BIN)/elfprefix.exit.o
|
---|
105 | lmelfPREFIX= $(BIN)/lmelf_prefix.o
|
---|
106 | lmelfENTRY= $(BIN)/lmelf_prefix.entry.o
|
---|
107 | lmelfEXIT= $(BIN)/lmelf_prefix.exit.o
|
---|
108 | elfdPREFIX= $(BIN)/elf_dprefix.o
|
---|
109 | elfdENTRY= $(BIN)/elf_dprefix.entry.o
|
---|
110 | elfdEXIT= $(BIN)/elf_dprefix.exit.o
|
---|
111 | lmelfdPREFIX= $(BIN)/lmelf_dprefix.o
|
---|
112 | lmelfdENTRY= $(BIN)/lmelf_dprefix.entry.o
|
---|
113 | lmelfdEXIT= $(BIN)/lmelf_dprefix.exit.o
|
---|
114 |
|
---|
115 | include $(BIN)/Roms
|
---|
116 |
|
---|
117 | all: $(ROMS)
|
---|
118 | allroms: $(ROMS)
|
---|
119 | allzroms: $(ROMS)
|
---|
120 | alldsks: $(EB_DSKS)
|
---|
121 | allzdsks: $(EB_ZDSKS)
|
---|
122 | allhds: $(EB_HDS)
|
---|
123 | allzhds: $(EB_ZHDS)
|
---|
124 | alllilos: $(EB_LILOS)
|
---|
125 | allzlilos: $(EB_ZLILOS)
|
---|
126 | allbImages: $(EB_BIMAGES)
|
---|
127 | allbzImages: $(EB_BZIMAGES)
|
---|
128 | allpxes: $(EB_PXES)
|
---|
129 | allzpxes: $(EB_ZPXES)
|
---|
130 | allelfs: $(EB_ELFS)
|
---|
131 | allzelfs: $(EB_ZELFS)
|
---|
132 | alllmelfs: $(EB_LMELFS)
|
---|
133 | allzlmelfs: $(EB_ZLMELFS)
|
---|
134 | allelfds: $(EB_ELFDS)
|
---|
135 | allzelfds: $(EB_ZELFDS)
|
---|
136 | alllmelfds: $(EB_LMELFDS)
|
---|
137 | allzlmelfds: $(EB_ZLMELFDS)
|
---|
138 | allcoms: $(EB_COMS)
|
---|
139 | allexes: $(EB_EXES)
|
---|
140 | allisos: $(EB_ISOS)
|
---|
141 | alllisos: $(EB_LISOS)
|
---|
142 |
|
---|
143 | BOBJS+= $(BIN)/pci_io.o $(BIN)/i386_timer.o
|
---|
144 | BOBJS+= $(BIN)/elf.o $(BIN)/cpu.o $(BIN)/video_subr.o
|
---|
145 | BOBJS+= $(BIN)/pic8259.o $(BIN)/hooks.o
|
---|
146 |
|
---|
147 | # ROM loaders
|
---|
148 |
|
---|
149 | $(ISAPREFIX): arch/i386/prefix/romprefix.S $(MAKEDEPS)
|
---|
150 | $(CPP) $(CFLAGS) $(LCONFIG) -Ui386 -D ASSEMBLY $< \
|
---|
151 | | $(AS) $(ASFLAGS) -o $@
|
---|
152 |
|
---|
153 | $(PCIPREFIX): arch/i386/prefix/romprefix.S $(MAKEDEPS)
|
---|
154 | $(CPP) -DPCI_PNP_HEADER $(CFLAGS) $(LCONFIG) -Ui386 -D ASSEMBLY $< \
|
---|
155 | | $(AS) $(ASFLAGS) -o $@
|
---|
156 |
|
---|
157 | # Prefix splitters
|
---|
158 | $(BIN)/%prefix.entry.o: $(BIN)/%prefix.o $(MAKEDEPS)
|
---|
159 | $(OBJCOPY) -R .text16 $< $@
|
---|
160 |
|
---|
161 | $(BIN)/%prefix.exit.o: $(BIN)/%prefix.o $(MAKEDEPS)
|
---|
162 | $(OBJCOPY) -R .prefix $< $@
|
---|
163 |
|
---|
164 | # Generic prefix objects
|
---|
165 | PREFIXOBJS = $(BIN)/init.o
|
---|
166 | ZPREFIXOBJS = $(BIN)/init.o $(BIN)/unnrv2b.o
|
---|
167 |
|
---|
168 | # Utilities
|
---|
169 | $(BIN)/nrv2b: util/nrv2b.c
|
---|
170 | $(HOST_CC) -O2 -DENCODE -DDECODE -DMAIN -DVERBOSE -DNDEBUG -DBITSIZE=32 -DENDIAN=0 -o $@ $<
|
---|
171 |
|
---|
172 | ZFILELEN = perl util/zfilelen.pl
|
---|
173 |
|
---|
174 | # Pattern Rules
|
---|
175 |
|
---|
176 | # General for compiling/assembly source files
|
---|
177 |
|
---|
178 | $(BIN)/%.o: arch/i386/core/%.c $(MAKEDEPS)
|
---|
179 | $(CC) $(CFLAGS) -o $@ -c $<
|
---|
180 |
|
---|
181 | $(BIN)/%.o: arch/i386/core/%.S $(MAKEDEPS)
|
---|
182 | $(CPP) $(CFLAGS) -Ui386 -D ASSEMBLY $< | $(AS) $(ASFLAGS) -o $@
|
---|
183 |
|
---|
184 | $(BIN)/%.o: arch/i386/firmware/pcbios/%.c $(MAKEDEPS)
|
---|
185 | $(CC) $(CFLAGS) -o $@ -c $<
|
---|
186 |
|
---|
187 | $(BIN)/%.o: arch/i386/firmware/pcbios/%.S $(MAKEDEPS)
|
---|
188 | $(CPP) $(CFLAGS) -Ui386 -D ASSEMBLY $< | $(AS) $(ASFLAGS) -o $@
|
---|
189 |
|
---|
190 | $(BIN)/%.o: arch/i386/prefix/%.S $(MAKEDEPS)
|
---|
191 | $(CPP) $(CFLAGS) -Ui386 -D ASSEMBLY $< | $(AS) $(ASFLAGS) -o $@
|
---|
192 |
|
---|
193 | # general rule for 16bit .o, may be overridden
|
---|
194 | $(BIN)/%.o: $(BIN)/%.s
|
---|
195 | $(AS) $(ASFLAGS) -o $@ $<
|
---|
196 |
|
---|
197 | # general rule for .bin (plain binary loader code), may be overridden
|
---|
198 | $(BIN)/%.bin: $(BIN)/%.o
|
---|
199 | $(OBJCOPY) -O binary $< $@
|
---|
200 |
|
---|
201 | # general rule for .z (compressed binary code), may be overridden
|
---|
202 | # rule for .z is in top level Makefile
|
---|
203 | # Give the directory name, e.g. use $(BIN)/rtl8139.com as the target.
|
---|
204 |
|
---|
205 | $(BIN)/%.zo: $(BIN)/%.zbin arch/i386/core/prefixzdata.lds $(MAKEDEPS)
|
---|
206 | $(LD) -T arch/i386/core/prefixzdata.lds -b binary $< -o $@
|
---|
207 |
|
---|
208 | $(BIN)/%.uo: $(BIN)/%.bin arch/i386/core/prefixudata.lds $(MAKEDEPS)
|
---|
209 | $(LD) -T arch/i386/core/prefixudata.lds -b binary $< -o $@
|
---|
210 |
|
---|
211 | # Intermediate prf rules
|
---|
212 |
|
---|
213 | %.prf: %.rt $(PREFIXOBJS) %.rt1.uo %.rt2.uo $(MAKEDEPS)
|
---|
214 | $(MAKE) $(TARGETENTRY)
|
---|
215 | $(LD) $(LDFLAGS) -T $(PLDSCRIPT) $(TARGETENTRY) -R $(subst $(MAKEDEPS),,$^) -o $@
|
---|
216 |
|
---|
217 | %.zprf: %.rt $(ZPREFIXOBJS) %.rt1.uo %.rt2.zo $(MAKEDEPS)
|
---|
218 | $(MAKE) $(TARGETENTRY)
|
---|
219 | $(LD) $(LDFLAGS) -T $(PLDSCRIPT) $(TARGETENTRY) -R $(subst $(MAKEDEPS),,$^) -o $@
|
---|
220 |
|
---|
221 | # general rules for normal/compressed ROM images, may be overridden
|
---|
222 | SUFFIXES += rom zrom
|
---|
223 |
|
---|
224 | $(BIN)/%.rom.rt: $(BIN)/%.rt.o $(ISAENTRY) $(PCIENTRY) $(ISAEXIT) $(PCIEXIT) $(LDSCRIPT) $(MAKEDEPS)
|
---|
225 | $(LD) $(LDFLAGS) -T $(LDSCRIPT) -o $@ $(romEXIT) $<
|
---|
226 | @$(SIZE) $@ | $(CHECKSIZE)
|
---|
227 |
|
---|
228 | $(BIN)/%.rom: $(BIN)/%.rom.prf
|
---|
229 | $(OBJCOPY) -O binary $< $@
|
---|
230 | $(MAKEROM) $(MAKEROM_FLAGS) $(MAKEROM_$(ROMCARD)) $(MAKEROM_ID_$(ROMCARD)) -i$(IDENT) $@
|
---|
231 |
|
---|
232 | $(BIN)/%.zrom: $(BIN)/%.rom.zprf
|
---|
233 | $(OBJCOPY) -O binary $< $@
|
---|
234 | $(MAKEROM) $(MAKEROM_FLAGS) $(MAKEROM_$(ROMCARD)) $(MAKEROM_ID_$(ROMCARD)) -i$(IDENT) $@
|
---|
235 |
|
---|
236 | # general rules for ELF images
|
---|
237 | SUFFIXES += elf zelf
|
---|
238 | $(BIN)/%.elf.rt: $(BIN)/%.rt.o $(elfENTRY) $(elfEXIT) $(LDSCRIPT) $(MAKEDEPS)
|
---|
239 | $(LD) $(LDFLAGS) -T $(LDSCRIPT) -o $@ $(elfEXIT) $<
|
---|
240 |
|
---|
241 | $(BIN)/%.elf: $(BIN)/%.elf.prf
|
---|
242 | $(OBJCOPY) -O binary $< $@
|
---|
243 |
|
---|
244 | $(BIN)/%.zelf: $(BIN)/%.elf.zprf
|
---|
245 | $(OBJCOPY) -O binary $< $@
|
---|
246 |
|
---|
247 | # general rules for Long Mode ELF images
|
---|
248 | SUFFIXES += lmelf zlmelf
|
---|
249 | $(BIN)/%.lmelf.rt: $(BIN)/%.rt.o $(lmelfENTRY) $(lmelfEXIT) $(LDSCRIPT) $(MAKEDEPS)
|
---|
250 | $(LD) $(LDFLAGS) -T $(LDSCRIPT) -o $@ $(lmelfEXIT) $<
|
---|
251 |
|
---|
252 | $(BIN)/%.lmelf: $(BIN)/%.lmelf.prf
|
---|
253 | $(OBJCOPY) -O binary $< $@
|
---|
254 |
|
---|
255 | $(BIN)/%.zlmelf: $(BIN)/%.lmelf.zprf
|
---|
256 | $(OBJCOPY) -O binary $< $@
|
---|
257 |
|
---|
258 | # general rules for ELF dynamic images
|
---|
259 | SUFFIXES += elfd zelfd
|
---|
260 | $(BIN)/%.elfd.rt: $(BIN)/%.rt.o $(elfdENTRY) $(elfdEXIT) $(LDSCRIPT) $(MAKEDEPS)
|
---|
261 | $(LD) $(LDFLAGS) -T $(LDSCRIPT) -o $@ $(elfdEXIT) $<
|
---|
262 |
|
---|
263 | $(BIN)/%.elfd: $(BIN)/%.elfd.prf
|
---|
264 | $(OBJCOPY) -O binary $< $@
|
---|
265 |
|
---|
266 | $(BIN)/%.zelfd: $(BIN)/%.elfd.zprf
|
---|
267 | $(OBJCOPY) -O binary $< $@
|
---|
268 |
|
---|
269 | # general rules for Long Mode ELF dynamic images
|
---|
270 | SUFFIXES += lmelfd zlmelfd
|
---|
271 | $(BIN)/%.lmelfd.rt: $(BIN)/%.rt.o $(lmelfdENTRY) $(lmelfdEXIT) $(LDSCRIPT) $(MAKEDEPS)
|
---|
272 | $(LD) $(LDFLAGS) -T $(LDSCRIPT) -o $@ $(lmelfdEXIT) $<
|
---|
273 |
|
---|
274 | $(BIN)/%.lmelfd: $(BIN)/%.lmelfd.prf
|
---|
275 | $(OBJCOPY) -O binary $< $@
|
---|
276 |
|
---|
277 | $(BIN)/%.zlmelfd: $(BIN)/%.lmelfd.zprf
|
---|
278 | $(OBJCOPY) -O binary $< $@
|
---|
279 |
|
---|
280 | # rules to generate a DOS loadable .com executable
|
---|
281 | SUFFIXES += com
|
---|
282 | $(BIN)/%.com.rt: $(BIN)/%.rt.o $(comENTRY) $(comEXIT) $(LDSCRIPT) $(MAKEDEPS)
|
---|
283 | $(LD) $(LDFLAGS) -T $(LDSCRIPT) -o $@ $< $(comEXIT)
|
---|
284 |
|
---|
285 | $(BIN)/%.com: $(BIN)/%.com.zprf
|
---|
286 | $(OBJCOPY) -O binary $< $@
|
---|
287 |
|
---|
288 | # rules to generate a DOS loadable .exe executable
|
---|
289 | SUFFIXES += exe
|
---|
290 | $(BIN)/%.exe.rt: $(BIN)/%.rt.o $(exeENTRY) $(exeEXIT) $(LDSCRIPT) $(MAKEDEPS)
|
---|
291 | $(LD) $(LDFLAGS) -T $(LDSCRIPT) -o $@ $< $(exeEXIT)
|
---|
292 | @$(SIZE) $@ | $(CHECKSIZE)
|
---|
293 |
|
---|
294 | $(BIN)/%.exe: $(BIN)/%.exe.prf
|
---|
295 | $(OBJCOPY) -O binary $< $@
|
---|
296 |
|
---|
297 | # rules to make a LILO loadable image
|
---|
298 | SUFFIXES += lilo zlilo
|
---|
299 |
|
---|
300 | $(BIN)/%.lilo.rt: $(BIN)/%.rt.o $(liloENTRY) $(liloEXIT) $(LDSCRIPT) $(MAKEDEPS)
|
---|
301 | $(LD) $(LDFLAGS) -T $(LDSCRIPT) -o $@ $< $(liloEXIT)
|
---|
302 | @$(SIZE) $@ | $(CHECKSIZE)
|
---|
303 |
|
---|
304 | $(BIN)/%.lilo: $(BIN)/%.lilo.prf
|
---|
305 | $(OBJCOPY) -O binary $< $@
|
---|
306 |
|
---|
307 | $(BIN)/%.zlilo: $(BIN)/%.lilo.zprf
|
---|
308 | $(OBJCOPY) -O binary $< $@
|
---|
309 |
|
---|
310 | # rules to make big linux boot protocol image
|
---|
311 | SUFFIXES += bImage bzImage
|
---|
312 |
|
---|
313 | $(BIN)/%.bImage.rt: $(BIN)/%.rt.o $(bImageENTRY) $(bImageEXIT) $(LDSCRIPT) $(MAKEDEPS)
|
---|
314 | $(LD) $(LDFLAGS) -T $(LDSCRIPT) -o $@ $< $(bImageEXIT)
|
---|
315 |
|
---|
316 | $(BIN)/%.bImage: $(BIN)/%.bImage.prf
|
---|
317 | $(OBJCOPY) -O binary $< $@
|
---|
318 |
|
---|
319 | $(BIN)/%.bzImage: $(BIN)/%.bImage.zprf
|
---|
320 | $(OBJCOPY) -O binary $< $@
|
---|
321 |
|
---|
322 |
|
---|
323 | # rules to generate a PXE loadable image
|
---|
324 | SUFFIXES += pxe zpxe
|
---|
325 |
|
---|
326 | $(BIN)/%.pxe.rt: $(BIN)/%.rt.o $(pxeENTRY) $(pxeEXIT) $(LDSCRIPT) $(MAKEDEPS)
|
---|
327 | $(LD) $(LDFLAGS) -T $(LDSCRIPT) -o $@ $< $(pxeEXIT)
|
---|
328 | @$(SIZE) $@ | $(CHECKSIZE)
|
---|
329 |
|
---|
330 | $(BIN)/%.pxe: $(BIN)/%.pxe.prf
|
---|
331 | $(OBJCOPY) -O binary $< $@
|
---|
332 |
|
---|
333 | $(BIN)/%.zpxe: $(BIN)/%.pxe.zprf
|
---|
334 | $(OBJCOPY) -O binary $< $@
|
---|
335 |
|
---|
336 | # rules to generate the .dsk/.zdsk floppy images
|
---|
337 | SUFFIXES += dsk zdsk
|
---|
338 |
|
---|
339 | $(BIN)/%.dsk.rt: $(BIN)/%.rt.o $(dskENTRY) $(dskEXIT) $(LDSCRIPT) $(MAKEDEPS)
|
---|
340 | $(LD) $(LDFLAGS) -T $(LDSCRIPT) -o $@ $< $(dskEXIT)
|
---|
341 | @$(SIZE) $@ | $(CHECKSIZE)
|
---|
342 |
|
---|
343 | $(BIN)/%.dsk: $(BIN)/%.dsk.prf
|
---|
344 | $(OBJCOPY) -O binary $< $@
|
---|
345 |
|
---|
346 | $(BIN)/%.zdsk: $(BIN)/%.dsk.zprf
|
---|
347 | $(OBJCOPY) -O binary $< $@
|
---|
348 |
|
---|
349 | # rules to generate the .hd/.zhd harddisk images
|
---|
350 | SUFFIXES += hd zhd
|
---|
351 |
|
---|
352 | $(BIN)/%.hd.rt: $(BIN)/%.rt.o $(hdENTRY) $(hdEXIT) $(LDSCRIPT) $(MAKEDEPS)
|
---|
353 | $(LD) $(LDFLAGS) -T $(LDSCRIPT) -o $@ $< $(hdEXIT)
|
---|
354 | @$(SIZE) $@ | $(CHECKSIZE)
|
---|
355 |
|
---|
356 | $(BIN)/%.hd: $(BIN)/%.hd.prf
|
---|
357 | $(OBJCOPY) -O binary $< $@
|
---|
358 |
|
---|
359 | $(BIN)/%.zhd: $(BIN)/%.hd.zprf
|
---|
360 | $(OBJCOPY) -O binary $< $@
|
---|
361 |
|
---|
362 | # rules to write the .dsk/.zdsk image onto a blank floppy
|
---|
363 | SUFFIXES += fd0 zfd0
|
---|
364 | %.fd0: %.dsk
|
---|
365 | dd if=$< bs=512 conv=sync of=/dev/fd0
|
---|
366 | sync
|
---|
367 |
|
---|
368 | %.zfd0: %.zdsk
|
---|
369 | dd if=$< bs=512 conv=sync of=/dev/fd0
|
---|
370 | sync
|
---|
371 |
|
---|
372 | # rules to create raw executable images
|
---|
373 | SUFFIXES += raw zraw
|
---|
374 | $(BIN)/%.raw.rt: $(BIN)/%.rt.o $(rawENTRY) $(rawEXIT) $(LDSCRIPT) $(MAKEDEPS)
|
---|
375 | $(LD) $(LDFLAGS) -T $(LDSCRIPT) -o $@ $< $(rawEXIT)
|
---|
376 |
|
---|
377 | $(BIN)/%.raw: $(BIN)/%.raw.prf
|
---|
378 | $(OBJCOPY) -O binary $< $@
|
---|
379 |
|
---|
380 | $(BIN)/%.zraw: $(BIN)/%.raw.zprf
|
---|
381 | $(OBJCOPY) -O binary $< $@
|
---|
382 |
|
---|
383 | # rule to make a non-emulation ISO boot image
|
---|
384 | SUFFIXES += iso
|
---|
385 | %.iso: util/geniso %.zlilo
|
---|
386 | ISOLINUX_BIN=${ISOLINUX_BIN} bash util/geniso $*.iso $*.zlilo
|
---|
387 |
|
---|
388 | # rule to make a floppy emulation ISO boot image
|
---|
389 | SUFFIXES += liso
|
---|
390 | %.liso: util/genliso %.zlilo
|
---|
391 | bash util/genliso $*.liso $*.zlilo
|
---|
392 |
|
---|