linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] iw: fix android build
@ 2015-01-06 10:48 Arik Nemtsov
  2015-01-06 11:09 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Arik Nemtsov @ 2015-01-06 10:48 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg, Arik Nemtsov

Don't define "iw" build target in the regular Makefile which gets
included. This confuses the Android build system (coincides with module
name).

Also correct libnl_2 to a be static library, as compiled on Android.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
---
 Android.mk | 3 ++-
 Makefile   | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/Android.mk b/Android.mk
index 8afda1d..735b236 100644
--- a/Android.mk
+++ b/Android.mk
@@ -3,6 +3,7 @@ IW_SOURCE_DIR := $(LOCAL_PATH)
 
 include $(CLEAR_VARS)
 
+IW_ANDROID_BUILD=y
 NO_PKG_CONFIG=y
 include $(LOCAL_PATH)/Makefile
 
@@ -16,7 +17,7 @@ LOCAL_CFLAGS += -DCONFIG_LIBNL20
 LOCAL_LDFLAGS := -Wl,--no-gc-sections
 #LOCAL_MODULE_TAGS := optional
 LOCAL_MODULE_TAGS := eng
-LOCAL_SHARED_LIBRARIES := libnl_2
+LOCAL_STATIC_LIBRARIES := libnl_2
 LOCAL_MODULE := iw
 
 $(IW_SOURCE_DIR)/version.c:
diff --git a/Makefile b/Makefile
index 5bf955d..58755dc 100644
--- a/Makefile
+++ b/Makefile
@@ -101,9 +101,11 @@ version.c: version.sh $(patsubst %.o,%.c,$(VERSION_OBJS)) nl80211.h iw.h Makefil
 	@$(NQ) ' CC  ' $@
 	$(Q)$(CC) $(CFLAGS) -c -o $@ $<
 
+ifeq ($(IW_ANDROID_BUILD),)
 iw:	$(OBJS)
 	@$(NQ) ' CC  ' iw
 	$(Q)$(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o iw
+endif
 
 check:
 	$(Q)$(MAKE) all CC="REAL_CC=$(CC) CHECK=\"sparse -Wall\" cgcc"
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] iw: fix android build
  2015-01-06 10:48 [PATCH v2] iw: fix android build Arik Nemtsov
@ 2015-01-06 11:09 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2015-01-06 11:09 UTC (permalink / raw)
  To: Arik Nemtsov; +Cc: linux-wireless

On Tue, 2015-01-06 at 12:48 +0200, Arik Nemtsov wrote:
> Don't define "iw" build target in the regular Makefile which gets
> included. This confuses the Android build system (coincides with module
> name).
> 
> Also correct libnl_2 to a be static library, as compiled on Android.

Applied, thanks.

johannes


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-01-06 11:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-06 10:48 [PATCH v2] iw: fix android build Arik Nemtsov
2015-01-06 11:09 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).