Makefile revision 1.4
1#	$NetBSD: Makefile,v 1.4 1994/11/20 20:54:49 deraadt Exp $
2
3#	@(#)Makefile	8.1 (Berkeley) 6/10/93
4
5DESTDIR=
6
7RELOC_SUN4=	240000
8RELOC_SUN4C=	340000
9RELOC_SUN4M=	440000
10
11RELOC?=		${RELOC_SUN4C}
12
13DEFS= -DSTANDALONE
14CFLAGS=	-O2 ${INCPATH} ${DEFS}
15
16SRCS=   boot.c filesystem.c promdev.c version.c
17XXSRCS=	bootxx.c promdev.c
18
19S=	${.CURDIR}/../../..
20
21.PATH: ${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
22.PATH: ${S}/stand ${S}/lib/libsa
23
24INCPATH=-I${.CURDIR} -I${S}/arch -I${S} -I${S}/lib/libsa
25
26### find out what to use for libkern and libsa
27.include "$S/lib/libkern/Makefile.inc"
28LIBKERN= ${KERNLIB}
29.include "$S/lib/libsa/Makefile.inc"
30LIBSA=	${SA_LIB}
31
32LIBS=	${LIBSA} ${LIBKERN}
33
34BOOTS=	boot bootxx
35ALL=	${BOOTS} installboot
36
37all: ${ALL}
38
39${BOOTS}: ${LIBS} .NOTMAIN
40
41OBJS=	${SRCS:N*.h:R:S/$/.o/g}
42XXOBJS=	${XXSRCS:N*.h:R:S/$/.o/g}
43
44# depend on DEFS
45
46srt0.o: Makefile
47
48# startups
49
50srt0.o: ${.CURDIR}/srt0.S
51	${CC} ${INCPATH} ${DEFS} -c ${.CURDIR}/srt0.S
52
53# new boot
54boot:	srt0.o ${OBJS} ${LIBS} fixhdr
55	${LD} -N -T ${RELOC} -e start srt0.o ${OBJS} ${LIBS} -o $@
56	${.OBJDIR}/fixhdr $@
57	@size $@
58
59bootxx:	srt0.o ${XXOBJS} ${LIBS} fixhdr
60	${LD} -N -T ${RELOC} -e start srt0.o ${XXOBJS} ${LIBS} -o $@
61	${.OBJDIR}/fixhdr $@
62	@size $@
63
64installboot: ${.CURDIR}/installboot.c
65	${CC} ${CFLAGS} -o installboot ${.CURDIR}/installboot.c
66
67# utilities
68
69fixhdr: fixhdr.c
70	${CC} -o fixhdr ${.CURDIR}/fixhdr.c
71
72clean cleandir:
73	rm -f *.o errs make.out
74	rm -f a.out boot cat ls fixhdr
75
76.include <bsd.dep.mk>
77.include <bsd.obj.mk>
78
79