NetBSD/sys/modules/Makefile.assym

32 lines
853 B
Makefile

# $NetBSD: Makefile.assym,v 1.3 2013/11/09 17:30:46 jmcneill Exp $
DPSRCS+= assym.h
CLEANFILES+= assym.h
.if (${MACHINE_ARCH} == "powerpc")
.if (${MACHINE} == "macppc" || ${MACHINE} == "ofppc" || ${MACHINE} == "prep")
# use oea
GENASSYM_DIR= $S/arch/${MACHINE_ARCH}/oea
CPPFLAGS+= -DPPC_OEA
.endif
.endif
.if (!empty(MACHINE_ARCH:Mearm*) || !empty(MACHINE_ARCH:Marm*))
GENASSYM_DIR= $S/arch/arm/arm32
.endif
.if exists($S/arch/${MACHINE}/${MACHINE}/genassym.cf)
GENASSYM_DIR?= $S/arch/${MACHINE}/${MACHINE}
.elif exists($S/arch/${MACHINE_CPU}/${MACHINE_CPU}/genassym.cf)
GENASSYM_DIR?= $S/arch/${MACHINE_CPU}/${MACHINE_CPU}
.else
GENASSYM_DIR?=
.endif
assym.h:
# ${GENASSYM_DIR}/genassym.cf
@echo ${S}
${TOOL_GENASSYM} -- ${CC} ${CFLAGS:N-Wa,*} ${CPPFLAGS} ${PROF} \
< ${GENASSYM_DIR}/genassym.cf > assym.h.tmp && \
mv -f assym.h.tmp assym.h