Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]>
---
 Makefile        |   15 ++++++++-------
 Makefile.custom |   22 +++++++++++-----------
 2 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/Makefile b/Makefile
index 1481f01..a40be79 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@ PATCHLEVEL = 17
 SUBLEVEL = 0
 EXTRAVERSION = .git
 NAME = Unnamed
+X =
 
 # *DOCUMENTATION*
 # To see a list of typical targets execute "make help"
@@ -516,7 +517,7 @@ endif
 # command line.
 # This allow a user to issue only 'make' to build a kernel including modules
 # Defaults busybox but it is usually overridden in the arch makefile
-all: busybox doc
+all: busybox$(X) doc
 
 -include $(srctree)/arch/$(ARCH)/Makefile
 
@@ -699,16 +700,16 @@ debug_kallsyms: .tmp_map$(last_kallsyms)
 endif # ifdef CONFIG_KALLSYMS
 
 # busybox image - including updated kernel symbols
-busybox_unstripped: $(busybox-all) FORCE
+busybox_unstripped$(X): $(busybox-all) FORCE
 	$(call if_changed_rule,busybox__)
 	$(Q)rm -f .old_version
 
-busybox: busybox_unstripped
+busybox$(X): busybox_unstripped$(X)
 ifeq ($(SKIP_STRIP),y)
 	$(Q)cp $< $@
 else
 	$(Q)$(STRIP) -s --remove-section=.note --remove-section=.comment \
-		busybox_unstripped -o $@
+		busybox_unstripped$(X) -o $@
 # strip is confused by PIE executable and does not set exec bits
 	$(Q)chmod a+x $@
 endif
@@ -944,7 +945,7 @@ endif # CONFIG_MODULES
 
 # Directories & files removed with 'make clean'
 CLEAN_DIRS  += $(MODVERDIR) _install 0_lib
-CLEAN_FILES +=	busybox busybox_unstripped* busybox.links \
+CLEAN_FILES +=	busybox$(X) busybox_unstripped* busybox.links \
                 System.map .kernelrelease \
                 .tmp_kallsyms* .tmp_version .tmp_busybox* .tmp_System.map
 
@@ -957,7 +958,7 @@ MRPROPER_FILES += .config .config.old include/asm .version .old_version \
 		  include/applet_tables.h \
 		  applets/usage \
 		  .kernelrelease Module.symvers tags TAGS cscope* \
-		  busybox_old
+		  busybox_old$(X)
 
 # clean - Delete most, but leave enough to build external modules
 #
@@ -1234,7 +1235,7 @@ endif #ifeq ($(mixed-targets),1)
 
 PHONY += checkstack
 checkstack:
-	$(OBJDUMP) -d busybox $$(find . -name '*.ko') | \
+	$(OBJDUMP) -d busybox$(X) $$(find . -name '*.ko') | \
 	$(PERL) $(src)/scripts/checkstack.pl $(ARCH)
 
 kernelrelease:
diff --git a/Makefile.custom b/Makefile.custom
index ecba6bd..857ccf4 100644
--- a/Makefile.custom
+++ b/Makefile.custom
@@ -81,29 +81,29 @@ checkhelp:
 		$(patsubst %,$(srctree)/%,$(wildcard $(patsubst %,%/Config.in,$(busybox-dirs) ./)))
 
 .PHONY: sizes
-sizes: busybox_unstripped
+sizes: busybox_unstripped$(X)
 	$(NM) --size-sort $(<)
 
 .PHONY: bloatcheck
-bloatcheck: busybox_old busybox_unstripped
-	@$(srctree)/scripts/bloat-o-meter busybox_old busybox_unstripped
-	@$(CROSS_COMPILE)size busybox_old busybox_unstripped
+bloatcheck: busybox_old$(X) busybox_unstripped$(X)
+	@$(srctree)/scripts/bloat-o-meter busybox_old$(X) busybox_unstripped$(X)
+	@$(CROSS_COMPILE)size busybox_old$(X) busybox_unstripped$(X)
 
 .PHONY: baseline
-baseline: busybox_unstripped
-	@mv busybox_unstripped busybox_old
+baseline: busybox_unstripped$(X)
+	@mv busybox_unstripped$(X) busybox_old$(X)
 
 .PHONY: objsizes
-objsizes: busybox_unstripped
+objsizes: busybox_unstripped$(X)
 	$(srctree)/scripts/objsizes
 
 .PHONY: stksizes
-stksizes: busybox_unstripped
-	$(CROSS_COMPILE)objdump -d busybox_unstripped | $(srctree)/scripts/checkstack.pl $(ARCH) | uniq
+stksizes: busybox_unstripped$(X)
+	$(CROSS_COMPILE)objdump -d busybox_unstripped$(X) | $(srctree)/scripts/checkstack.pl $(ARCH) | uniq
 
 .PHONY: bigdata
-bigdata: busybox_unstripped
-	$(CROSS_COMPILE)nm --size-sort busybox_unstripped | grep -vi ' [trw] '
+bigdata: busybox_unstripped$(X)
+	$(CROSS_COMPILE)nm --size-sort busybox_unstripped$(X) | grep -vi ' [trw] '
 
 # Documentation Targets
 .PHONY: doc
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to