This commit was generated by cvs2svn to track changes on a CVS vendor
[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)
8#
9ROMSIZE=16384
10RELOCADDR=0x90000
11CFLAGS=-O2 -DNFS -DROMSIZE=$(ROMSIZE) -DRELOC=$(RELOCADDR)
12
13HDRS=netboot.h
14COBJS=main.o misc.o wd80x3.o bootmenu.o
15SSRCS=start2.S
16SOBJS=start2.o
17
18.SUFFIXES: .c .S .s .o
19
20all: netboot.com netboot.rom
21
22makerom: makerom.c
23 cc -o makerom -DROMSIZE=$(ROMSIZE) makerom.c
24
25netboot.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
32netboot.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
40test: 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
45clean:
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