Joey Armstrong | 3f575f7 | 2023-01-15 23:49:19 -0500 | [diff] [blame] | 1 | # -*- makefile -*- |
| 2 | # ----------------------------------------------------------------------- |
Joey Armstrong | 518f357 | 2024-02-11 07:56:25 -0500 | [diff] [blame] | 3 | # Copyright 2022-2024 Open Networking Foundation (ONF) and the ONF Contributors |
Joey Armstrong | 3f575f7 | 2023-01-15 23:49:19 -0500 | [diff] [blame] | 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 Armstrong | 518f357 | 2024-02-11 07:56:25 -0500 | [diff] [blame] | 17 | # SPDX-FileCopyrightText: 2024 Open Networking Foundation (ONF) and the ONF Contributors |
Joey Armstrong | 3f575f7 | 2023-01-15 23:49:19 -0500 | [diff] [blame] | 18 | # SPDX-License-Identifier: Apache-2.0 |
| 19 | # ----------------------------------------------------------------------- |
Joey Armstrong | dd33449 | 2023-07-09 17:59:02 -0400 | [diff] [blame] | 20 | # https://gerrit.opencord.org/plugins/gitiles/onf-make |
| 21 | # ONF.makefiles.include.version = 1.1 |
| 22 | # ----------------------------------------------------------------------- |
| 23 | |
| 24 | ifndef mk-include--onf-make # single-include guard macro |
Joey Armstrong | 3f575f7 | 2023-01-15 23:49:19 -0500 | [diff] [blame] | 25 | |
| 26 | $(if $(DEBUG),$(warning ENTER)) |
| 27 | |
Joey Armstrong | dd33449 | 2023-07-09 17:59:02 -0400 | [diff] [blame] | 28 | ## ----------------------------------------------------------------------- |
| 29 | ## Define vars based on relative import (normalize symlinks) |
| 30 | ## Usage: include makefiles/onf/include.mk |
| 31 | ## ----------------------------------------------------------------------- |
| 32 | onf-mk-abs ?= $(abspath $(lastword $(MAKEFILE_LIST))) |
| 33 | onf-mk-top := $(subst /include.mk,$(null),$(onf-mk-abs)) |
| 34 | ONF_MAKEDIR := $(onf-mk-top) |
Joey Armstrong | b3a0641 | 2023-02-06 09:58:58 -0500 | [diff] [blame] | 35 | |
Joey Armstrong | dd33449 | 2023-07-09 17:59:02 -0400 | [diff] [blame] | 36 | TOP ?= $(patsubst %/makefiles/include.mk,%,$(onf-mk-abs)) |
Joey Armstrong | 3f575f7 | 2023-01-15 23:49:19 -0500 | [diff] [blame] | 37 | |
Joey Armstrong | dd33449 | 2023-07-09 17:59:02 -0400 | [diff] [blame] | 38 | include $(ONF_MAKEDIR)/consts.mk |
| 39 | include $(ONF_MAKEDIR)/help/include.mk # render target help |
| 40 | include $(ONF_MAKEDIR)/utils/include.mk # dependency-less helper macros |
| 41 | include $(ONF_MAKEDIR)/etc/include.mk # banner macros |
| 42 | include $(ONF_MAKEDIR)/commands/include.mk # Tools and local installers |
Joey Armstrong | b3a0641 | 2023-02-06 09:58:58 -0500 | [diff] [blame] | 43 | |
Joey Armstrong | dd33449 | 2023-07-09 17:59:02 -0400 | [diff] [blame] | 44 | include $(ONF_MAKEDIR)/virtualenv.mk# # lint-{jjb,python} depends on venv |
Joey Armstrong | 4960ec9 | 2023-07-19 09:04:20 -0400 | [diff] [blame] | 45 | # include $(ONF_MAKEDIR)/patches/include.mk# # Patch when python 3.10+ in use |
Joey Armstrong | dd33449 | 2023-07-09 17:59:02 -0400 | [diff] [blame] | 46 | include $(ONF_MAKEDIR)/lint/include.mk |
Joey Armstrong | 01bbf8d | 2023-03-05 06:20:14 -0500 | [diff] [blame] | 47 | |
Joey Armstrong | dd33449 | 2023-07-09 17:59:02 -0400 | [diff] [blame] | 48 | include $(ONF_MAKEDIR)/gerrit/include.mk |
| 49 | include $(ONF_MAKEDIR)/git/include.mk |
| 50 | include $(ONF_MAKEDIR)/jjb/include.mk |
Joey Armstrong | f320860 | 2023-06-03 15:12:23 -0400 | [diff] [blame] | 51 | |
Joey Armstrong | dd33449 | 2023-07-09 17:59:02 -0400 | [diff] [blame] | 52 | $(if $(USE-VOLTHA-RELEASE-MK),\ |
| 53 | $(eval include $(ONF_MAKEDIR)/release/include.mk)) |
Joey Armstrong | 7ee6526 | 2023-06-02 09:55:04 -0400 | [diff] [blame] | 54 | |
Joey Armstrong | dd33449 | 2023-07-09 17:59:02 -0400 | [diff] [blame] | 55 | include $(ONF_MAKEDIR)/todo.mk |
| 56 | include $(ONF_MAKEDIR)/help/variables.mk |
| 57 | |
| 58 | ##---------------------## |
| 59 | ##---] ON_DEMAND [---## |
| 60 | ##---------------------## |
| 61 | $(if $(USE-ONF-GERRIT-MK),$(eval include $(ONF_MAKEDIR)/gerrit/include.mk)) |
| 62 | $(if $(USE-ONF-DOCKER-MK),$(eval include $(ONF_MAKEDIR)/docker/include.mk)) |
Joey Armstrong | 3f575f7 | 2023-01-15 23:49:19 -0500 | [diff] [blame] | 63 | |
Joey Armstrong | 01bbf8d | 2023-03-05 06:20:14 -0500 | [diff] [blame] | 64 | ##-------------------## |
| 65 | ##---] TARGETS [---## |
| 66 | ##-------------------## |
Joey Armstrong | 096db2d | 2024-07-22 16:04:44 -0400 | [diff] [blame] | 67 | $(error onf-mkdir=$(ONF_MAKEDIR)) |
Joey Armstrong | dd33449 | 2023-07-09 17:59:02 -0400 | [diff] [blame] | 68 | include $(ONF_MAKEDIR)/targets/include.mk # clean, sterile |
Joey Armstrong | 01bbf8d | 2023-03-05 06:20:14 -0500 | [diff] [blame] | 69 | |
Joey Armstrong | 3f575f7 | 2023-01-15 23:49:19 -0500 | [diff] [blame] | 70 | $(if $(DEBUG),$(warning LEAVE)) |
| 71 | |
Joey Armstrong | dd33449 | 2023-07-09 17:59:02 -0400 | [diff] [blame] | 72 | mk-include--onf-make := true |
| 73 | |
| 74 | endif # mk-include--onf-make |
Joey Armstrong | 01bbf8d | 2023-03-05 06:20:14 -0500 | [diff] [blame] | 75 | |
Joey Armstrong | 3f575f7 | 2023-01-15 23:49:19 -0500 | [diff] [blame] | 76 | # [EOF] |