summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 19 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index b217fdda1f11..daf376f30a08 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,8 @@
-# $Id: Makefile 3016 2014-04-10 16:01:42Z jkoshy $
+# $Id: Makefile 3382 2016-01-31 12:31:08Z jkoshy $
TOP= .
+.include "${TOP}/mk/elftoolchain.components.mk"
.include "${TOP}/mk/elftoolchain.os.mk"
# Build configuration information first.
@@ -13,10 +14,14 @@ SUBDIR += libdwarf
# Build additional APIs.
SUBDIR += libelftc
+.if defined(WITH_PE) && ${WITH_PE:tl} == "yes"
+SUBDIR += libpe
+.endif
-# Build the tools needed for the rest of the build.
-
-# SUBDIR += isa # ('isa' does not build on all platforms yet).
+# The instruction set analyser.
+.if defined(WITH_ISA) && ${WITH_ISA:tl} == "yes"
+SUBDIR += isa # ('isa' does not build on all platforms yet).
+.endif
# Build tools after the libraries.
SUBDIR += addr2line
@@ -26,6 +31,7 @@ SUBDIR += cxxfilt
SUBDIR += elfcopy
SUBDIR += elfdump
SUBDIR += findtextrel
+SUBDIR += ld
SUBDIR += nm
SUBDIR += readelf
SUBDIR += size
@@ -33,12 +39,18 @@ SUBDIR += strings
SUBDIR += tools
# Build the test suites.
-.if exists(${.CURDIR}/test) && defined(MKTESTS) && ${MKTESTS} == "yes"
+.if exists(${.CURDIR}/test) && defined(WITH_TESTS) && ${WITH_TESTS:tl} == "yes"
SUBDIR += test
.endif
+# Build additional build tooling.
+.if defined(WITH_BUILD_TOOLS) && ${WITH_BUILD_TOOLS:tl} == "yes"
+SUBDIR += tools
+.endif
+
# Build documentation at the end.
-.if exists(${.CURDIR}/documentation) && defined(MKDOC) && ${MKDOC} == "yes"
+.if exists(${.CURDIR}/documentation) && defined(WITH_DOCUMENTATION) && \
+ ${WITH_DOCUMENTATION:tl} == "yes"
SUBDIR += documentation
.endif
@@ -49,7 +61,7 @@ SUBDIR += documentation
#
# Run the test suites.
-.if exists(${.CURDIR}/test) && defined(MKTESTS) && ${MKTESTS} == "yes"
+.if exists(${.CURDIR}/test) && defined(WITH_TESTS) && ${WITH_TESTS:tl} == "yes"
run-tests: all .PHONY
(cd ${.CURDIR}/test; ${MAKE} test)
.endif