From patchwork Thu Oct 29 11:38:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schultz X-Patchwork-Id: 537798 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.osmocom.org (unknown [IPv6:2a01:4f8:191:444b::2:7]) by ozlabs.org (Postfix) with ESMTP id BFA3C140D92 for ; Thu, 29 Oct 2015 22:39:38 +1100 (AEDT) Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by lists.osmocom.org (Postfix) with ESMTP id 715447A49; Thu, 29 Oct 2015 11:39:37 +0000 (UTC) X-Original-To: openbsc@lists.osmocom.org Delivered-To: openbsc@lists.osmocom.org Received: from mail.tpip.net (mail.tpip.net [92.43.49.48]) by lists.osmocom.org (Postfix) with ESMTP id D6FBF7A12 for ; Thu, 29 Oct 2015 11:39:35 +0000 (UTC) Received: from office.tpip.net (office.tpip.net [92.43.51.2]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.tpip.net (Postfix) with ESMTPS id 571594F404; Thu, 29 Oct 2015 11:39:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by office.tpip.net (Postfix) with ESMTP id 0C515A2F7B; Thu, 29 Oct 2015 12:39:11 +0100 (CET) Received: from office.tpip.net ([127.0.0.1]) by localhost (office.tpip.net [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id CNGezFxsSS1c; Thu, 29 Oct 2015 12:39:10 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by office.tpip.net (Postfix) with ESMTP id 96C82A2F7A; Thu, 29 Oct 2015 12:39:10 +0100 (CET) X-Virus-Scanned: amavisd-new at tpip.net Received: from office.tpip.net ([127.0.0.1]) by localhost (office.tpip.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id GQfutixVwPoL; Thu, 29 Oct 2015 12:39:10 +0100 (CET) Received: from alice.tpip.org (unknown [192.168.13.53]) by office.tpip.net (Postfix) with ESMTPSA id 40623A2F7B; Thu, 29 Oct 2015 12:39:10 +0100 (CET) From: Andreas Schultz To: Harald Welte , Pablo Neira Ayuso Subject: [PATCH 1/6] build: update Makefile for simpler out of tree builds Date: Thu, 29 Oct 2015 12:38:57 +0100 Message-Id: <1446118742-22809-2-git-send-email-aschultz@tpip.net> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1446118742-22809-1-git-send-email-aschultz@tpip.net> References: <1446118742-22809-1-git-send-email-aschultz@tpip.net> X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Development of the OpenBSC GSM base station controller List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: openbsc@lists.osmocom.org Errors-To: openbsc-bounces@lists.osmocom.org Sender: "OpenBSC" Signed-off-by: Andreas Schultz --- Makefile | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 9081679..2b3b4f5 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,16 @@ -CC=gcc -KDIR := /lib/modules/$(shell uname -r)/build +KERNEL_SRC := /lib/modules/$(shell uname -r)/build obj-m += gtp.o -default: - $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules +SRC := $(shell pwd) + +all: + $(MAKE) -C $(KERNEL_SRC) M=$(SRC) + +modules_install: + $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install + clean: - rm -rf *.o *.mod.* modules.order Module.symvers *.ko .tmp_versions .*.cmd + rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c + rm -f Module.markers Module.symvers modules.order + rm -rf .tmp_versions Modules.symvers