]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
iw: fix android build
authorArik Nemtsov <arik@wizery.com>
Tue, 6 Jan 2015 10:48:45 +0000 (12:48 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 6 Jan 2015 11:09:05 +0000 (12:09 +0100)
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>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Android.mk
Makefile

index 8afda1d291e1f62d9201d78d4e38ae6258ba251e..735b236809ef31748b2e7684cf4b4a590f40c413 100644 (file)
@@ -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:
index 5bf955d4f2685556cd8a6c8fdf31dd749efdbd7e..58755dc49b3e07fc84aecb515343f7bfcc8f889e 100644 (file)
--- 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"