blob: b2d6d3b0e1008823635c944c82cbf5d97839f03d [file] [log] [blame]
Joey Armstrong0205d332023-04-11 17:29:23 -04001# -*- makefile -*-
2# -----------------------------------------------------------------------
3# Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors
4#
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
15# limitations under the License.
16#
Joey Armstrong43997db2023-06-04 10:08:58 -040017# SPDX-FileCopyrightText: 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors
Joey Armstrong0205d332023-04-11 17:29:23 -040018# SPDX-License-Identifier: Apache-2.0
19# -----------------------------------------------------------------------
Joey Armstrong43997db2023-06-04 10:08:58 -040020# https://gerrit.opencord.org/plugins/gitiles/onf-make
21# ONF.makefile.version = 1.0
22# -----------------------------------------------------------------------
Joey Armstrong0205d332023-04-11 17:29:23 -040023
Joey Armstrong43997db2023-06-04 10:08:58 -040024ifndef mk-include--onf-make # single-include guard macor
Joey Armstronga6890342023-06-01 17:07:51 -040025
Joey Armstrong0205d332023-04-11 17:29:23 -040026$(if $(DEBUG),$(warning ENTER))
27
Joey Armstrong43997db2023-06-04 10:08:58 -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 Armstrong43997db2023-06-04 10:08:58 -040036include $(ONF_MAKEDIR)/consts.mk
37include $(ONF_MAKEDIR)/help/include.mk # render target help
38include $(ONF_MAKEDIR)/utils/include.mk # dependency-less helper macros
39include $(ONF_MAKEDIR)/etc/include.mk # banner macros
Joey Armstrong0205d332023-04-11 17:29:23 -040040
Joey Armstrong42f4ce62023-06-09 12:56:48 -040041include $(ONF_MAKEDIR)/etc/commands.mk # Tools and local installers
42
Joey Armstrong43997db2023-06-04 10:08:58 -040043include $(ONF_MAKEDIR)/virtualenv.mk# # lint-{jjb,python} depends on venv
44include $(ONF_MAKEDIR)/lint/include.mk
45# include $(ONF_MAKEDIR)/git-submodules.mk
46# include $(ONF_MAKEDIR)/gerrit/include.mk
Joey Armstrong0205d332023-04-11 17:29:23 -040047
Joey Armstrong43997db2023-06-04 10:08:58 -040048include $(ONF_MAKEDIR)/todo.mk
49include $(ONF_MAKEDIR)/help/variables.mk
Joey Armstrong0205d332023-04-11 17:29:23 -040050
Joey Armstronga6890342023-06-01 17:07:51 -040051##---------------------##
52##---] ON_DEMAND [---##
53##---------------------##
Joey Armstrong43997db2023-06-04 10:08:58 -040054$(if $(USE_DOCKER_MK),$(eval $(ONF_MAKEDIR)/docker/include.mk))
Joey Armstronga6890342023-06-01 17:07:51 -040055
Joey Armstrong0205d332023-04-11 17:29:23 -040056##-------------------##
57##---] TARGETS [---##
58##-------------------##
Joey Armstrong43997db2023-06-04 10:08:58 -040059include $(ONF_MAKEDIR)/targets/clean.mk
60# include $(ONF_MAKEDIR)/targets/check.mk
61include $(ONF_MAKEDIR)/targets/sterile.mk
62# include $(ONF_MAKEDIR)/targets/test.mk
Joey Armstrong0205d332023-04-11 17:29:23 -040063
64$(if $(DEBUG),$(warning LEAVE))
65
66## --------------------------------------------------------------------------
67## structure to support pre/post target handling w/o inlining in Makefile (?)
68## --------------------------------------------------------------------------
69## include makefiles/include.mk
70## include makefiles/main/enter.mk
71## [... include *.mk ...]
72## include makefiles/main/leave.mk
73
Joey Armstronga6890342023-06-01 17:07:51 -040074mk-include--onf-make := true
75
76endif # mk-include--onf-make
77
Joey Armstrong0205d332023-04-11 17:29:23 -040078# [EOF]