-
Notifications
You must be signed in to change notification settings - Fork 2
/
ndr.mkroot.mk
44 lines (35 loc) · 992 Bytes
/
ndr.mkroot.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
NBE_ROOT = $(CURDIR)
export NBE_ROOT
NBE_DIR = $(NBE_ROOT)/ndr-build-env
export NBE_DIR
NBE_SCRIPTS = $(NBE_DIR)/ndr.build.script
export NBE_SCRIPTS
include $(NBE_DIR)/ndr.pathconf.mk
include $(NBE_DIR)/ndr.dpdkconf.mk
include $(NBE_DIR)/ndr.libconf.mk
include $(NBE_DIR)/ndr.archtype.mk
include $(NBE_DIR)/ndr.defset.mk
export CFLAGS
DEPSET_RDIRS = $(addsuffix _depset,$(RDIRS))
.PHONY: default
default: clean depset build
.PHONY: build
build: $(RDIRS)
@echo "Build complete [$(PROJECT_NAME)]"
.PHONY: depset
depset: $(DEPSET_RDIRS)
@echo "Prepare dependency complete [$(PROJECT_NAME)]"
.PHONY: clean
clean:
@if ! [ "$(NBE_OUTPUT)" = "" ]; then \
rm -rf $(NBE_OUTPUT); \
fi
@echo "Clean complete [$(PROJECT_NAME)]"
.PHONY: $(RDIRS)
$(RDIRS)::
@echo "== Build $@"
@$(MAKE) S=$@ -f $(NBE_ROOT)/$@/Makefile -C $(NBE_BUILDPATH)/$@ build
%_depset::
@[ -d $(NBE_OUTPUT)/$* ] || mkdir -p $(NBE_BUILDPATH)/$*
@echo "== Depset $*"
@$(MAKE) S=$* -f $(NBE_ROOT)/$*/Makefile depset