blob: 48de1e93d75bcc103e7fc1900c7dee2555fe7182 [file] [log] [blame]
Joey Armstrong0205d332023-04-11 17:29:23 -04001# -*- makefile -*-
2# -----------------------------------------------------------------------
Joey Armstrong686d3b92023-09-15 17:59:59 -04003# Copyright 2017-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 Armstrong686d3b92023-09-15 17:59:59 -040016# -----------------------------------------------------------------------
17# SPDX-FileCopyrightText: 2017-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 Armstrongf128de82023-09-08 17:05:18 -040021# ONF.makefiles.include.version = 1.1
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 Armstronga8205c22023-10-18 13:35:16 -040028##-------------------##
29##---] GLOBALS [---##
30##-------------------##
31
Joey Armstrong7ad5c362023-07-09 19:10:16 -040032## -----------------------------------------------------------------------
33## Define vars based on relative import (normalize symlinks)
34## Usage: include makefiles/onf/include.mk
Joey Armstronga8205c22023-10-18 13:35:16 -040035## Overide-by: makefiles/onf-lib/makefiles/include.mk
36## when repo:onf-make is used as a git-submodule
Joey Armstrong7ad5c362023-07-09 19:10:16 -040037## -----------------------------------------------------------------------
38onf-mk-abs ?= $(abspath $(lastword $(MAKEFILE_LIST)))
39onf-mk-top := $(subst /include.mk,$(null),$(onf-mk-abs))
Joey Armstronga8205c22023-10-18 13:35:16 -040040onf-mk-tmp := $(onf-mk-top)/tmp
Joey Armstrong7ad5c362023-07-09 19:10:16 -040041ONF_MAKEDIR := $(onf-mk-top)
Joey Armstrong0205d332023-04-11 17:29:23 -040042
Joey Armstrong7ad5c362023-07-09 19:10:16 -040043TOP ?= $(patsubst %/makefiles/include.mk,%,$(onf-mk-abs))
Joey Armstrong0205d332023-04-11 17:29:23 -040044
Joey Armstronga8205c22023-10-18 13:35:16 -040045##--------------------##
46##---] INCLUDES [---##
47##--------------------##
Joey Armstrong216b04b2023-09-29 16:31:19 -040048include $(ONF_MAKEDIR)/lint/make/warn-undef-vars.mk # target lint-make helper
49
Joey Armstrong7ad5c362023-07-09 19:10:16 -040050include $(ONF_MAKEDIR)/consts.mk
51include $(ONF_MAKEDIR)/help/include.mk # render target help
52include $(ONF_MAKEDIR)/utils/include.mk # dependency-less helper macros
53include $(ONF_MAKEDIR)/etc/include.mk # banner macros
54include $(ONF_MAKEDIR)/commands/include.mk # Tools and local installers
Joey Armstrong42f4ce62023-06-09 12:56:48 -040055
Joey Armstronge6a99912023-09-15 14:47:51 -040056include $(ONF_MAKEDIR)/virtualenv/include.mk# # python, lint, JJB dependency
Joey Armstrongf128de82023-09-08 17:05:18 -040057# include $(ONF_MAKEDIR)/patches/include.mk# # Patch when python 3.10+ in use
Joey Armstrong7ad5c362023-07-09 19:10:16 -040058include $(ONF_MAKEDIR)/lint/include.mk
Joey Armstrong0205d332023-04-11 17:29:23 -040059
Joey Armstrong7ad5c362023-07-09 19:10:16 -040060include $(ONF_MAKEDIR)/gerrit/include.mk
61include $(ONF_MAKEDIR)/git/include.mk
62include $(ONF_MAKEDIR)/jjb/include.mk
Joey Armstrong0205d332023-04-11 17:29:23 -040063
Joey Armstrong7ad5c362023-07-09 19:10:16 -040064$(if $(USE-VOLTHA-RELEASE-MK),\
65 $(eval include $(ONF_MAKEDIR)/release/include.mk))
Joey Armstronga6890342023-06-01 17:07:51 -040066
Joey Armstrong7ad5c362023-07-09 19:10:16 -040067include $(ONF_MAKEDIR)/todo.mk
68include $(ONF_MAKEDIR)/help/variables.mk
Joey Armstrongd26858f2023-07-08 15:52:16 -040069
Joey Armstrong7ad5c362023-07-09 19:10:16 -040070##---------------------##
71##---] ON_DEMAND [---##
72##---------------------##
73$(if $(USE-ONF-GERRIT-MK),$(eval include $(ONF_MAKEDIR)/gerrit/include.mk))
74$(if $(USE-ONF-DOCKER-MK),$(eval include $(ONF_MAKEDIR)/docker/include.mk))
Joey Armstrongd26858f2023-07-08 15:52:16 -040075
Joey Armstrong7ad5c362023-07-09 19:10:16 -040076##-------------------##
77##---] TARGETS [---##
78##-------------------##
79include $(ONF_MAKEDIR)/targets/include.mk # clean, sterile
Joey Armstrong0205d332023-04-11 17:29:23 -040080
81$(if $(DEBUG),$(warning LEAVE))
82
Joey Armstrong7ad5c362023-07-09 19:10:16 -040083mk-include--onf-make := true
84
85endif # mk-include--onf-make
86
Joey Armstrong0205d332023-04-11 17:29:23 -040087# [EOF]