Makefile revision 1.15
1#	$NetBSD: Makefile,v 1.15 2002/04/08 16:09:58 sakamoto Exp $
2
3S= ${.CURDIR}/../../../..
4
5BOOTPROG= boot
6NEWVERSWHAT= "BOOT"
7
8ASRCS+= srt0.s
9CSRCS+= boot.c clock.c com.c conf.c cons.c cpu.c devopen.c
10CSRCS+= fd.c filesystem.c inkernel.c io.c tgets.c prf.c monitor.c
11CSRCS+= kbd.c ns16550.c vreset.c vga.c video.c
12
13CLEANFILES+= vers.c vers.o ${BOOTPROG}
14
15CPPFLAGS= -I${.CURDIR} -I${.CURDIR}/../elf2pef -I${.CURDIR}/../../..
16CPPFLAGS+= -I${S} -I${S}/lib/libsa
17CPPFLAGS+= -D_STANDALONE -DDBMONITOR -DRELOC=${RELOC}
18CPPFLAGS+= -DUSE_SCAN
19#CPPFLAGS+= -DCONS_BE
20CPPFLAGS+= -DCONS_VGA
21#CPPFLAGS+= -DCONS_SERIAL -DCOMSPEED=9600 -DCOMPORT=0x3F8
22
23AOBJS=	${ASRCS:.s=.o}
24COBJS=	${CSRCS:.c=.o}
25OBJS=	${AOBJS} ${COBJS}
26AFLAGS= -x assembler-with-cpp -traditional-cpp
27NOMAN=	# defined
28STRIPFLAG=
29BINMODE= 444
30
31RELOC= 0x700000
32
33.BEGIN:
34	@[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine
35	@[ -h powerpc ] || ln -s ${S}/arch/powerpc/include powerpc
36.NOPATH: machine powerpc
37CLEANFILES+= machine powerpc
38
39### find out what to use for libkern
40KERN_AS=	library
41.include "${S}/lib/libkern/Makefile.inc"
42LIBKERN=	${KERNLIB}
43
44### find out what to use for libz
45Z_AS=		library
46.include "${S}/lib/libz/Makefile.inc"
47LIBZ=		${ZLIB}
48
49### find out what to use for libsa
50SA_AS=		library
51SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
52.include "${S}/lib/libsa/Makefile.inc"
53LIBSA=		${SALIB}
54
55.PHONY: vers.c
56vers.c: version
57	sh ${S}/conf/newvers_stand.sh ${.CURDIR}/version "bebox" ${NEWVERSWHAT}
58
59realall: ${BOOTPROG}
60
61${BOOTPROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} vers.o
62	${LD} -o ${BOOTPROG} -s -N -T ${.CURDIR}/ld.script -Ttext ${RELOC} ${OBJS} \
63		${LIBSA} ${LIBZ} ${LIBKERN} vers.o
64
65cleandir distclean: cleanlibdir
66
67cleanlibdir:
68	rm -rf lib
69
70.include <bsd.prog.mk>
71