Score
0
Watch 3 Star 8 Fork 2

OpenCloudNeXt / DHLCMulanPSL-1.0

Clone or download
Makefile
Copy Edit Web IDE Raw Normal History
Yipei   build repo 2019-08-18
ifeq ($(RTE_SDK),)$(error RTE_SDK is not defined)endif## directory list#ROOTDIRS-y := lib fpga_drivers dhl_nflib dhl_managerexport ROOTDIRS-y ROOTDIRS- ROOTDIRS-nfpga_drivers: | libdhl_nflib: | lib fpga_driversdhl_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=endififdef Vifeq ("$(origin V)", "command line")Q=endifendifexport 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 Oifeq ("$(origin O)", "command line")DHL_OUTPUT := $(abspath $(O))endifendifDHL_OUTPUT ?= $(DHL_SRCDIR)/buildexport DHL_OUTPUT# the directory where intermediate build files are stored, like *.o,# *.d, *.cmd, ...BUILDDIR = $(DHL_OUTPUT)/buildexport BUILDDIR# for external lib, drivers compilationRTE_SRCDIR ?= DHL_SRCDIRRTE_OUTPUT ?= DHL_OUTPUTexport RTE_SRCDIRexport RTE_OUTPUT## build and clean targets#CLEANDIRS = $(addsuffix _clean,$(ROOTDIRS-y) $(ROOTDIRS-n) $(ROOTDIRS-)).PHONY: buildbuild: $(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: defaultdefault: all.PHONY: allall: builddir build.PHONY: builddirbuilddir: $(DHL_OUTPUT)	@echo "The build dir is" $(DHL_OUTPUT).PHONY: FORCEFORCE: