From patchwork Tue Jan 6 10:48:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arik Nemtsov X-Patchwork-Id: 5572541 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6B6C9BF6C3 for ; Tue, 6 Jan 2015 10:48:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 82A53201DD for ; Tue, 6 Jan 2015 10:48:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5B3BA201BC for ; Tue, 6 Jan 2015 10:48:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751684AbbAFKst (ORCPT ); Tue, 6 Jan 2015 05:48:49 -0500 Received: from mail-wg0-f44.google.com ([74.125.82.44]:46222 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751625AbbAFKss (ORCPT ); Tue, 6 Jan 2015 05:48:48 -0500 Received: by mail-wg0-f44.google.com with SMTP id b13so29346570wgh.31 for ; Tue, 06 Jan 2015 02:48:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=T6AXDU+4FxvqPHKwkXLAPZS84T+Y9joI8yDs7sPNZzQ=; b=JQkyrm1poAVFP2de3iJtkbs+Q71owZH65uuAYYnwifpHAV7tu+UD+LVI3+Ae1ULdEx 5VmcxkJeIGnJjPxY73d2g6lsYFrbBiMHv2UzACqnTlRlOXnRoYq5blrzll5ry6nLTQyF cDFRG/RHW+brm47q5OEisSyJUfiEVXcyhZFUSl8sppXCNIQCMG+1Iw3hciXUW12G1hIa 2suf+wcjKLMMLOT/htwKF62IiBXUZAvGPf9KJEKwGgXEu5vopOA0jKW7OAUO6j3CqEik +Sn5+l3hT2Ld15rfqi3u/TtiuvkMN/NA6nuGSVIrD/86UyQzgvYE/oJNMeYbeJEWRp0F 6rNg== X-Gm-Message-State: ALoCoQmTt2dnnYSNlEPIYAvRSRzE9yBBCWTXxXoXoQRSfK+Nusol2QEmJYs8BLgG4lSdjweWUZnu X-Received: by 10.180.98.162 with SMTP id ej2mr5815949wib.39.1420541327565; Tue, 06 Jan 2015 02:48:47 -0800 (PST) Received: from athena.ger.corp.intel.com (89-138-233-251.bb.netvision.net.il. [89.138.233.251]) by mx.google.com with ESMTPSA id vj1sm18590174wjc.49.2015.01.06.02.48.46 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Jan 2015 02:48:47 -0800 (PST) From: Arik Nemtsov To: Cc: Johannes Berg , Arik Nemtsov Subject: [PATCH v2] iw: fix android build Date: Tue, 6 Jan 2015 12:48:45 +0200 Message-Id: <1420541325-24052-1-git-send-email-arik@wizery.com> X-Mailer: git-send-email 2.1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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"