aboutsummaryrefslogtreecommitdiff
path: root/Android.mk
diff options
context:
space:
mode:
authorFilipe Brandenburger <filbranden@google.com>2015-08-10 18:07:37 -0700
committerYing Wang <wangying@google.com>2015-08-10 18:32:17 -0700
commit1179fd8dff9668cf12f32036d1e011bf1ee71f74 (patch)
treec3599b8b27836650243697fffa115bd5cc24f7cc /Android.mk
parent58714c471e7635d44ac4cf391198c6aca7cfadeb (diff)
downloadiw-1179fd8dff9668cf12f32036d1e011bf1ee71f74.tar.gz
iw: Remove include of Makefile to avoid definition of invalid rulesbrillo-m7-releasebrillo-m7-mr-devbrillo-m7-dev
This can be harmful for rules such as "clean" and implicit make rules defined in iw's Makefile, such as "%.o", etc. The problem was detected from this build warning: build/core/main.mk:1045: warning: overriding commands for target `clean' external/iw/Makefile:126: warning: ignoring old commands for target `clean' Fix it by removing the include of Makefile in Android.mk. For now, this creates even more duplication between the two files, in the future we can try to prevent that by factoring out common code (such as the list of *.o files, cflags, etc.) into a "common" file that can be included in both makefiles. TEST=Build iw from the AOSP tree and confirm it is built correctly. Confirmed that the warning about the "clean" rule is gone. Change-Id: Ia927a71edbf0243dc0074a0ac6f6aa583ce636c5
Diffstat (limited to 'Android.mk')
-rw-r--r--Android.mk20
1 files changed, 12 insertions, 8 deletions
diff --git a/Android.mk b/Android.mk
index db77a49..53186f9 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1,13 +1,14 @@
LOCAL_PATH := $(call my-dir)
-IW_SOURCE_DIR := $(LOCAL_PATH)
include $(CLEAR_VARS)
-IW_ANDROID_BUILD=y
-NO_PKG_CONFIG=y
-include $(LOCAL_PATH)/Makefile
-
-LOCAL_SRC_FILES := $(patsubst %.o,%.c,$(OBJS))
+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 += -DCONFIG_LIBNL20
LOCAL_LDFLAGS := -Wl,--no-gc-sections
@@ -15,7 +16,10 @@ LOCAL_MODULE_TAGS := debug
LOCAL_STATIC_LIBRARIES := libnl
LOCAL_MODULE := iw
-$(IW_SOURCE_DIR)/version.c:
- $(IW_SOURCE_DIR)/version.sh $(IW_SOURCE_DIR)/version.c
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_GENERATED_SOURCES := $(local-generated-sources-dir)/version.c
+$(LOCAL_GENERATED_SOURCES) : $(LOCAL_PATH)/version.sh
+ @mkdir -p $(dir $@)
+ $(hide) $< $@
include $(BUILD_EXECUTABLE)