diff options
author | Rob Walker <rwalker@rwalker.com> | 2012-03-07 12:25:53 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2012-03-07 12:25:53 +0100 |
commit | bf6343796e834183ff1b0c1b9416676e8488afa5 (patch) | |
tree | e11f8b6ebc11f3d7223716f523d87eb07fef7263 /Makefile.flags | |
parent | 69d81a1c1b2e4881b751ee24f8eb70c0dfaa05d9 (diff) | |
download | busybox-w32-bf6343796e834183ff1b0c1b9416676e8488afa5.tar.gz busybox-w32-bf6343796e834183ff1b0c1b9416676e8488afa5.tar.bz2 busybox-w32-bf6343796e834183ff1b0c1b9416676e8488afa5.zip |
Add SYSROOT, EXTRA_{LDFLAGS,LDLIBS} config opts; sample Android NDK config
Signed-off-by: Rob Walker <rwalker@rwalker.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'Makefile.flags')
-rw-r--r-- | Makefile.flags | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Makefile.flags b/Makefile.flags index ee4c518d8..68dfa57ec 100644 --- a/Makefile.flags +++ b/Makefile.flags | |||
@@ -104,6 +104,11 @@ else | |||
104 | LDLIBS += m | 104 | LDLIBS += m |
105 | endif | 105 | endif |
106 | 106 | ||
107 | ifneq ($(CONFIG_SYSROOT),) | ||
108 | CFLAGS += --sysroot=$(CONFIG_SYSROOT) | ||
109 | export SYSROOT=$(CONFIG_SYSROOT) | ||
110 | endif | ||
111 | |||
107 | ifeq ($(CONFIG_PAM),y) | 112 | ifeq ($(CONFIG_PAM),y) |
108 | # libpam uses libpthread, so for static builds busybox must be linked to | 113 | # libpam uses libpthread, so for static builds busybox must be linked to |
109 | # libpthread. On some platforms that requires an explicit -lpthread, so | 114 | # libpthread. On some platforms that requires an explicit -lpthread, so |
@@ -137,6 +142,16 @@ ifneq (,$(findstring $(W_ELF2FLT),$(LDFLAGS) $(CFLAGS_busybox))) | |||
137 | SKIP_STRIP = y | 142 | SKIP_STRIP = y |
138 | endif | 143 | endif |
139 | 144 | ||
145 | ifneq ($(CONFIG_EXTRA_LDFLAGS),) | ||
146 | EXTRA_LDFLAGS += $(strip $(subst ",,$(CONFIG_EXTRA_LDFLAGS))) | ||
147 | #")) | ||
148 | endif | ||
149 | |||
150 | ifneq ($(CONFIG_EXTRA_LDLIBS),) | ||
151 | LDLIBS += $(strip $(subst ",,$(CONFIG_EXTRA_LDLIBS))) | ||
152 | #")) | ||
153 | endif | ||
154 | |||
140 | # Busybox is a stack-fatty so make sure we increase default size | 155 | # Busybox is a stack-fatty so make sure we increase default size |
141 | # TODO: use "make stksizes" to find & fix big stack users | 156 | # TODO: use "make stksizes" to find & fix big stack users |
142 | # (we stole scripts/checkstack.pl from the kernel... thanks guys!) | 157 | # (we stole scripts/checkstack.pl from the kernel... thanks guys!) |