blob: db78850615899118782435810044115fc7fb4966 [file] [log] [blame]
Joey Armstrong811e9542022-12-25 21:45:27 -05001# -*- makefile -*-
2# -----------------------------------------------------------------------
Joey Armstrong7a9af442024-01-03 19:26:36 -05003# Copyright 2022-2024 Open Networking Foundation (ONF) and the ONF Contributors
Joey Armstrong811e9542022-12-25 21:45:27 -05004#
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 Armstrong653504f2024-01-18 12:58:56 -050017# SPDX-FileCopyrightText: 2024 Open Networking Foundation (ONF) and the ONF Contributors
Joey Armstrong811e9542022-12-25 21:45:27 -050018# SPDX-License-Identifier: Apache-2.0
19# -----------------------------------------------------------------------
Joey Armstrong367d76b2023-06-08 17:16:46 -040020# https://gerrit.opencord.org/plugins/gitiles/onf-make
21# ONF.makefile.version = 1.0
22# -----------------------------------------------------------------------
Joey Armstrong811e9542022-12-25 21:45:27 -050023
Joey Armstrong367d76b2023-06-08 17:16:46 -040024ifndef mk-include--onf-make # single-include guard macor
25
26$(if $(DEBUG),$(warning ENTER))
27
28## -----------------------------------------------------------------------
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 Armstrong393daca2023-07-06 08:47:54 -040035MAKEDIR := $(ONF_MAKEDIR)
Joey Armstrong367d76b2023-06-08 17:16:46 -040036
37include $(ONF_MAKEDIR)/consts.mk
38include $(ONF_MAKEDIR)/help/include.mk # render target help
39include $(ONF_MAKEDIR)/utils/include.mk # dependency-less helper macros
40include $(ONF_MAKEDIR)/etc/include.mk # banner macros
41
42include $(ONF_MAKEDIR)/virtualenv.mk# # lint-{jjb,python} depends on venv
43include $(ONF_MAKEDIR)/lint/include.mk
44# include $(ONF_MAKEDIR)/git-submodules.mk
45# include $(ONF_MAKEDIR)/gerrit/include.mk
46
47include $(ONF_MAKEDIR)/todo.mk
48include $(ONF_MAKEDIR)/help/variables.mk
49
50##---------------------##
51##---] ON_DEMAND [---##
52##---------------------##
Joey Armstrong393daca2023-07-06 08:47:54 -040053$(if $(USE_DOCKER_MK),$(eval include $(ONF_MAKEDIR)/docker/include.mk))
Joey Armstrong367d76b2023-06-08 17:16:46 -040054
55##-------------------##
56##---] TARGETS [---##
57##-------------------##
58include $(ONF_MAKEDIR)/targets/clean.mk
59# include $(ONF_MAKEDIR)/targets/check.mk
60include $(ONF_MAKEDIR)/targets/sterile.mk
61# include $(ONF_MAKEDIR)/targets/test.mk
62
63$(if $(DEBUG),$(warning LEAVE))
64
65## --------------------------------------------------------------------------
66## structure to support pre/post target handling w/o inlining in Makefile (?)
67## --------------------------------------------------------------------------
68## include makefiles/include.mk
69## include makefiles/main/enter.mk
70## [... include *.mk ...]
71## include makefiles/main/leave.mk
72
73mk-include--onf-make := true
74
75endif # mk-include--onf-make
Joey Armstrong811e9542022-12-25 21:45:27 -050076
77# [EOF]