diff options
| author | jkoshy <jkoshy@NetBSD.org> | 2022-04-13 17:52:56 +0000 |
|---|---|---|
| committer | jkoshy <jkoshy@NetBSD.org> | 2022-04-13 17:52:56 +0000 |
| commit | deabdcca68911fabdaf3208912142721553e0acb (patch) | |
| tree | 4d939a0ecfce43a1d623b165b7c382cadb7f93c2 /tools | |
| parent | ab1be36056dde4248dc5e736e7a1af95c0147c5d (diff) | |
When building tools use a dedicated subdirectory for compiling
Elftoolchain code.
Build and install <sys/elfdefinitions.h> in ${TOOLDIR}/include.
This change prepares the ground for upgrading libelf and libdwarf to
their current Elftoolchain versions.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/Makefile | 3 | ||||
| -rw-r--r-- | tools/elftoolchain/Makefile | 5 | ||||
| -rw-r--r-- | tools/elftoolchain/common/sys/Makefile | 41 |
3 files changed, 48 insertions, 1 deletions
diff --git a/tools/Makefile b/tools/Makefile index 5160ae18e9a..5afe3b91b38 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.212 2021/11/14 15:48:02 skrll Exp $ +# $NetBSD: Makefile,v 1.213 2022/04/13 17:52:56 jkoshy Exp $ .include <bsd.own.mk> .include <bsd.endian.mk> @@ -58,6 +58,7 @@ TOOLCHAIN_BITS+= dbsym mdsetimage DTRACE_BITS= .if ${MKDTRACE} != "no" || ${MKCTF} != "no" +DTRACE_BITS+= .WAIT elftoolchain DTRACE_BITS+= .WAIT libelf DTRACE_BITS+= .WAIT libdwarf DTRACE_BITS+= .WAIT libctf diff --git a/tools/elftoolchain/Makefile b/tools/elftoolchain/Makefile new file mode 100644 index 00000000000..21d5ad79cf9 --- /dev/null +++ b/tools/elftoolchain/Makefile @@ -0,0 +1,5 @@ +# $NetBSD: Makefile,v 1.1 2022/04/13 17:52:56 jkoshy Exp $ + +SUBDIR= common + +.include <bsd.subdir.mk> diff --git a/tools/elftoolchain/common/sys/Makefile b/tools/elftoolchain/common/sys/Makefile new file mode 100644 index 00000000000..710b308177f --- /dev/null +++ b/tools/elftoolchain/common/sys/Makefile @@ -0,0 +1,41 @@ +# $NetBSD: Makefile,v 1.1 2022/04/13 17:52:56 jkoshy Exp $ + +.include <bsd.hostinit.mk> + +SRCDIR= ${.CURDIR}/../../../../external/bsd/elftoolchain/dist/common/sys + +.PATH: ${SRCDIR} + +INCS= elfdefinitions.h +HOST_INCSDIR= ${TOOLDIR}/include/sys + +elfdefinitions.h: elfdefinitions.m4 elfconstants.m4 + ${TOOL_M4} -I${SRCDIR} -D SRCDIR=${SRCDIR} ${M4FLAGS} \ + elfdefinitions.m4 > ${.TARGET} + +.PHONY: all clean clobber depend + +install: .PHONY ${HOST_INCSDIR} .WAIT includes + +${HOST_INCSDIR}: + ${_MKTARGET_INSTALL} + ${HOST_INSTALL_DIR} ${HOST_INCSDIR} + +.for _f in ${INCS} +HOST_INCINSTFILES+= ${HOST_INCSDIR}/${_f} +${HOST_INCSDIR}/${_f}: ${_f} + ${_MKTARGET_INSTALL} + ${HOST_INSTALL_FILE} ${.ALLSRC} ${.TARGET} +.endfor + +includes: .PHONY ${HOST_INCSDIR} .WAIT ${HOST_INCINSTFILES} + +all dependall depend: ${INCS} + +clean clobber: + rm -f ${INCS} + +cleandepend: + rm -f ${.OBJDIR}/.depend + +.include <bsd.obj.mk> |
