2015-09-06 18:20:59 +03:00
|
|
|
# $NetBSD: ldscript.mk,v 1.2 2015/09/06 15:20:59 uebayasi Exp $
|
2015-09-06 09:41:14 +03:00
|
|
|
|
|
|
|
# Give MD generated ldscript dependency on ${SYSTEM_OBJ}
|
|
|
|
.if defined(KERNLDSCRIPT)
|
|
|
|
.if target(${KERNLDSCRIPT})
|
2015-09-06 18:20:59 +03:00
|
|
|
${KERNLDSCRIPT}: ${SYSTEM_OBJ:O}
|
2015-09-06 09:41:14 +03:00
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(KERNLDSCRIPT)
|
|
|
|
.for k in ${KERNELS}
|
|
|
|
EXTRA_CLEAN+= ${k}.ldscript
|
|
|
|
${k}: ${k}.ldscript
|
|
|
|
${k}.ldscript: ${KERNLDSCRIPT} assym.h
|
|
|
|
${_MKTARGET_CREATE}
|
|
|
|
${CPP} -I. ${KERNLDSCRIPT} | grep -v '^#' | grep -v '^$$' >$@
|
|
|
|
.endfor
|
|
|
|
LINKSCRIPT= -T ${.TARGET}.ldscript
|
|
|
|
.endif
|