blob: df50ca4862dad3194216cf3868f384fb474eeaa8 [file] [log] [blame]
Joey Armstrong0205d332023-04-11 17:29:23 -04001# -*- makefile -*-
2# -----------------------------------------------------------------------
Joey Armstrong1e07f882023-07-08 19:28:49 -04003# Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors
Joey Armstrong0205d332023-04-11 17:29:23 -04004#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
Joey Armstrong7ad5c362023-07-09 19:10:16 -040015# limitations under the License.
Joey Armstrong1e07f882023-07-08 19:28:49 -040016#
17# SPDX-FileCopyrightText: 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors
Joey Armstrong7ad5c362023-07-09 19:10:16 -040018# SPDX-License-Identifier: Apache-2.0
19# -----------------------------------------------------------------------
20# https://gerrit.opencord.org/plugins/gitiles/onf-make
Joey Armstrong1e07f882023-07-08 19:28:49 -040021# ONF.makefile.version = 1.0
Joey Armstrong7ad5c362023-07-09 19:10:16 -040022# -----------------------------------------------------------------------
23
24ifndef mk-include--onf-make # single-include guard macro
Joey Armstronga6890342023-06-01 17:07:51 -040025
Joey Armstrong0205d332023-04-11 17:29:23 -040026$(if $(DEBUG),$(warning ENTER))
27
Joey Armstrong7ad5c362023-07-09 19:10:16 -040028## -----------------------------------------------------------------------
29## Define vars based on relative import (normalize symlinks)
30## Usage: include makefiles/onf/include.mk
31## -----------------------------------------------------------------------
32onf-mk-abs ?= $(abspath $(lastword $(MAKEFILE_LIST)))
33onf-mk-top := $(subst /include.mk,$(null),$(onf-mk-abs))
34ONF_MAKEDIR := $(onf-mk-top)
Joey Armstrong0205d332023-04-11 17:29:23 -040035
Joey Armstrong7ad5c362023-07-09 19:10:16 -040036TOP ?= $(patsubst %/makefiles/include.mk,%,$(onf-mk-abs))
Joey Armstrong0205d332023-04-11 17:29:23 -040037
Joey Armstrong7ad5c362023-07-09 19:10:16 -040038include $(ONF_MAKEDIR)/consts.mk
39include $(ONF_MAKEDIR)/help/include.mk # render target help
40include $(ONF_MAKEDIR)/utils/include.mk # dependency-less helper macros
41include $(ONF_MAKEDIR)/etc/include.mk # banner macros
42include $(ONF_MAKEDIR)/commands/include.mk # Tools and local installers
Joey Armstrong42f4ce62023-06-09 12:56:48 -040043
Joey Armstrong7ad5c362023-07-09 19:10:16 -040044include $(ONF_MAKEDIR)/virtualenv.mk# # lint-{jjb,python} depends on venv
45include $(ONF_MAKEDIR)/lint/include.mk
Joey Armstrong0205d332023-04-11 17:29:23 -040046
Joey Armstrong7ad5c362023-07-09 19:10:16 -040047include $(ONF_MAKEDIR)/gerrit/include.mk
48include $(ONF_MAKEDIR)/git/include.mk
49include $(ONF_MAKEDIR)/jjb/include.mk
Joey Armstrong0205d332023-04-11 17:29:23 -040050
Joey Armstrong7ad5c362023-07-09 19:10:16 -040051$(if $(USE-VOLTHA-RELEASE-MK),\
52 $(eval include $(ONF_MAKEDIR)/release/include.mk))
Joey Armstronga6890342023-06-01 17:07:51 -040053
Joey Armstrong7ad5c362023-07-09 19:10:16 -040054include $(ONF_MAKEDIR)/todo.mk
55include $(ONF_MAKEDIR)/help/variables.mk
Joey Armstrongd26858f2023-07-08 15:52:16 -040056
Joey Armstrong7ad5c362023-07-09 19:10:16 -040057##---------------------##
58##---] ON_DEMAND [---##
59##---------------------##
60$(if $(USE-ONF-GERRIT-MK),$(eval include $(ONF_MAKEDIR)/gerrit/include.mk))
61$(if $(USE-ONF-DOCKER-MK),$(eval include $(ONF_MAKEDIR)/docker/include.mk))
Joey Armstrongd26858f2023-07-08 15:52:16 -040062
Joey Armstrong7ad5c362023-07-09 19:10:16 -040063##-------------------##
64##---] TARGETS [---##
65##-------------------##
66include $(ONF_MAKEDIR)/targets/include.mk # clean, sterile
Joey Armstrong0205d332023-04-11 17:29:23 -040067
68$(if $(DEBUG),$(warning LEAVE))
69
Joey Armstrong7ad5c362023-07-09 19:10:16 -040070mk-include--onf-make := true
71
72endif # mk-include--onf-make
73
Joey Armstrong0205d332023-04-11 17:29:23 -040074# [EOF]