1#	$NetBSD: Makefile,v 1.27 2009/03/20 11:42:25 tsutsui Exp $
2
3# Logically src/sys
4S!= cd ${.CURDIR}/../../../..; pwd
5DIR_SA=${S}/lib/libsa
6DIR_KERN=${S}/lib/libkern ${S}/lib/libkern/arch/m68k
7DIR_LIBC=${S}/../common/lib/libc
8
9# DEBUG= -DDEBUG -DNETIF_DEBUG -DNFS_DEBUG -DRPC_DEBUG \
10#  -DNET_DEBUG -DRARP_DEBUG -DETHER_DEBUG -DDEBUG_PROM
11
12CPUFLAGS=	# ignore settings in /etc/mk.conf
13DEFS= -Dsun3 -D_STANDALONE -D__daddr_t=int32_t
14INCL= -I. -I${.CURDIR} -I${S}/lib/libsa -I${S} -I${S}/arch
15AFLAGS= -Wa,-mc68020 -Wa,-mc68851
16CFLAGS= -mc68000 -Wa,-mc68010 -Wa,-m68851 -msoft-float
17CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
18COPTS= -Os -fno-defer-pop -ffreestanding
19CPPFLAGS= ${DEFS} ${DEBUG} ${INCL}
20CLEANFILES= SRT0.o SRT1.o vers.c
21
22SRCS= SRT0.S SRT1.c
23OBJS= SRT0.o SRT1.o
24
25realall: ${OBJS}
26
27.include <bsd.prog.mk>
28
29### find out what to use for libkern
30KERN_AS= library
31.include "${S}/lib/libkern/Makefile.inc"
32LIBKERN= ${KERNLIB}
33
34### find out what to use for libsa
35SA_AS= library
36SAMISCMAKEFLAGS= SA_USE_LOADFILE=yes SA_EXTRADIR=${.CURDIR}
37.include "${S}/lib/libsa/Makefile.inc"
38LIBSA= ${SALIB}
39
40LIBS= ${LIBSA} ${LIBKERN}
41
42realall: ${LIBS}
43
44cleandir distclean: .WAIT cleanlibdir
45
46cleanlibdir:
47	-rm -rf lib
48