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