Makefile revision 1.1
1#	$NetBSD: Makefile,v 1.1 2013/01/05 17:44:24 tsutsui Exp $
2#	@(#)Makefile	8.2 (Berkeley) 8/15/93
3
4NOMAN= # defined
5
6.include <bsd.own.mk>
7.include <bsd.sys.mk>
8
9S= ${.CURDIR}/../../../..
10
11CPPFLAGS+=	-nostdinc -D_STANDALONE
12CPPFLAGS+=	-I${.CURDIR} -I${.OBJDIR} -I${S} -I${S}/arch
13
14CPPFLAGS+=	-DSUPPORT_DISK
15#CPPFLAGS+=	-DSUPPORT_TAPE
16#CPPFLAGS+=	-DSUPPORT_ETHERNET
17#CPPFLAGS+=	-DSUPPORT_DHCP -DSUPPORT_BOOTP
18#CPPFLAGS+=	-DBOOTP_DEBUG -DNETIF_DEBUG -DETHER_DEBUG -DNFS_DEBUG
19#CPPFLAGS+=	-DRPC_DEBUG -DRARP_DEBUG -DNET_DEBUG -DDEBUG -DPARANOID
20
21CFLAGS=		-Os -msoft-float
22CFLAGS+=	-ffreestanding
23CFLAGS+=	-Wall -Werror
24CFLAGS+=	-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
25CFLAGS+=	-Wno-pointer-sign
26
27LDSCRIPT=	${.CURDIR}/boot.ldscript
28LINKFORMAT=	-static -N -T ${LDSCRIPT}
29
30SRCS=	locore.S
31SRCS+=	init_main.c autoconf.c ioconf.c
32SRCS+=	trap.c
33SRCS+=	devopen.c
34SRCS+=	conf.c
35SRCS+=	machdep.c
36SRCS+=	getline.c parse.c 
37SRCS+=	boot.c
38SRCS+=	cons.c prf.c
39SRCS+=	romcons.c
40SRCS+=	sio.c
41SRCS+=	bmc.c bmd.c screen.c font.c kbd.c
42SRCS+=	scsi.c sc.c sd.c
43#SRCS+=	st.c tape.c
44SRCS+=	disklabel.c
45#SRCS+=	fsdump.c
46SRCS+=	ufs_disksubr.c
47
48PROG=   boot
49
50SRCS+=          vers.c
51CLEANFILES+=    vers.c
52
53### find out what to use for libkern
54KERN_AS=	library
55.include "${S}/lib/libkern/Makefile.inc"
56
57### find out what to use for libz
58Z_AS=		library
59.include "${S}/lib/libz/Makefile.inc"
60
61### find out what to use for libsa
62SA_AS=		library
63SAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes
64.include "${S}/lib/libsa/Makefile.inc"
65
66LIBS=	${SALIB} ${ZLIB} ${KERNLIB}
67
68.PHONY: vers.c
69vers.c: ${.CURDIR}/version
70	${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
71	    ${.CURDIR}/version "${MACHINE}"
72
73${PROG}: ${LDSCRIPT} ${OBJS} ${LIBS}
74	${LD} ${LINKFORMAT} -x -o ${PROG}.elf ${OBJS} ${LIBS}
75	${ELF2AOUT} ${PROG}.elf ${PROG}.aout
76	mv ${PROG}.aout ${PROG}
77
78CLEANFILES+=	${PROG}.map ${PROG}.elf ${PROG}.gz
79
80cleandir distclean: .WAIT cleanlibdir
81
82cleanlibdir:
83	-rm -rf lib
84
85.include <bsd.klinks.mk>
86.include <bsd.prog.mk>
87