xref: /netbsd-src/sys/arch/alpha/stand/netboot/Makefile (revision 76dfffe33547c37f8bdd446e3e4ab0f3c16cea4b)
1#	$NetBSD: Makefile,v 1.3 1996/10/18 06:02:24 thorpej Exp $
2
3.PATH: ${.CURDIR}/.. ${.CURDIR}/../../../../lib/libsa
4
5BOOT_PROG = netboot
6BOOT_RELOC = ${PRIMARY_LOAD_ADDRESS}
7
8BOOT_SRCS = start.S netboot.c prom.c prom_disp.S OSFpal.c prom_swpal.S
9BOOT_SRCS+= printf.c bzero.c rpcc.S
10
11BOOT_SRCS+= dev_net.c conf.c devopen.c
12BOOT_SRCS+= nfs.c rpc.c alloc.c ntohl.c htonl.c ntohs.c htons.c net.c bootp.c
13BOOT_SRCS+= strlen.c bcopy.c dev.c bcmp.c strerror.c rarp.c read.c lseek.c
14BOOT_SRCS+= in_cksum.c exit.c closeall.c arp.c strncpy.c globals.c open.c
15BOOT_SRCS+= close.c ether.c netif.c
16
17BOOT_SRCS+= if_prom.c loadfile.c getsecs.c
18
19BOOT_OBJS = ${BOOT_SRCS:N*.h:R:S/$/.o/g}
20
21HEADERSIZE_PROG = headersize
22
23AFLAGS += -DASSEMBLER
24CPPFLAGS += -I${.CURDIR}/../../../../ \
25	    -I${.CURDIR}/../../../../lib/libsa \
26	    -I${.CURDIR}/../.. -DPRIMARY_BOOTBLOCK \
27	    -DALPHA_BOOT_ECOFF -DALPHA_BOOT_ELF
28CFLAGS = -Werror -mno-fp-regs -g
29
30CLEANFILES+= vers.c vers.o
31
32.PATH: ${.CURDIR} ${.CURDIR}/../../../../lib/libkern ${.CURDIR}/../boot
33
34all: ${BOOT_PROG}
35
36${BOOT_PROG}: ${BOOT_OBJS} ${HEADERSIZE_PROG}
37	sh ${.CURDIR}/newvers.sh ${.CURDIR}/version
38	${COMPILE.c} vers.c
39	${LD} -Ttext ${BOOT_RELOC} -N -e start -o ${BOOT_PROG}.hdr \
40	    ${BOOT_OBJS} vers.o -lc # XXX
41	size ${BOOT_PROG}.hdr
42	strip ${BOOT_PROG}.hdr
43	dd if=${BOOT_PROG}.hdr of=${BOOT_PROG} \
44	    bs=`./${HEADERSIZE_PROG} ${BOOT_RELOC} ${BOOT_PROG}.hdr` skip=1
45
46install:
47	${INSTALL} -c -o bin -g bin -m 444 ${BOOT_PROG} \
48	    ${DESTDIR}${BINDIR}/${BOOT_PROG}
49
50clean: _SUBDIRUSE
51	rm -f a.out [Ee]rrs mklog core *.core \
52	    ${BOOT_PROG} ${BOOT_OBJS} ${CLEANFILES} \
53	    ${BOOT_PROG}.hdr ${BOOT_PROG}.nohdr ${HEADERSIZE_PROG}
54
55cleandir: _SUBDIRUSE clean
56
57.include "${.CURDIR}/../Makefile.inc"
58.include <bsd.obj.mk>
59.include <bsd.dep.mk>
60.include <bsd.subdir.mk>
61