Commit | Line | Data |
---|---|---|
db4d0741 MR |
1 | # Makefile for NETBOOT |
2 | # | |
3 | # Options: | |
4 | # -DASK_BOOT - Ask "Boot from Network (Y/N) ?" at startup | |
5 | # -DSMALL_ROM - Compile for 8K ROMS | |
6 | # -DROMSIZE - Size of EPROM - Must be set (even for .COM files) | |
7 | # -DRELOC - Relocation address (usually 0x90000) | |
8 | # | |
9 | ROMSIZE=16384 | |
10 | RELOCADDR=0x90000 | |
11 | CFLAGS=-O2 -DNFS -DROMSIZE=$(ROMSIZE) -DRELOC=$(RELOCADDR) | |
12 | ||
13 | HDRS=netboot.h | |
14 | COBJS=main.o misc.o wd80x3.o bootmenu.o | |
15 | SSRCS=start2.S | |
16 | SOBJS=start2.o | |
17 | ||
18 | .SUFFIXES: .c .S .s .o | |
19 | ||
20 | all: netboot.com netboot.rom | |
21 | ||
22 | makerom: makerom.c | |
23 | cc -o makerom -DROMSIZE=$(ROMSIZE) makerom.c | |
24 | ||
25 | netboot.com: $(COBJS) $(SSRCS) | |
26 | cc -c $(CFLAGS) $(SSRCS) | |
27 | ld -e _start -T $(RELOCADDR) -N $(SOBJS) $(COBJS) | |
28 | strip a.out | |
29 | size a.out | |
30 | dd ibs=32 skip=1 <a.out >netboot.com | |
31 | ||
32 | netboot.rom: $(COBJS) $(SSRCS) makerom | |
33 | cc -c $(CFLAGS) -DBOOTROM $(SSRCS) | |
34 | ld -e _start -T $(RELOCADDR) -N $(SOBJS) $(COBJS) | |
35 | strip a.out | |
36 | size a.out | |
37 | dd ibs=32 skip=1 <a.out >netboot.rom | |
38 | ./makerom netboot.rom | |
39 | ||
40 | test: netboot.com | |
41 | mount -t pcfs /dev/fd0a /msdos | |
42 | cp netboot.com /msdos/netboot.com | |
9363f593 | 43 | cp netboot.rom /msdos/netboot.rom |
db4d0741 MR |
44 | umount /msdos |
45 | clean: | |
46 | rm -f $(COBJS) $(SOBJS) *.s netboot.com netboot.rom a.out makerom | |
47 | ||
48 | .c.o: Makefile $(HDRS) | |
49 | cc $(CFLAGS) -c $< | |
50 | ||
51 | .c.s: Makefile $(HDRS) | |
52 | cc $(CFLAGS) -S $< | |
53 | ||
54 |