1 # makefile to manage dpdk package
3 # Copyright (C) 2015 OPNFV
5 # Copying and distribution of this file, with or without modification,
6 # are permitted in any medium without royalty provided the copyright
7 # notice and this notice are preserved. This file is offered as-is,
8 # without warranty of any kind.
11 # Aihua Li, Huawei Technologies.
13 include ../mk/master.mk
14 include ../package-list.mk
16 .PHONY: install force_make
19 TAG_DONE_FLAG = $(WORK_DIR)/.$(DPDK_TAG).tag.done
21 # the name has been changed from version to version
22 ifeq ($(DPDK_TAG),v1.6.0r0)
23 DPDK_TARGET = x86_64-default-linuxapp-gcc
24 CONFIG_FILE = $(WORK_DIR)/config/defconfig_x86_64-default-linuxapp-gcc
26 DPDK_TARGET = x86_64-native-linuxapp-gcc
27 CONFIG_FILE = $(WORK_DIR)/config/common_linuxapp
31 @echo "Finished making $(WORK_DIR) "
33 INSTALL_TARGET = force_make
35 force_make: $(TAG_DONE_FLAG)
36 $(AT)cd $(WORK_DIR); make config T=$(DPDK_TARGET) && make
39 install: $(INSTALL_TARGET)
40 $(AT)sudo cp -a $(WORK_DIR)/$(DPDK_TARGET)/kmod $(INSTALL_DIR)/lib/modules/$(KERNEL_VERSION)
43 # hard way to clean and clobber
46 $(AT)rm -rf $(WORK_DIR)
48 # cleanse is for developer who would like to keep the
49 # clone git repo, saving time to fetch again from url
51 $(AT)cd $(WORK_DIR) && git clean -xfd && git checkout -f
54 @echo "Make test in $(WORK_DIR) (stub) "
57 @echo "Make sanity in $(WORK_DIR) (stub) "
60 $(AT)git clone $(DPDK_URL)
62 $(TAG_DONE_FLAG): $(WORK_DIR)
63 $(AT)cd $(WORK_DIR); git checkout $(DPDK_TAG)
64 $(AT)sed -i 's/CONFIG_RTE_BUILD_COMBINE_LIBS=n/CONFIG_RTE_BUILD_COMBINE_LIBS=y/g' $(CONFIG_FILE)
65 # KNI was causing the 1.6.0 build to fail
66 $(AT)sed -i 's/CONFIG_RTE_LIBRTE_KNI=y /CONFIG_RTE_LIBRTE_KNI=n/g' $(CONFIG_FILE)