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