1 # $NetBSD: Makefile,v 1.32 2017/04/09 18:46:55 christos Exp $ 2 3 # Logically src/sys 4 .include <bsd.own.mk> 5 S!= cd ${.CURDIR}/../../../..; pwd 6 DIR_SA=${S}/lib/libsa 7 DIR_KERN=${S}/lib/libkern ${S}/lib/libkern/arch/m68k 8 DIR_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 13 CPUFLAGS= # ignore settings in /etc/mk.conf 14 DEFS= -Dsun3 -D_STANDALONE -D__daddr_t=int32_t 15 INCL= -I. -I${.CURDIR} -I${S}/lib/libsa -I${S} -I${S}/arch 16 AFLAGS= -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 20 CFLAGS= -march=68010 21 .else 22 CFLAGS= -mc68000 -Wa,-mc68010 23 .endif 24 CFLAGS+= -Wa,-m68851 -msoft-float 25 CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith 26 COPTS= -Os -fno-defer-pop -ffreestanding -fno-unwind-tables 27 CPPFLAGS= ${DEFS} ${DEBUG} ${INCL} 28 CLEANFILES= SRT0.o SRT1.o 29 30 SRCS= SRT0.S SRT1.c 31 OBJS= SRT0.o SRT1.o 32 33 realall: ${OBJS} 34 35 .include <bsd.prog.mk> 36 37 ### find out what to use for libkern 38 KERN_AS= library 39 .include "${S}/lib/libkern/Makefile.inc" 40 LIBKERN= ${KERNLIB} 41 42 ### find out what to use for libsa 43 SA_AS= library 44 SAMISCMAKEFLAGS= SA_USE_LOADFILE=yes SA_EXTRADIR=${.CURDIR} 45 .include "${S}/lib/libsa/Makefile.inc" 46 LIBSA= ${SALIB} 47 48 LIBS= ${LIBSA} ${LIBKERN} 49 50 realall: ${LIBS} 51 52 cleandir distclean: .WAIT cleanlibdir 53 54 cleanlibdir: 55 -rm -rf lib 56