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) | |
86e2ea7e MR |
8 | # -DINCLUDE_WD - Include Western Digital/SMC support |
9 | # -DINCLUDE_NE - Include NE1000/NE2000 support | |
10 | # -DNE_BASE - Base I/O address for NE1000/NE2000 | |
11 | # -DWD_DEFAULT_MEM- Default memory location for WD/SMC cards | |
db4d0741 MR |
12 | # |
13 | ROMSIZE=16384 | |
14 | RELOCADDR=0x90000 | |
86e2ea7e MR |
15 | CFLAGS= -O2 -DNFS -DINCLUDE_WD -DINCLUDE_NE -DROMSIZE=$(ROMSIZE) \ |
16 | -DRELOC=$(RELOCADDR) -DNE_BASE=0x320 -DWD_DEFAULT_MEM=0xD0000 | |
db4d0741 MR |
17 | |
18 | HDRS=netboot.h | |
86e2ea7e | 19 | COBJS=main.o misc.o ether.o bootmenu.o |
db4d0741 MR |
20 | SSRCS=start2.S |
21 | SOBJS=start2.o | |
22 | ||
23 | .SUFFIXES: .c .S .s .o | |
24 | ||
25 | all: netboot.com netboot.rom | |
26 | ||
27 | makerom: makerom.c | |
28 | cc -o makerom -DROMSIZE=$(ROMSIZE) makerom.c | |
29 | ||
30 | netboot.com: $(COBJS) $(SSRCS) | |
31 | cc -c $(CFLAGS) $(SSRCS) | |
32 | ld -e _start -T $(RELOCADDR) -N $(SOBJS) $(COBJS) | |
33 | strip a.out | |
34 | size a.out | |
35 | dd ibs=32 skip=1 <a.out >netboot.com | |
36 | ||
37 | netboot.rom: $(COBJS) $(SSRCS) makerom | |
38 | cc -c $(CFLAGS) -DBOOTROM $(SSRCS) | |
39 | ld -e _start -T $(RELOCADDR) -N $(SOBJS) $(COBJS) | |
40 | strip a.out | |
41 | size a.out | |
42 | dd ibs=32 skip=1 <a.out >netboot.rom | |
43 | ./makerom netboot.rom | |
44 | ||
45 | test: netboot.com | |
46 | mount -t pcfs /dev/fd0a /msdos | |
47 | cp netboot.com /msdos/netboot.com | |
9363f593 | 48 | cp netboot.rom /msdos/netboot.rom |
db4d0741 MR |
49 | umount /msdos |
50 | clean: | |
51 | rm -f $(COBJS) $(SOBJS) *.s netboot.com netboot.rom a.out makerom | |
52 | ||
53 | .c.o: Makefile $(HDRS) | |
54 | cc $(CFLAGS) -c $< | |
55 | ||
56 | .c.s: Makefile $(HDRS) | |
57 | cc $(CFLAGS) -S $< | |
58 | ||
59 |