Revert to previous version of this driver (1.19) until we figure
[unix-history] / sys / i386 / netboot / Makefile
CommitLineData
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#
13ROMSIZE=16384
14RELOCADDR=0x90000
86e2ea7e
MR
15CFLAGS= -O2 -DNFS -DINCLUDE_WD -DINCLUDE_NE -DROMSIZE=$(ROMSIZE) \
16 -DRELOC=$(RELOCADDR) -DNE_BASE=0x320 -DWD_DEFAULT_MEM=0xD0000
db4d0741
MR
17
18HDRS=netboot.h
86e2ea7e 19COBJS=main.o misc.o ether.o bootmenu.o
db4d0741
MR
20SSRCS=start2.S
21SOBJS=start2.o
22
23.SUFFIXES: .c .S .s .o
24
25all: netboot.com netboot.rom
26
27makerom: makerom.c
28 cc -o makerom -DROMSIZE=$(ROMSIZE) makerom.c
29
30netboot.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
37netboot.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
45test: 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
50clean:
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