aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--Makefile.custom2
-rw-r--r--include/bb_config.h6
-rwxr-xr-xscripts/mkmakefile36
4 files changed, 46 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 4b49208d1..d85eb8a63 100644
--- a/Makefile
+++ b/Makefile
@@ -565,7 +565,7 @@ busybox-all := $(core-y) $(libs-y)
565# Rule to link busybox - also used during CONFIG_KALLSYMS 565# Rule to link busybox - also used during CONFIG_KALLSYMS
566# May be overridden by arch/$(ARCH)/Makefile 566# May be overridden by arch/$(ARCH)/Makefile
567quiet_cmd_busybox__ ?= LINK $@ 567quiet_cmd_busybox__ ?= LINK $@
568 cmd_busybox__ ?= scripts/trylink $(CC) -o $@ \ 568 cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) -o $@ \
569 -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \ 569 -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
570 -Wl,--start-group $(busybox-all) -Wl,--end-group \ 570 -Wl,--start-group $(busybox-all) -Wl,--end-group \
571 571
@@ -798,10 +798,10 @@ include/config/MARKER: scripts/basic/split-include include/autoconf.h
798 @echo ' SPLIT include/autoconf.h -> include/config/*' 798 @echo ' SPLIT include/autoconf.h -> include/config/*'
799 @scripts/basic/split-include include/autoconf.h include/config 799 @scripts/basic/split-include include/autoconf.h include/config
800 @echo ' GEN include/bbconfigopts.h' 800 @echo ' GEN include/bbconfigopts.h'
801 @scripts/mkconfigs >include/bbconfigopts.h 801 @$(srctree)/scripts/mkconfigs >include/bbconfigopts.h
802 @$(MAKE) $(build)=scripts 802 @$(MAKE) $(build)=scripts
803 @echo ' GEN include/usage_compressed.h' 803 @echo ' GEN include/usage_compressed.h'
804 @scripts/usage_compressed include/usage_compressed.h scripts 804 @$(srctree)/scripts/usage_compressed include/usage_compressed.h scripts
805 @touch $@ 805 @touch $@
806 806
807# Generate some files 807# Generate some files
diff --git a/Makefile.custom b/Makefile.custom
index 6880b97d6..c0984e17a 100644
--- a/Makefile.custom
+++ b/Makefile.custom
@@ -78,7 +78,7 @@ baseline: busybox_unstripped
78 78
79.PHONY: objsizes 79.PHONY: objsizes
80objsizes: busybox_unstripped 80objsizes: busybox_unstripped
81 $(SHELL) $(srctree)/scripts/objsizes 81 $(srctree)/scripts/objsizes
82 82
83# Documentation Targets 83# Documentation Targets
84.PHONY: doc 84.PHONY: doc
diff --git a/include/bb_config.h b/include/bb_config.h
index beec07cba..1f96026fd 100644
--- a/include/bb_config.h
+++ b/include/bb_config.h
@@ -2,6 +2,12 @@
2 * which depend on other symbols, which themself are off. 2 * which depend on other symbols, which themself are off.
3 * Provide them here by hand. Need a better idea. */ 3 * Provide them here by hand. Need a better idea. */
4 4
5#ifndef ENABLE_FEATURE_GUNZIP_UNCOMPRESS
6#define ENABLE_FEATURE_GUNZIP_UNCOMPRESS 0
7#define USE_FEATURE_GUNZIP_UNCOMPRESS(...)
8#define SKIP_FEATURE_GUNZIP_UNCOMPRESS(...) __VA_ARGS__
9#endif
10
5#ifndef ENABLE_KILLALL5 11#ifndef ENABLE_KILLALL5
6#define ENABLE_KILLALL5 0 12#define ENABLE_KILLALL5 0
7#define USE_KILLALL5(...) 13#define USE_KILLALL5(...)
diff --git a/scripts/mkmakefile b/scripts/mkmakefile
new file mode 100755
index 000000000..7f9d544f9
--- /dev/null
+++ b/scripts/mkmakefile
@@ -0,0 +1,36 @@
1#!/bin/sh
2# Generates a small Makefile used in the root of the output
3# directory, to allow make to be started from there.
4# The Makefile also allow for more convinient build of external modules
5
6# Usage
7# $1 - Kernel src directory
8# $2 - Output directory
9# $3 - version
10# $4 - patchlevel
11
12
13test ! -r $2/Makefile -o -O $2/Makefile || exit 0
14echo " GEN $2/Makefile"
15
16cat << EOF > $2/Makefile
17# Automatically generated by $0: don't edit
18
19VERSION = $3
20PATCHLEVEL = $4
21
22KERNELSRC := $1
23KERNELOUTPUT := $2
24
25MAKEFLAGS += --no-print-directory
26
27.PHONY: all \$(MAKECMDGOALS)
28
29all:
30 \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT)
31
32Makefile:;
33
34\$(filter-out all Makefile,\$(MAKECMDGOALS)) %/:
35 \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$@
36EOF