]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
add Android build system
authorJohannes Berg <johannes.berg@intel.com>
Thu, 25 Apr 2013 06:43:39 +0000 (08:43 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 25 Apr 2013 07:05:18 +0000 (09:05 +0200)
Unfortunately Android's libnl doesn't have nla_put_flag()
so add a simple source file to declare that for now.

Android.mk [new file with mode: 0644]
android-nl.c [new file with mode: 0644]

diff --git a/Android.mk b/Android.mk
new file mode 100644 (file)
index 0000000..8afda1d
--- /dev/null
@@ -0,0 +1,25 @@
+LOCAL_PATH := $(call my-dir)
+IW_SOURCE_DIR := $(LOCAL_PATH)
+
+include $(CLEAR_VARS)
+
+NO_PKG_CONFIG=y
+include $(LOCAL_PATH)/Makefile
+
+LOCAL_SRC_FILES := $(patsubst %.o,%.c,$(OBJS)) android-nl.c
+
+LOCAL_C_INCLUDES := \
+       $(LOCAL_PATH) \
+       external/libnl-headers/
+
+LOCAL_CFLAGS += -DCONFIG_LIBNL20
+LOCAL_LDFLAGS := -Wl,--no-gc-sections
+#LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_TAGS := eng
+LOCAL_SHARED_LIBRARIES := libnl_2
+LOCAL_MODULE := iw
+
+$(IW_SOURCE_DIR)/version.c:
+       $(IW_SOURCE_DIR)/version.sh $(IW_SOURCE_DIR)/version.c
+
+include $(BUILD_EXECUTABLE)
diff --git a/android-nl.c b/android-nl.c
new file mode 100644 (file)
index 0000000..d216f5f
--- /dev/null
@@ -0,0 +1,6 @@
+#include <netlink/attr.h>
+
+int nla_put_flag(struct nl_msg *msg, int flag)
+{
+       return nla_put(msg, flag, 0, NULL);
+}