blob: 4df4c4c4a92e21d4c348e607d063eeb94c72ea2e [file] [log] [blame]
Joey Armstrong57bd70f2023-01-12 05:25:51 -05001# -*- makefile -*-
2# -----------------------------------------------------------------------
Joey Armstrong9fadcbe2024-01-17 19:00:37 -05003# Copyright 2022-2024 Open Networking Foundation (ONF) and the ONF Contributors
Joey Armstrong57bd70f2023-01-12 05:25:51 -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 Armstrong9fadcbe2024-01-17 19:00:37 -050017# SPDX-FileCopyrightText: 2024 Open Networking Foundation (ONF) and the ONF Contributors
Joey Armstrong57bd70f2023-01-12 05:25:51 -050018# SPDX-License-Identifier: Apache-2.0
19# -----------------------------------------------------------------------
Joey Armstrong04cdd9f2023-06-09 15:18:23 -040020# https://gerrit.opencord.org/plugins/gitiles/onf-make
Joey Armstronga5278142023-06-28 16:56:54 -040021# ONF.makefiles.include.version = 1.1
Joey Armstrong04cdd9f2023-06-09 15:18:23 -040022# -----------------------------------------------------------------------
Joey Armstrong57bd70f2023-01-12 05:25:51 -050023
Joey Armstronga5278142023-06-28 16:56:54 -040024ifndef mk-include--onf-make # single-include guard macro
25
Joey Armstrong04cdd9f2023-06-09 15:18:23 -040026$(if $(DEBUG),$(warning ENTER))
Joey Armstrong57bd70f2023-01-12 05:25:51 -050027
Joey Armstrong04cdd9f2023-06-09 15:18:23 -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 Armstrong57bd70f2023-01-12 05:25:51 -050035
Joey Armstronga5278142023-06-28 16:56:54 -040036TOP ?= $(patsubst %/makefiles/include.mk,%,$(onf-mk-abs))
Joey Armstrong04cdd9f2023-06-09 15:18:23 -040037
38include $(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
Joey Armstrong04cdd9f2023-06-09 15:18:23 -040042include $(ONF_MAKEDIR)/commands/include.mk # Tools and local installers
43
44include $(ONF_MAKEDIR)/virtualenv.mk# # lint-{jjb,python} depends on venv
Joey Armstronga5278142023-06-28 16:56:54 -040045include $(ONF_MAKEDIR)/patches/include.mk# # Patch when python 3.10+ in use
Joey Armstrong04cdd9f2023-06-09 15:18:23 -040046include $(ONF_MAKEDIR)/lint/include.mk
Joey Armstronga5278142023-06-28 16:56:54 -040047
48include $(ONF_MAKEDIR)/gerrit/include.mk
49include $(ONF_MAKEDIR)/git/include.mk
50include $(ONF_MAKEDIR)/golang/include.mk
51include $(ONF_MAKEDIR)/jjb/include.mk
52
53$(if $(USE-VOLTHA-RELEASE-MK),\
54 $(eval include $(ONF_MAKEDIR)/release/include.mk))
Joey Armstrong04cdd9f2023-06-09 15:18:23 -040055
56include $(ONF_MAKEDIR)/todo.mk
57include $(ONF_MAKEDIR)/help/variables.mk
58
59##---------------------##
60##---] ON_DEMAND [---##
61##---------------------##
Joey Armstronga5278142023-06-28 16:56:54 -040062$(if $(USE-ONF-GERRIT-MK),$(eval include $(ONF_MAKEDIR)/gerrit/include.mk))
63$(if $(USE-ONF-DOCKER-MK),$(eval include $(ONF_MAKEDIR)/docker/include.mk))
Joey Armstrong04cdd9f2023-06-09 15:18:23 -040064
65##-------------------##
66##---] TARGETS [---##
67##-------------------##
Joey Armstronga5278142023-06-28 16:56:54 -040068include $(ONF_MAKEDIR)/targets/include.mk # clean, sterile
Joey Armstrong04cdd9f2023-06-09 15:18:23 -040069
70$(if $(DEBUG),$(warning LEAVE))
71
Joey Armstronga5278142023-06-28 16:56:54 -040072mk-include--onf-make := true
73
74endif # mk-include--onf-make
Joey Armstrong57bd70f2023-01-12 05:25:51 -050075
76# [EOF]