xref: /netbsd/sys/arch/vax/boot/boot/Makefile (revision c4a72b64)
1#	$NetBSD: Makefile,v 1.30 2002/11/05 14:35:30 thorpej Exp $
2
3S=	${.CURDIR}/../../../..
4NOMAN=	# defined
5
6.include <bsd.own.mk>
7
8PROG=	boot
9WARNS?=	1
10DEVS=	hp.c ctu.c ra.c mfm.c if_qe.c if_le.c if_ze.c if_de.c if_ni.c
11SRCS=	srt0.S boot.c devopen.c conf.c autoconf.c netio.c rom.c romread.S \
12	consio.c consio2.S str.S ${DEVS} findcpu.c vers.c
13LIBC=
14
15CFLAGS+=-ffreestanding -mno-asm-pic
16AFLAGS+=-mno-asm-pic
17CLEANFILES+=${PROG} ${PROG}.sym vers.c
18CPPFLAGS+=-DSUPPORT_BOOTPARAMS -DSUPPORT_BOOTP -DSUPPORT_DHCP -D_STANDALONE \
19	-DNO_MID_CHECK
20#CPPFLAGS+=-DBOOTP_DEBUG -DNETIF_DEBUG -DETHER_DEBUG -DNFS_DEBUG -DDEV_DEBUG \
21#	-DRPC_DEBUG -DRARP_DEBUG -DPARANOID
22BINDIR=
23MDEC_DIR=/usr/mdec
24
25SA_AS=	library
26SAMISCMAKEFLAGS=SA_USE_CREAD=yes SA_INCLUDE_NET=yes SA_USE_LOADFILE=yes
27.include "${S}/lib/libsa/Makefile.inc"
28LIBSA=	${SALIB}
29
30Z_AS=	library
31.include "${S}/lib/libz/Makefile.inc"
32LIBZ=	${ZLIB}
33
34KERN_AS=library
35.include "${S}/lib/libkern/Makefile.inc"
36LIBKERN=${KERNLIB}
37
38.if ${MACHINE} == "vax"
39.PHONY: machine-links
40beforedepend: machine-links
41machine-links:
42	@rm -f machine && ln -s ${S}/arch/${MACHINE}/include machine
43	@rm -f ${MACHINE_ARCH} && ln -s ${S}/arch/${MACHINE_ARCH}/include ${MACHINE_ARCH}
44.NOPATH: machine ${MACHINE_ARCH}
45CLEANFILES+= machine ${MACHINE_ARCH}
46.endif
47
48
49START=nisse
50
51.PHONY: vers.c
52vers.c: ${.CURDIR}/version
53	sh ${S}/conf/newvers_stand.sh -NM ${.CURDIR}/version "${MACHINE}"
54
55${PROG}: machine-links ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
56	${LD} -N -Ttext ${RELOC} -e ${START} -o ${PROG}.sym ${OBJS} \
57	    ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN}
58	${STRIP} -o ${PROG} ${PROG}.sym
59	${SIZE} ${PROG}
60
61install:
62	${INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 555 \
63		${PROG} ${DESTDIR}${MDEC_DIR}/${PROG}
64
65.include <bsd.prog.mk>
66