From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id 863385951 for ; Tue, 4 Feb 2014 16:53:40 +0100 (CET) Received: by mail-wg0-f48.google.com with SMTP id x13so13109560wgg.27 for ; Tue, 04 Feb 2014 07:55:01 -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:subject:date:message-id:in-reply-to :references; bh=oH1jv6CVyJfgR8mm1PxrVDRE+mLH/fC3yrW+JubK3e8=; b=B7JbERXuERZbxBEtJ8fVVNn+gOpx6Aiq2of0kN7gALBIeFP9Vumk9HBxLX5E4MFtNk frsNZEuK3EG943yX2JmTWtPSXZTxegDbjZdKWcdx/TIbH3xXi1PT2bVnPjL0s0fq1L9X C3AotOLpCC/+Mz5zweG4IUzN3hChiKZpBaAP1BXel3O3ZtRDi9wg9NLkAkn6C5EGR4ur MT0iVHrReP6zVmnk0Bo0qsAR+lEKRdzrQUMD1noLdIw26kmlPKVnD1UFQExo5nK6+5xk GEEFY7QoW8y6QjliZ9v+pohO5tZMIIND6dTAfEAie5HuCfeRQ59g3duoKkm8Wc1tlLzv AwAQ== X-Gm-Message-State: ALoCoQmekctLEoKUG4ifgBLTdLDZz+pWhlDc6swia96eChvdlUQJNGgEb+ofpq0uSW504WXTmt+g X-Received: by 10.194.219.1 with SMTP id pk1mr9309243wjc.36.1391529301364; Tue, 04 Feb 2014 07:55:01 -0800 (PST) Received: from angus.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id q2sm53639203wjq.0.2014.02.04.07.54.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Feb 2014 07:55:00 -0800 (PST) From: Thomas Monjalon To: dev@dpdk.org Date: Tue, 4 Feb 2014 16:54:21 +0100 Message-Id: <1391529271-24606-7-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1391529271-24606-1-git-send-email-thomas.monjalon@6wind.com> References: <1391529271-24606-1-git-send-email-thomas.monjalon@6wind.com> Subject: [dpdk-dev] [vmxnet3-usermap PATCH 06/16] pmd: allow to install lib and doc X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Feb 2014 15:53:40 -0000 Signed-off-by: Thomas Monjalon --- pmd/Makefile | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/pmd/Makefile b/pmd/Makefile index 2d66fb7..759800e 100644 --- a/pmd/Makefile +++ b/pmd/Makefile @@ -30,6 +30,7 @@ # OF THE POSSIBILITY OF SUCH DAMAGE. SOLIB = librte_pmd_vmxnet3.so +DOC = dpdk-vmxnet3-usermap.rst CC = $(CROSS)gcc override CPPFLAGS += -Wall -Wextra -Werror @@ -40,6 +41,12 @@ KMOD_INCLUDE ?= $S/../kmod S ?= . O ?= . +prefix ?= /usr/local +exec_prefix ?= $(prefix) +libdir ?= $(exec_prefix)/lib +datarootdir ?= $(prefix)/share +docdir ?= $(datarootdir)/doc/dpdk + all : $O/$(SOLIB) $O : @@ -54,19 +61,38 @@ endif -I$(KMOD_INCLUDE) -I$(KMOD_INCLUDE)/shared \ -o $@ $< +install : $(DESTDIR)$(libdir)/$(SOLIB) +$(DESTDIR)$(libdir)/$(SOLIB): $O/$(SOLIB) + install -D -m 644 $< $@ + +install : $(DESTDIR)$(docdir)/$(DOC) +$(DESTDIR)$(docdir)/$(DOC) : $S/../README.rst + install -D -m 644 $< $@ + clean : - rm -f $O/$(SOLIB) ifneq '$(abspath $O)' '$(CURDIR)' - rmdir -p $O 2>&- endif +uninstall : + - rm -f $(DESTDIR)$(libdir)/$(SOLIB) + - rmdir -p $(DESTDIR)$(libdir) 2>&- + - rm -f $(DESTDIR)$(docdir)/$(DOC) + - rmdir -p $(DESTDIR)$(docdir) 2>&- + help : @ echo 'rules:' @ echo ' all (default)' @ echo ' clean' + @ echo ' install' + @ echo ' uninstall' @ echo 'build variables:' @ echo ' RTE_INCLUDE (e.g. ../dpdk/build/include),' @ echo ' CPPFLAGS, CFLAGS, LDFLAGS,' @ echo ' S (source directory), O (build directory)' + @ echo 'install variables:' + @ echo ' DESTDIR (optional),' + @ echo ' prefix, exec_prefix, libdir, datarootdir, docdir' -.PHONY : all clean help +.PHONY : all clean install uninstall help -- 1.7.10.4