diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-04-14 11:22:51 +0200 |
---|---|---|
committer | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-04-19 19:24:10 +0200 |
commit | 1fbed50fc5c3063b08d5e3fa884a6387956e8bde (patch) | |
tree | 83ca87e5af22a181e3405617a0f006c47e65d329 | |
parent | e8fb549ff78bf8ac596b6381d3bd76f98631932c (diff) | |
download | busybox-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-- | Makefile | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -311,6 +311,7 @@ AFLAGS_MODULE = $(MODFLAGS) | |||
311 | LDFLAGS_MODULE = -r | 311 | LDFLAGS_MODULE = -r |
312 | CFLAGS_KERNEL = | 312 | CFLAGS_KERNEL = |
313 | AFLAGS_KERNEL = | 313 | AFLAGS_KERNEL = |
314 | EXEEXT = | ||
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 |
519 | all: busybox doc | 520 | all: 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) | |||
699 | endif # ifdef CONFIG_KALLSYMS | 700 | endif # ifdef CONFIG_KALLSYMS |
700 | 701 | ||
701 | # busybox image - including updated kernel symbols | 702 | # busybox image - including updated kernel symbols |
702 | busybox_unstripped: $(busybox-all) FORCE | 703 | busybox_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 | ||
706 | busybox: busybox_unstripped | 707 | busybox$(EXEEXT): busybox_unstripped$(EXEEXT) |
707 | ifeq ($(SKIP_STRIP),y) | 708 | ifeq ($(SKIP_STRIP),y) |
708 | $(Q)cp $< $@ | 709 | $(Q)cp $< $@ |
709 | else | 710 | else |
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 $@ |
714 | endif | 715 | endif |
@@ -944,7 +945,7 @@ endif # CONFIG_MODULES | |||
944 | 945 | ||
945 | # Directories & files removed with 'make clean' | 946 | # Directories & files removed with 'make clean' |
946 | CLEAN_DIRS += $(MODVERDIR) _install 0_lib | 947 | CLEAN_DIRS += $(MODVERDIR) _install 0_lib |
947 | CLEAN_FILES += busybox busybox_unstripped* busybox.links \ | 948 | CLEAN_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 | ||