diff options
author | Dan Willemsen <dwillemsen@google.com> | 2018-11-16 13:18:44 -0800 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2018-11-16 13:43:57 -0800 |
commit | 5d3caffc8876476c930ba432ac7c3e4fdb7c936a (patch) | |
tree | 3b6d2f9c5060e8e0ab1ce25dee65c66fe7d7926b | |
parent | 63d8bad2a5a8a9b443595762233692c5f6a6d36b (diff) | |
download | platform_external_iw-5d3caffc8876476c930ba432ac7c3e4fdb7c936a.tar.gz platform_external_iw-5d3caffc8876476c930ba432ac7c3e4fdb7c936a.tar.bz2 platform_external_iw-5d3caffc8876476c930ba432ac7c3e4fdb7c936a.zip |
Convert to Android.bpandroid-wear-8.0.0_r2android-n-iot-release-ihome-igv1nougat-iot-release
See build/soong/README.md for more information.
iw has been added to PRODUCT_PACKAGES_DEBUG in base_system.mk, since
debug tagging is not supported by Soong.
Test: cd external/iw; mma
Test: manually inspect version.c
Change-Id: I85af5606faff0209b22d6dc744315d3c05bbd234
-rw-r--r-- | Android.bp | 62 | ||||
-rw-r--r-- | Android.mk | 36 |
2 files changed, 62 insertions, 36 deletions
diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..c3b4f26 --- /dev/null +++ b/Android.bp @@ -0,0 +1,62 @@ +genrule { + name: "iw_version", + cmd: "echo '#include \"iw.h\"' >$(out) && " + + "echo \"const char iw_version[] = $$(grep ^VERSION $(location version.sh) | sed \"s/VERSION=//\");\" >>$(out)", + srcs: ["version.sh"], + out: ["version.c"], +} + +cc_binary { + name: "iw", + + srcs: [ + "iw.c", + "genl.c", + "event.c", + "info.c", + "phy.c", + "interface.c", + "ibss.c", + "station.c", + "survey.c", + "util.c", + "ocb.c", + "mesh.c", + "mpath.c", + "mpp.c", + "scan.c", + "reg.c", + "reason.c", + "status.c", + "connect.c", + "link.c", + "offch.c", + "ps.c", + "cqm.c", + "bitrate.c", + "wowlan.c", + "coalesce.c", + "roc.c", + "p2p.c", + "vendor.c", + "sections.c", + + ":iw_version", + ], + + cflags: [ + "-D_GNU_SOURCE", + "-DCONFIG_LIBNL20", + + // Silence some warnings for now. Needs to be fixed upstream. b/26105799 + "-Wno-unused-parameter", + "-Wno-sign-compare", + "-Wno-format", + "-Wno-absolute-value", + "-Wno-enum-conversion", + "-Werror", + ], + + ldflags: ["-Wl,--no-gc-sections"], + static_libs: ["libnl"], +} diff --git a/Android.mk b/Android.mk deleted file mode 100644 index bd5fa96..0000000 --- a/Android.mk +++ /dev/null @@ -1,36 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := \ - iw.c genl.c event.c info.c phy.c \ - interface.c ibss.c station.c survey.c util.c ocb.c \ - mesh.c mpath.c mpp.c scan.c reg.c \ - reason.c status.c connect.c link.c offch.c ps.c cqm.c \ - bitrate.c wowlan.c coalesce.c roc.c p2p.c vendor.c \ - sections.c - -LOCAL_CFLAGS += -D_GNU_SOURCE -DCONFIG_LIBNL20 - -# Silence some warnings for now. Needs to be fixed upstream. b/26105799 -LOCAL_CFLAGS += -Wno-unused-parameter \ - -Wno-sign-compare \ - -Wno-format \ - -Wno-absolute-value \ - -Werror -LOCAL_CLANG_CFLAGS += -Wno-enum-conversion - -LOCAL_LDFLAGS := -Wl,--no-gc-sections -LOCAL_MODULE_TAGS := debug -LOCAL_STATIC_LIBRARIES := libnl -LOCAL_MODULE := iw - -LOCAL_MODULE_CLASS := EXECUTABLES -LOCAL_GENERATED_SOURCES := $(local-generated-sources-dir)/version.c -$(LOCAL_GENERATED_SOURCES) : $(LOCAL_PATH)/version.sh - @echo "Generated: $@" - @mkdir -p $(dir $@) - $(hide) echo '#include "iw.h"' >$@ - $(hide) echo "const char iw_version[] = $$(grep ^VERSION $< | sed "s/VERSION=//");" >>$@ - -include $(BUILD_EXECUTABLE) |