1 1.33 matt # $NetBSD: Makefile,v 1.33 2013/09/10 16:45:33 matt Exp $ 2 1.6 cgd 3 1.13 christos .include <bsd.own.mk> 4 1.13 christos 5 1.30 joerg .if ${USE_COMPILERCRTSTUFF} != "yes" 6 1.27 joerg 7 1.33 matt CSU_MACHINE_ARCH?= ${MACHINE_ARCH} 8 1.33 matt 9 1.33 matt .if !empty(CSU_MACHINE_ARCH:Mearm*) 10 1.33 matt ARCHDIR:= ${.CURDIR}/arch/earm 11 1.33 matt .elif exists(${.CURDIR}/arch/${CSU_MACHINE_ARCH}/Makefile.inc) 12 1.33 matt ARCHDIR:= ${.CURDIR}/arch/${CSU_MACHINE_ARCH} 13 1.30 joerg .elif exists(${.CURDIR}/arch/${MACHINE_CPU}/Makefile.inc) 14 1.33 matt ARCHDIR:= ${.CURDIR}/arch/${MACHINE_CPU} 15 1.30 joerg .else 16 1.33 matt .error Architecture (${CSU_MACHINE_ARCH} or ${MACHINE_CPU}) unsupported 17 1.30 joerg .endif 18 1.28 skrll 19 1.31 joerg 20 1.27 joerg .PATH: ${ARCHDIR} 21 1.27 joerg . include "${ARCHDIR}/Makefile.inc" 22 1.27 joerg 23 1.29 drochner . include "${.CURDIR}/common/Makefile.inc" 24 1.28 skrll 25 1.27 joerg .else 26 1.27 joerg 27 1.30 joerg CSU_MACHINE_ARCH?= ${MACHINE_ARCH} 28 1.30 joerg 29 1.27 joerg . if exists(${CSU_MACHINE_ARCH}_elf/Makefile) 30 1.25 mrg SUBDIR= ${CSU_MACHINE_ARCH}_elf 31 1.27 joerg . elif exists(${CSU_MACHINE_ARCH}/Makefile) 32 1.27 joerg SUBDIR= ${CSU_MACHINE_ARCH} 33 1.27 joerg . elif exists(${MACHINE_CPU}_elf/Makefile) 34 1.23 enami SUBDIR= ${MACHINE_CPU}_elf 35 1.27 joerg . elif exists(${MACHINE_CPU}/Makefile) 36 1.22 itojun SUBDIR= ${MACHINE_CPU} 37 1.27 joerg . else 38 1.22 itojun .BEGIN: 39 1.23 enami @echo no SUBDIR for ${MACHINE_ARCH}_elf, ${MACHINE_ARCH} nor \ 40 1.23 enami ${MACHINE_CPU} 41 1.22 itojun @false 42 1.27 joerg . endif 43 1.27 joerg 44 1.27 joerg . include <bsd.subdir.mk> 45 1.13 christos .endif 46