1# $NetBSD: Makefile,v 1.31 2013/11/07 19:52:56 christos 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.if defined(HAVE_GCC) && ${HAVE_GCC} >= 48 18# gcc 4.8 convers -mc68000 to -mcpu=68000 and that breaks gas 19# which works for -march=68010 but breaks for -mcpu=68010 20CFLAGS= -march=68010 21.else 22CFLAGS= -mc68000 -Wa,-mc68010 23.endif 24CFLAGS+= -Wa,-m68851 -msoft-float 25CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith 26COPTS= -Os -fno-defer-pop -ffreestanding -fno-unwind-tables 27CPPFLAGS= ${DEFS} ${DEBUG} ${INCL} 28CLEANFILES= SRT0.o SRT1.o vers.c 29 30SRCS= SRT0.S SRT1.c 31OBJS= SRT0.o SRT1.o 32 33realall: ${OBJS} 34 35.include <bsd.prog.mk> 36 37### find out what to use for libkern 38KERN_AS= library 39.include "${S}/lib/libkern/Makefile.inc" 40LIBKERN= ${KERNLIB} 41 42### find out what to use for libsa 43SA_AS= library 44SAMISCMAKEFLAGS= SA_USE_LOADFILE=yes SA_EXTRADIR=${.CURDIR} 45.include "${S}/lib/libsa/Makefile.inc" 46LIBSA= ${SALIB} 47 48LIBS= ${LIBSA} ${LIBKERN} 49 50realall: ${LIBS} 51 52cleandir distclean: .WAIT cleanlibdir 53 54cleanlibdir: 55 -rm -rf lib 56