forked from opencomputeproject/OpenNetworkLinux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.mk
93 lines (68 loc) · 2.04 KB
/
config.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
############################################################
#
# Open Network Linux Configuration Makefile
#
############################################################
ifndef ONL
$(error $$ONL is not defined)
endif
ifndef ONLPM
ONLPM := $(ONL)/tools/onlpm.py
endif
ifndef BUILDER
# Builder is here
export BUILDER := $(ONL)/sm/infra/builder/unix
endif
#
# The default build directory for all infra:builder compilations is the following.
#
ifndef ONL_DEBIAN_SUITE
$(error "The $$ONL_DEBIAN_SUITE value is not set. Please source $$ONL/setup.env")
endif
export ONL_DEBIAN_SUITE_$(ONL_DEBIAN_SUITE)=1
export BUILD_DIR_BASE=BUILD/$(ONL_DEBIAN_SUITE)
# init system options sysvinit, systemd. default is sysvinit
ifndef INIT
export INIT := sysvinit
endif
# Use the new module database tool to resolve dependencies dynamically.
ifndef BUILDER_MODULE_DATABASE
export BUILDER_MODULE_DATABASE := $(ONL)/make/modules/modules.json
endif
# Regenerate the module manifest if necessary.
ifndef BUILDER_MODULE_DATABASE_ROOT
BUILDER_MODULE_DATABASE_ROOT := $(ONL)
endif
ifndef BUILDER_MODULE_MANIFEST
BUILDER_MODULE_MANIFEST := $(ONL)/make/modules/modules.mk
endif
export MODULEMANIFEST := $(shell $(BUILDER)/tools/modtool.py --db $(BUILDER_MODULE_DATABASE) --dbroot $(BUILDER_MODULE_DATABASE_ROOT) --make-manifest $(BUILDER_MODULE_MANIFEST))
# Generate versions if necessary.
$(shell $(ONL)/tools/make-versions.py --import-file=$(ONL)/tools/onlvi --class-name=OnlVersionImplementation --output-dir $(ONL)/make/versions)
#
# Default make options.
#
ifeq ("$(origin V)", "command line")
VERBOSE := $(V)
endif
ifneq ($(VERBOSE),1)
# quiet settings
ONL_V_P := false
ONL_V_at := @
ONL_V_GEN = @set -e; echo GEN $@;
else
# verbose settings
ONL_V_P := :
endif
ifneq ($(VERBOSE),1)
ONL_MAKE_FLAGS += --no-print-directory -s
else
ONL_MAKE_FLAGS += V=1
endif
ONL_MAKE := $(MAKE) $(ONL_MAKE_FLAGS)
#
# Some build and autogen tools require these settings.
#
export SUBMODULE_INFRA := $(ONL)/sm/infra
export SUBMODULE_BIGCODE := $(ONL)/sm/bigcode
include $(ONL)/make/templates.mk