1 # $NetBSD: Makefile,v 1.31 2012/06/16 19:19:14 joerg Exp $
5 .if
${USE_COMPILERCRTSTUFF} != "yes"
7 .if defined
(CSU_MACHINE_ARCH
)
8 . if
!exists
(${.CURDIR
}/arch
/${CSU_MACHINE_ARCH}/Makefile.inc
)
9 . error CSU_MACHINE_ARCH
(${CSU_MACHINE_ARCH}) is unsupported
11 .elif exists
(${.CURDIR
}/arch
/${MACHINE_ARCH}/Makefile.inc
)
12 CSU_MACHINE_ARCH
= ${MACHINE_ARCH}
13 .elif exists
(${.CURDIR
}/arch
/${MACHINE_CPU}/Makefile.inc
)
14 CSU_MACHINE_ARCH
= ${MACHINE_CPU}
16 .error Architecture
(${MACHINE_ARCH} or
${MACHINE_CPU}) unsupported
19 ARCHDIR
:= ${.CURDIR
}/arch
/${CSU_MACHINE_ARCH}
22 .
include "${ARCHDIR}/Makefile.inc"
24 .
include "${.CURDIR}/common/Makefile.inc"
28 CSU_MACHINE_ARCH?
= ${MACHINE_ARCH}
30 . if exists
(${CSU_MACHINE_ARCH}_elf
/Makefile
)
31 SUBDIR
= ${CSU_MACHINE_ARCH}_elf
32 . elif exists
(${CSU_MACHINE_ARCH}/Makefile
)
33 SUBDIR
= ${CSU_MACHINE_ARCH}
34 . elif exists
(${MACHINE_CPU}_elf
/Makefile
)
35 SUBDIR
= ${MACHINE_CPU}_elf
36 . elif exists
(${MACHINE_CPU}/Makefile
)
37 SUBDIR
= ${MACHINE_CPU}
40 @echo no SUBDIR for
${MACHINE_ARCH}_elf
, ${MACHINE_ARCH} nor \
45 .
include <bsd.subdir.mk
>