[PATCH 1/8] Makefile.lib: add disasm and ln commands

Sascha Hauer s.hauer at pengutronix.de
Sun Aug 12 10:22:39 EDT 2012


disasm: For generating an disasssembly of an ELF file
ln: For creating a softlink

Use the disasm command for generating barebox.S

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 Makefile             |    4 +---
 scripts/Makefile.lib |    6 ++++++
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index ce1506c..06a94c3 100644
--- a/Makefile
+++ b/Makefile
@@ -254,6 +254,7 @@ MAKEFLAGS += --include-dir=$(srctree)
 
 # We need some generic definitions.
 include $(srctree)/scripts/Kbuild.include
+include $(srctree)/scripts/Makefile.lib
 
 # Make variables (CC, etc...)
 
@@ -703,9 +704,6 @@ endif
 	@echo " * Init Calls content" >> barebox.S
 	$(Q)$(OBJDUMP) -j .barebox_initcalls -d barebox >> barebox.S
 else
-quiet_cmd_disasm = DISASM  $@
-      cmd_disasm = $(OBJDUMP) -d $< > $@
-
 barebox.S: barebox FORCE
 	$(call if_changed,disasm)
 endif
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 1a5b2b5..cb46db2 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -242,3 +242,9 @@ quiet_cmd_xzmisc = XZMISC  $@
 cmd_xzmisc = (cat $(filter-out FORCE,$^) | \
 	xz --check=crc32 --lzma2=dict=1MiB) > $@ || \
 	(rm -f $@ ; false)
+
+quiet_cmd_disasm = DISASM  $@
+cmd_disasm = $(OBJDUMP) -d $< > $@
+
+quiet_cmd_ln = LN      $@
+cmd_ln = ln -sf $< $@
-- 
1.7.10.4




More information about the barebox mailing list