diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-07-30 17:35:08 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-08-07 06:13:52 +0200 |
commit | 0a1167029dbfb21a6ea15ca6d2f5e6a749471126 (patch) | |
tree | b8697dc01d9820042e9053c2c0cb067f28062ae6 /scripts/dtc/Makefile | |
parent | fb60ba388b892518c6a4e599565627bf1fcb8861 (diff) | |
download | barebox-0a1167029dbfb21a6ea15ca6d2f5e6a749471126.tar.gz barebox-0a1167029dbfb21a6ea15ca6d2f5e6a749471126.tar.xz |
dtc: compile fdtget
We need fdtget in subsequent patches, so compile it.
Unfortunately this is not straight forward. fdtget needs libfdt,
but the Kernel Build System is not prepared for compiling
libraries for the host or binaries from files in multiple directories.
This patch moves the libfdt files to the dtc toplevel directory and
compiles fdtget as a binary from multiple source files but from
the same directory.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts/dtc/Makefile')
-rw-r--r-- | scripts/dtc/Makefile | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile index 2a48022c41..05973b12aa 100644 --- a/scripts/dtc/Makefile +++ b/scripts/dtc/Makefile @@ -1,15 +1,20 @@ # scripts/dtc makefile -hostprogs-y := dtc +hostprogs-y := dtc fdtget always := $(hostprogs-y) dtc-objs := dtc.o flattree.o fstree.o data.o livetree.o treesource.o \ srcpos.o checks.o util.o dtc-objs += dtc-lexer.lex.o dtc-parser.tab.o +libfdt-objs = fdt.o fdt_ro.o fdt_strerror.o fdt_wip.o +libfdt-objs += fdt_empty_tree.o fdt_rw.o fdt_sw.o + +fdtget-objs += fdtget.o $(libfdt-objs) util.o + # Source files need to get at the userspace version of libfdt_env.h to compile -HOSTCFLAGS_DTC := -I$(src) -I$(src)/libfdt +HOSTCFLAGS_DTC := -I$(src) HOSTCFLAGS_checks.o := $(HOSTCFLAGS_DTC) HOSTCFLAGS_data.o := $(HOSTCFLAGS_DTC) @@ -21,6 +26,15 @@ HOSTCFLAGS_srcpos.o := $(HOSTCFLAGS_DTC) HOSTCFLAGS_treesource.o := $(HOSTCFLAGS_DTC) HOSTCFLAGS_util.o := $(HOSTCFLAGS_DTC) +HOSTCFLAGS_fdt.o := $(HOSTCFLAGS_DTC) +HOSTCFLAGS_fdt_ro.o := $(HOSTCFLAGS_DTC) +HOSTCFLAGS_fdt_strerror.o := $(HOSTCFLAGS_DTC) +HOSTCFLAGS_fdt_wip.o := $(HOSTCFLAGS_DTC) +HOSTCFLAGS_fdt_empty_tree.o := $(HOSTCFLAGS_DTC) +HOSTCFLAGS_fdt_rw.o := $(HOSTCFLAGS_DTC) +HOSTCFLAGS_fdt_sw.o := $(HOSTCFLAGS_DTC) +HOSTCFLAGS_fdtget.o := $(HOSTCFLAGS_DTC) + HOSTCFLAGS_dtc-lexer.lex.o := $(HOSTCFLAGS_DTC) HOSTCFLAGS_dtc-parser.tab.o := $(HOSTCFLAGS_DTC) |