5 Star 47 Fork 6

OpenCloudNeXt/DHL

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 1.95 KB
一键复制 编辑 原始数据 按行查看 历史
Yipei Niu 提交于 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:
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/opencloudnext/DHL.git
git@gitee.com:opencloudnext/DHL.git
opencloudnext
DHL
DHL
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385