aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-04-14 11:22:51 +0200
committerNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-04-19 19:24:10 +0200
commit1fbed50fc5c3063b08d5e3fa884a6387956e8bde (patch)
tree83ca87e5af22a181e3405617a0f006c47e65d329
parente8fb549ff78bf8ac596b6381d3bd76f98631932c (diff)
downloadbusybox-w32-1fbed50fc5c3063b08d5e3fa884a6387956e8bde.tar.gz
busybox-w32-1fbed50fc5c3063b08d5e3fa884a6387956e8bde.tar.bz2
busybox-w32-1fbed50fc5c3063b08d5e3fa884a6387956e8bde.zip
Makefile: support building executable with extension
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
-rw-r--r--Makefile11
1 files changed, 6 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 1481f0100..91cfd3cdc 100644
--- a/Makefile
+++ b/Makefile
@@ -311,6 +311,7 @@ AFLAGS_MODULE = $(MODFLAGS)
311LDFLAGS_MODULE = -r 311LDFLAGS_MODULE = -r
312CFLAGS_KERNEL = 312CFLAGS_KERNEL =
313AFLAGS_KERNEL = 313AFLAGS_KERNEL =
314EXEEXT =
314 315
315 316
316# Use LINUXINCLUDE when you must reference the include/ directory. 317# Use LINUXINCLUDE when you must reference the include/ directory.
@@ -516,7 +517,7 @@ endif
516# command line. 517# command line.
517# This allow a user to issue only 'make' to build a kernel including modules 518# This allow a user to issue only 'make' to build a kernel including modules
518# Defaults busybox but it is usually overridden in the arch makefile 519# Defaults busybox but it is usually overridden in the arch makefile
519all: busybox doc 520all: busybox$(EXEEXT) doc
520 521
521-include $(srctree)/arch/$(ARCH)/Makefile 522-include $(srctree)/arch/$(ARCH)/Makefile
522 523
@@ -699,16 +700,16 @@ debug_kallsyms: .tmp_map$(last_kallsyms)
699endif # ifdef CONFIG_KALLSYMS 700endif # ifdef CONFIG_KALLSYMS
700 701
701# busybox image - including updated kernel symbols 702# busybox image - including updated kernel symbols
702busybox_unstripped: $(busybox-all) FORCE 703busybox_unstripped$(EXEEXT): $(busybox-all) FORCE
703 $(call if_changed_rule,busybox__) 704 $(call if_changed_rule,busybox__)
704 $(Q)rm -f .old_version 705 $(Q)rm -f .old_version
705 706
706busybox: busybox_unstripped 707busybox$(EXEEXT): busybox_unstripped$(EXEEXT)
707ifeq ($(SKIP_STRIP),y) 708ifeq ($(SKIP_STRIP),y)
708 $(Q)cp $< $@ 709 $(Q)cp $< $@
709else 710else
710 $(Q)$(STRIP) -s --remove-section=.note --remove-section=.comment \ 711 $(Q)$(STRIP) -s --remove-section=.note --remove-section=.comment \
711 busybox_unstripped -o $@ 712 busybox_unstripped$(EXEEXT) -o $@
712# strip is confused by PIE executable and does not set exec bits 713# strip is confused by PIE executable and does not set exec bits
713 $(Q)chmod a+x $@ 714 $(Q)chmod a+x $@
714endif 715endif
@@ -944,7 +945,7 @@ endif # CONFIG_MODULES
944 945
945# Directories & files removed with 'make clean' 946# Directories & files removed with 'make clean'
946CLEAN_DIRS += $(MODVERDIR) _install 0_lib 947CLEAN_DIRS += $(MODVERDIR) _install 0_lib
947CLEAN_FILES += busybox busybox_unstripped* busybox.links \ 948CLEAN_FILES += busybox$(EXEEXT) busybox_unstripped* busybox.links \
948 System.map .kernelrelease \ 949 System.map .kernelrelease \
949 .tmp_kallsyms* .tmp_version .tmp_busybox* .tmp_System.map 950 .tmp_kallsyms* .tmp_version .tmp_busybox* .tmp_System.map
950 951