xref: /netbsd/sys/arch/bebox/stand/boot/Makefile (revision bf9ec67e)
1#	$NetBSD: Makefile,v 1.16 2002/04/09 16:05:37 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}
26CFLAGS= -Wno-main
27AFLAGS= -x assembler-with-cpp -traditional-cpp
28NOMAN=	# defined
29STRIPFLAG=
30BINMODE= 444
31
32RELOC= 0x700000
33
34.BEGIN:
35	@[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine
36	@[ -h powerpc ] || ln -s ${S}/arch/powerpc/include powerpc
37.NOPATH: machine powerpc
38CLEANFILES+= machine powerpc
39
40### find out what to use for libkern
41KERN_AS=	library
42.include "${S}/lib/libkern/Makefile.inc"
43LIBKERN=	${KERNLIB}
44
45### find out what to use for libz
46Z_AS=		library
47.include "${S}/lib/libz/Makefile.inc"
48LIBZ=		${ZLIB}
49
50### find out what to use for libsa
51SA_AS=		library
52SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
53.include "${S}/lib/libsa/Makefile.inc"
54LIBSA=		${SALIB}
55
56.PHONY: vers.c
57vers.c: version
58	sh ${S}/conf/newvers_stand.sh ${.CURDIR}/version "bebox" ${NEWVERSWHAT}
59
60realall: ${BOOTPROG}
61
62${BOOTPROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} vers.o
63	${LD} -o ${BOOTPROG} -s -N -T ${.CURDIR}/ld.script -Ttext ${RELOC} ${OBJS} \
64		${LIBSA} ${LIBZ} ${LIBKERN} vers.o
65
66cleandir distclean: cleanlibdir
67
68cleanlibdir:
69	rm -rf lib
70
71.include <bsd.prog.mk>
72