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-09-10 18:39:00 +1000 |
commit | 61513888f6a546440d955a05a68004a86578746c (patch) | |
tree | b6feaabc029f3c60d1f4e9b209602601b2e04725 | |
parent | 69cad8a142db93606478534c9e57bfef0e36d260 (diff) | |
download | busybox-w32-61513888f6a546440d955a05a68004a86578746c.tar.gz busybox-w32-61513888f6a546440d955a05a68004a86578746c.tar.bz2 busybox-w32-61513888f6a546440d955a05a68004a86578746c.zip |
Makefile: support building executable with extension
-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 | ||