1 # $NetBSD: Makefile,v 1.40 2020/04/22 23:32:25 joerg Exp $ 2 3 NOLIBCSANITIZER= # defined 4 NOSANITIZER= # defined 5 6 .include <bsd.own.mk> 7 8 CSU_MACHINE_ARCH?= ${MACHINE_ARCH} 9 CSU_MACHINE_CPU?= ${MACHINE_CPU} 10 11 .if !empty(CSU_MACHINE_ARCH:Mearm*) 12 ARCHDIR:= ${.CURDIR}/arch/earm 13 .elif exists(${.CURDIR}/arch/${CSU_MACHINE_ARCH}/Makefile.inc) 14 ARCHDIR:= ${.CURDIR}/arch/${CSU_MACHINE_ARCH} 15 .elif exists(${.CURDIR}/arch/${CSU_MACHINE_CPU}/Makefile.inc) 16 ARCHDIR:= ${.CURDIR}/arch/${CSU_MACHINE_CPU} 17 .else 18 .error Architecture (${CSU_MACHINE_ARCH} or ${CSU_MACHINE_CPU}) unsupported 19 .endif 20 21 # Ownership of globals from crt0.o is shared with libc for historic reasons 22 COPTS+= -fcommon 23 24 .PATH: ${ARCHDIR} 25 .include "${ARCHDIR}/Makefile.inc" 26 .include "${.CURDIR}/common/Makefile.inc" 27