Score
0
Watch 3 Star 8 Fork 2

OpenCloudNeXt / DHLCMulanPSL-1.0

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
DHL (Dynamic Hardware Function Libraries) is a high performance FPGA-CPU co-design framework for accelerating software NFs (Network Functions) with Intel DPDK. spread retract

https://fangmingliu.github.io/files/icdcs18-DHL-FPGA-FangmingLiu.pdf

Clone or download
Makefile 1.95 KB
Copy Edit Web IDE Raw Blame History
Yipei authored 2019-08-18 14:29 . build repo
ifeq ($(RTE_SDK),)
$(error RTE_SDK is not defined)
endif
#
# directory list
#
ROOTDIRS-y := lib fpga_drivers dhl_nflib dhl_manager
export ROOTDIRS-y ROOTDIRS- ROOTDIRS-n
fpga_drivers: | lib
dhl_nflib: | lib fpga_drivers
dhl_manager: | lib fpga_drivers dhl_nflib
# define Q to '@' or not. $(Q) is used to prefix all shell commands to
# be executed silently.
Q=@
ifeq '$V' '0'
override V=
endif
ifdef V
ifeq ("$(origin V)", "command line")
Q=
endif
endif
export Q
#
# export DHL_SRCDIR and BUILDING_DHL_SDK
#
DHL_SRCDIR = $(CURDIR)
export DHL_SRCDIR
#
# Default output is $(DHL_SRCDIR)/build
# output files will go in a seperate directory
#
ifdef O
ifeq ("$(origin O)", "command line")
DHL_OUTPUT := $(abspath $(O))
endif
endif
DHL_OUTPUT ?= $(DHL_SRCDIR)/build
export DHL_OUTPUT
# the directory where intermediate build files are stored, like *.o,
# *.d, *.cmd, ...
BUILDDIR = $(DHL_OUTPUT)/build
export BUILDDIR
# for external lib, drivers compilation
RTE_SRCDIR ?= DHL_SRCDIR
RTE_OUTPUT ?= DHL_OUTPUT
export RTE_SRCDIR
export RTE_OUTPUT
#
# build and clean targets
#
CLEANDIRS = $(addsuffix _clean,$(ROOTDIRS-y) $(ROOTDIRS-n) $(ROOTDIRS-))
.PHONY: build
build: $(ROOTDIRS-y)
@echo "Build comlete DHL"
.PHONY: clean
#clean: $(CLEANDIRS)
# @echo "clean have not been realised"
clean:
rm -rf ./build/
.SECONDEXPANSION:
.PHONY: $(ROOTDIRS-y) $(ROOTDIRS-)
$(ROOTDIRS-y) $(ROOTDIRS-):
@[ -d $(BUILDDIR)/$@ ] || mkdir -p $(BUILDDIR)/$@
@echo "==Build $@"
$(Q)$(MAKE) O=$(BUILDDIR)/$(@) -C $(DHL_SRCDIR)/$@ all
# @if [ $@ = drivers ]; then \
# $(MAKE) -f $(RTE_SDK)/mk/rte.combinedlib.mk; \
# fi
%_clean:
@echo "== Clean $*"
$(Q)if [ -f $(DHL_SRCDIR)/$*/Makefile -a -d $(BUILDDIR)/$* ]; then \
$(MAKE) S=$* -f $(DHL_SRCDIR)/$*/Makefile -C $(BUILDDIR)/$* clean ; \
fi
$(DHL_OUTPUT):
$(Q)mkdir -p $@
.PHONY: default
default: all
.PHONY: all
all: builddir build
.PHONY: builddir
builddir: $(DHL_OUTPUT)
@echo "The build dir is" $(DHL_OUTPUT)
.PHONY: FORCE
FORCE:

Comment ( 0 )

Sign in for post a comment