blob: 1bea64ec1b66cc8b84e5df78ecbdb3b31dec042b [file] [log] [blame]
Joey Armstrong0205d332023-04-11 17:29:23 -04001# -*- makefile -*-
2# -----------------------------------------------------------------------
Joey Armstrong7d51e8a2023-12-09 11:58:42 -05003# Copyright 2017-2024 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# -----------------------------------------------------------------------
Joey Armstrong7d51e8a2023-12-09 11:58:42 -050017# SPDX-FileCopyrightText: 2017-2024 Open Networking Foundation (ONF) and the ONF Contributors
Joey Armstrong7ad5c362023-07-09 19:10:16 -040018# SPDX-License-Identifier: Apache-2.0
19# -----------------------------------------------------------------------
Joey Armstronga6890342023-06-01 17:07:51 -040020
Joey Armstrong0205d332023-04-11 17:29:23 -040021$(if $(DEBUG),$(warning ENTER))
22
Joey Armstronga8205c22023-10-18 13:35:16 -040023##-------------------##
24##---] GLOBALS [---##
25##-------------------##
Joey Armstrong7d51e8a2023-12-09 11:58:42 -050026# DEBUG := 1
27# DEBUG-onf-mk-paths := 1
Joey Armstronga8205c22023-10-18 13:35:16 -040028
Joey Armstrong7ad5c362023-07-09 19:10:16 -040029## -----------------------------------------------------------------------
Joey Armstrong7d51e8a2023-12-09 11:58:42 -050030## [LOADER] Define path vars based on library include directory
Joey Armstrong7ad5c362023-07-09 19:10:16 -040031## -----------------------------------------------------------------------
Joey Armstrong7d51e8a2023-12-09 11:58:42 -050032$(foreach makefile,$(lastword $(MAKEFILE_LIST)),\
33 $(foreach makedir,$(abspath $(dir $(makefile))),\
34 $(eval include $(makedir)/library-makefiles.mk)\
35))
Joey Armstrong0205d332023-04-11 17:29:23 -040036
Joey Armstrong7d51e8a2023-12-09 11:58:42 -050037$(call gen-mk-paths,onf-mk) # [ALSO] $(call gen-mk-include,onf-mk)
38
39## Missing required vars are fatal
40onf-mk-dir ?= $(error onf-mk-dir= is required)
41onf-mk-top ?= $(error onf-mk-top= is required)
42onf-mk-tmp := $(onf-mk-top)/tmp
43
44ONF_MAKEDIR := $(onf-mk-dir)# # TODO: Deprecate ONF_MAKEDIR and MAKEDIR
Joey Armstrong0205d332023-04-11 17:29:23 -040045
Joey Armstronga2db6cd2023-11-30 12:16:18 -050046#--------------------##
Joey Armstronga8205c22023-10-18 13:35:16 -040047##---] INCLUDES [---##
48##--------------------##
Joey Armstrong216b04b2023-09-29 16:31:19 -040049include $(ONF_MAKEDIR)/lint/make/warn-undef-vars.mk # target lint-make helper
50
Joey Armstrong7ad5c362023-07-09 19:10:16 -040051include $(ONF_MAKEDIR)/consts.mk
52include $(ONF_MAKEDIR)/help/include.mk # render target help
53include $(ONF_MAKEDIR)/utils/include.mk # dependency-less helper macros
54include $(ONF_MAKEDIR)/etc/include.mk # banner macros
55include $(ONF_MAKEDIR)/commands/include.mk # Tools and local installers
Joey Armstrong42f4ce62023-06-09 12:56:48 -040056
Joey Armstronge6a99912023-09-15 14:47:51 -040057include $(ONF_MAKEDIR)/virtualenv/include.mk# # python, lint, JJB dependency
Joey Armstrongf128de82023-09-08 17:05:18 -040058# include $(ONF_MAKEDIR)/patches/include.mk# # Patch when python 3.10+ in use
Joey Armstrong7ad5c362023-07-09 19:10:16 -040059include $(ONF_MAKEDIR)/lint/include.mk
Joey Armstrong0205d332023-04-11 17:29:23 -040060
Joey Armstrong7ad5c362023-07-09 19:10:16 -040061include $(ONF_MAKEDIR)/gerrit/include.mk
62include $(ONF_MAKEDIR)/git/include.mk
63include $(ONF_MAKEDIR)/jjb/include.mk
Joey Armstrong0205d332023-04-11 17:29:23 -040064
Joey Armstrong7ad5c362023-07-09 19:10:16 -040065$(if $(USE-VOLTHA-RELEASE-MK),\
66 $(eval include $(ONF_MAKEDIR)/release/include.mk))
Joey Armstronga6890342023-06-01 17:07:51 -040067
Joey Armstrong7ad5c362023-07-09 19:10:16 -040068include $(ONF_MAKEDIR)/todo.mk
69include $(ONF_MAKEDIR)/help/variables.mk
Joey Armstrongd26858f2023-07-08 15:52:16 -040070
Joey Armstrong7d51e8a2023-12-09 11:58:42 -050071##------------------------------------##
72##---] Languages & Interpreters [---##
73##------------------------------------##
Joey Armstrongcacdaa02024-02-08 16:40:55 -050074# [TODO] $(if $(golang-mode),$(eval include))
75include $(ONF_MAKEDIR)/golang/include.mk
Joey Armstrong7d51e8a2023-12-09 11:58:42 -050076
Joey Armstrong7ad5c362023-07-09 19:10:16 -040077##---------------------##
78##---] ON_DEMAND [---##
79##---------------------##
80$(if $(USE-ONF-GERRIT-MK),$(eval include $(ONF_MAKEDIR)/gerrit/include.mk))
81$(if $(USE-ONF-DOCKER-MK),$(eval include $(ONF_MAKEDIR)/docker/include.mk))
Joey Armstrongd26858f2023-07-08 15:52:16 -040082
Joey Armstrong7ad5c362023-07-09 19:10:16 -040083##-------------------##
84##---] TARGETS [---##
85##-------------------##
86include $(ONF_MAKEDIR)/targets/include.mk # clean, sterile
Joey Armstrong0205d332023-04-11 17:29:23 -040087
Joey Armstronga2db6cd2023-11-30 12:16:18 -050088## Display make help text late
89include $(ONF_MAKEDIR)/help/trailer.mk
90
Joey Armstrong0205d332023-04-11 17:29:23 -040091$(if $(DEBUG),$(warning LEAVE))
92
Joey Armstrong0205d332023-04-11 17:29:23 -040093# [EOF]