From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id 0695F2C6E for ; Mon, 4 Jul 2016 03:14:17 +0200 (CEST) Received: by mail-wm0-f46.google.com with SMTP id f126so85735290wma.1 for ; Sun, 03 Jul 2016 18:14:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jEe+J+q0J/6bjvXrLfyJuPfEEywx0JPHX41JPxlKQCk=; b=DgiCjg1FZi1SFozwnPh/KGT1X2bzPXaXGF6wd5/98pwwFe0Zw+Ke8h0jBOv28DSgnR tBF6Bp/XKJKHfHILnRYpqfYmbOMJ3kYBct6eWtI+IGRsJJUbLidRn9ntzvWBga7rKT5O Cng/sxIPoZyuCSSKAEiT5cH9xOnHTCB0zik/R48CX7sznR/qglO3J69CmnsENLqRQAeW ZB6SK+LZJju1GEu3PWkH2jCBmdOAtV516prvlhb9yHz7SN/URqHa/KIQ0EOI5qf7QNoQ dYWDA/rNFipQzZhfZaKs9Kqg38G2mriMUZYy9fpTJst0geMddmwIRuDMlwRh5GJ95eFa yg0A== 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:in-reply-to :references; bh=jEe+J+q0J/6bjvXrLfyJuPfEEywx0JPHX41JPxlKQCk=; b=dCTfkmL5I2xYpboDfBJKtsdXwXS+6KQLaaVoPdIVGZURv7Ubudl0UTtDLeO12gXLSV YOYzacH6JporuNgocR6fkxuF1lUL25Yfh3ofteXTTvqJMmw8T2UwdPPtxiKN+fOsTV+L 9zB7a4kjYM5RYDZnmmiXpMaPYueEn/yNJQfSL5y2XrTv73lHLR+ldMk1B+wXB/gzvKnT lrnfrwqWwGVnLNC0+NB287nZYWtMYydrJXcHQR/rKsHYZwHI3XsGjrv6s9FPkJo10BaQ TV5Kjvu5N6Ildhplk+67ayHz6ew4KFB9D7eFrQNEQz6u5Xyt6C/53SzWWwdDWJcvyWV5 9tAQ== X-Gm-Message-State: ALyK8tJ1xnN+4WCu2KZuGY35vPlpRxnZ0zy/8r4oaliAkP2OcMdMMRvoyHPz/wU1yDNN1GUS X-Received: by 10.194.170.197 with SMTP id ao5mr7460352wjc.99.1467594856807; Sun, 03 Jul 2016 18:14:16 -0700 (PDT) Received: from XPS13.localdomain (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id l4sm5527127wjk.18.2016.07.03.18.14.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 03 Jul 2016 18:14:16 -0700 (PDT) From: Thomas Monjalon To: Neil Horman Cc: dev@dpdk.org, Panu Matilainen Date: Mon, 4 Jul 2016 03:14:01 +0200 Message-Id: <1467594845-3487-4-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1467594845-3487-1-git-send-email-thomas.monjalon@6wind.com> References: <1466189185-21952-1-git-send-email-nhorman@tuxdriver.com> <1467594845-3487-1-git-send-email-thomas.monjalon@6wind.com> Subject: [dpdk-dev] [PATCH v9 3/7] mk: refresh recipe for any host application 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: Mon, 04 Jul 2016 01:14:17 -0000 Make the recipe simpler to use and build in configurable directory. HOSTAPP_DIR must be set before including rte.hostapp.mk. Remove LDLIBS_FILES as libraries should not be used in an hostapp. Remove the "INSTALL-HOSTAPP" and build directly in the right directory. Signed-off-by: Thomas Monjalon --- doc/guides/freebsd_gsg/build_dpdk.rst | 2 +- doc/guides/linux_gsg/build_dpdk.rst | 2 +- doc/guides/prog_guide/dev_kit_build_system.rst | 2 +- mk/rte.hostapp.mk | 23 +++++------------------ mk/rte.sdkbuild.mk | 3 +-- mk/rte.sdkconfig.mk | 3 +-- 6 files changed, 10 insertions(+), 25 deletions(-) diff --git a/doc/guides/freebsd_gsg/build_dpdk.rst b/doc/guides/freebsd_gsg/build_dpdk.rst index 1d92c08..93c4366 100644 --- a/doc/guides/freebsd_gsg/build_dpdk.rst +++ b/doc/guides/freebsd_gsg/build_dpdk.rst @@ -183,7 +183,7 @@ contains the kernel modules to install: ls x86_64-native-bsdapp-gcc - app build hostapp include kmod lib Makefile + app build include kmod lib Makefile .. _loading_contigmem: diff --git a/doc/guides/linux_gsg/build_dpdk.rst b/doc/guides/linux_gsg/build_dpdk.rst index 198c0b6..fb2c481 100644 --- a/doc/guides/linux_gsg/build_dpdk.rst +++ b/doc/guides/linux_gsg/build_dpdk.rst @@ -152,7 +152,7 @@ A kmod directory is also present that contains kernel modules which may be load ls x86_64-native-linuxapp-gcc - app build hostapp include kmod lib Makefile + app build include kmod lib Makefile Loading Modules to Enable Userspace IO for DPDK ----------------------------------------------- diff --git a/doc/guides/prog_guide/dev_kit_build_system.rst b/doc/guides/prog_guide/dev_kit_build_system.rst index 9b0de83..dedd18a 100644 --- a/doc/guides/prog_guide/dev_kit_build_system.rst +++ b/doc/guides/prog_guide/dev_kit_build_system.rst @@ -264,7 +264,7 @@ These Makefiles generate a binary application. * rte.extapp.mk: External application -* rte.hostapp.mk: Host application in the development kit framework +* rte.hostapp.mk: Prerequisite tool to build DPDK Library ^^^^^^^ diff --git a/mk/rte.hostapp.mk b/mk/rte.hostapp.mk index c44d0f8..05bbd26 100644 --- a/mk/rte.hostapp.mk +++ b/mk/rte.hostapp.mk @@ -40,8 +40,8 @@ include $(RTE_SDK)/mk/internal/rte.depdirs-pre.mk # VPATH contains at least SRCDIR VPATH += $(SRCDIR) -_BUILD = $(HOSTAPP) -_INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y) $(RTE_OUTPUT)/hostapp/$(HOSTAPP) +_BUILD = $(RTE_OUTPUT)/$(HOSTAPP_DIR)/$(HOSTAPP) +_INSTALL = $(INSTALL-FILES-y) $(SYMLINK-FILES-y) $(RTE_OUTPUT)/$(HOSTAPP_DIR)/$(HOSTAPP) _CLEAN = doclean .PHONY: all @@ -60,7 +60,7 @@ exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1)))) O_TO_EXE = $(HOSTCC) $(HOST_LDFLAGS) $(LDFLAGS_$(@)) \ $(EXTRA_HOST_LDFLAGS) -o $@ $(OBJS-y) $(LDLIBS) O_TO_EXE_STR = $(subst ','\'',$(O_TO_EXE)) #'# fix syntax highlight -O_TO_EXE_DISP = $(if $(V),"$(O_TO_EXE_STR)"," HOSTLD $(@)") +O_TO_EXE_DISP = $(if $(V),"$(O_TO_EXE_STR)"," HOSTLD $(@F)") O_TO_EXE_CMD = "cmd_$@ = $(O_TO_EXE_STR)" O_TO_EXE_DO = @set -e; \ echo $(O_TO_EXE_DISP); \ @@ -69,15 +69,10 @@ O_TO_EXE_DO = @set -e; \ -include .$(HOSTAPP).cmd -# list of .a files that are linked to this application -LDLIBS_FILES := $(wildcard \ - $(addprefix $(RTE_OUTPUT)/lib/, \ - $(patsubst -l%,lib%.a,$(filter -l%,$(LDLIBS))))) - # # Compile executable file if needed # -$(HOSTAPP): $(OBJS-y) $(LDLIBS_FILES) FORCE +$(RTE_OUTPUT)/$(HOSTAPP_DIR)/$(HOSTAPP): $(OBJS-y) FORCE @[ -d $(dir $@) ] || mkdir -p $(dir $@) $(if $(D),\ @echo -n "$@ -> $< " ; \ @@ -93,14 +88,6 @@ $(HOSTAPP): $(OBJS-y) $(LDLIBS_FILES) FORCE $(O_TO_EXE_DO)) # -# install app in $(RTE_OUTPUT)/hostapp -# -$(RTE_OUTPUT)/hostapp/$(HOSTAPP): $(HOSTAPP) - @echo " INSTALL-HOSTAPP $(HOSTAPP)" - @[ -d $(RTE_OUTPUT)/hostapp ] || mkdir -p $(RTE_OUTPUT)/hostapp - $(Q)cp -f $(HOSTAPP) $(RTE_OUTPUT)/hostapp - -# # Clean all generated files # .PHONY: clean @@ -109,7 +96,7 @@ clean: _postclean .PHONY: doclean doclean: - $(Q)rm -rf $(HOSTAPP) $(OBJS-all) $(DEPS-all) $(DEPSTMP-all) \ + $(Q)rm -rf $(OBJS-all) $(DEPS-all) $(DEPSTMP-all) \ $(CMDS-all) $(INSTALL-FILES-all) .$(HOSTAPP).cmd diff --git a/mk/rte.sdkbuild.mk b/mk/rte.sdkbuild.mk index 6dbdb5d..f1a163a 100644 --- a/mk/rte.sdkbuild.mk +++ b/mk/rte.sdkbuild.mk @@ -63,8 +63,7 @@ build: $(ROOTDIRS-y) .PHONY: clean clean: $(CLEANDIRS) @rm -rf $(RTE_OUTPUT)/include $(RTE_OUTPUT)/app \ - $(RTE_OUTPUT)/hostapp $(RTE_OUTPUT)/lib \ - $(RTE_OUTPUT)/kmod + $(RTE_OUTPUT)/lib $(RTE_OUTPUT)/kmod @[ -d $(RTE_OUTPUT)/include ] || mkdir -p $(RTE_OUTPUT)/include @$(RTE_SDK)/scripts/gen-config-h.sh $(RTE_OUTPUT)/.config \ > $(RTE_OUTPUT)/include/rte_config.h diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk index 98789af..44522ac 100644 --- a/mk/rte.sdkconfig.mk +++ b/mk/rte.sdkconfig.mk @@ -108,8 +108,7 @@ $(RTE_OUTPUT)/Makefile: | $(RTE_OUTPUT) # if NODOTCONF variable is defined, don't try to rebuild .config $(RTE_OUTPUT)/include/rte_config.h: $(RTE_OUTPUT)/.config $(Q)rm -rf $(RTE_OUTPUT)/include $(RTE_OUTPUT)/app \ - $(RTE_OUTPUT)/hostapp $(RTE_OUTPUT)/lib \ - $(RTE_OUTPUT)/kmod $(RTE_OUTPUT)/build + $(RTE_OUTPUT)/lib $(RTE_OUTPUT)/kmod $(RTE_OUTPUT)/build $(Q)mkdir -p $(RTE_OUTPUT)/include $(Q)$(RTE_SDK)/scripts/gen-config-h.sh $(RTE_OUTPUT)/.config \ > $(RTE_OUTPUT)/include/rte_config.h -- 2.7.0