1 # $NetBSD: Makefile,v 1.30 2012/06/16 18:19:39 joerg Exp $ 2 3 .include <bsd.own.mk> 4 5 .if ${USE_COMPILERCRTSTUFF} != "yes" 6 7 .if exists(${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc) 8 ARCHDIR:= ${.CURDIR}/arch/${MACHINE_ARCH} 9 .elif exists(${.CURDIR}/arch/${MACHINE_CPU}/Makefile.inc) 10 ARCHDIR:= ${.CURDIR}/arch/${MACHINE_CPU} 11 .else 12 .error Architecture (${MACHINE_ARCH} or ${MACHINE_CPU}) unsupported 13 .endif 14 15 .PATH: ${ARCHDIR} 16 . include "${ARCHDIR}/Makefile.inc" 17 18 . include "${.CURDIR}/common/Makefile.inc" 19 20 .else 21 22 CSU_MACHINE_ARCH?= ${MACHINE_ARCH} 23 24 . if exists(${CSU_MACHINE_ARCH}_elf/Makefile) 25 SUBDIR= ${CSU_MACHINE_ARCH}_elf 26 . elif exists(${CSU_MACHINE_ARCH}/Makefile) 27 SUBDIR= ${CSU_MACHINE_ARCH} 28 . elif exists(${MACHINE_CPU}_elf/Makefile) 29 SUBDIR= ${MACHINE_CPU}_elf 30 . elif exists(${MACHINE_CPU}/Makefile) 31 SUBDIR= ${MACHINE_CPU} 32 . else 33 .BEGIN: 34 @echo no SUBDIR for ${MACHINE_ARCH}_elf, ${MACHINE_ARCH} nor \ 35 ${MACHINE_CPU} 36 @false 37 . endif 38 39 . include <bsd.subdir.mk> 40 .endif 41