Joey Armstrong | f9bffdf | 2022-12-27 07:05:28 -0500 | [diff] [blame] | 1 | # -*- makefile -*- |
| 2 | # ----------------------------------------------------------------------- |
Joey Armstrong | 3f0e242 | 2023-07-05 18:25:41 -0400 | [diff] [blame] | 3 | # Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors |
Joey Armstrong | f9bffdf | 2022-12-27 07:05:28 -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 | 3f0e242 | 2023-07-05 18:25:41 -0400 | [diff] [blame] | 17 | # SPDX-FileCopyrightText: 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors |
Joey Armstrong | f9bffdf | 2022-12-27 07:05:28 -0500 | [diff] [blame] | 18 | # SPDX-License-Identifier: Apache-2.0 |
| 19 | # ----------------------------------------------------------------------- |
Joey Armstrong | 3f0e242 | 2023-07-05 18:25:41 -0400 | [diff] [blame] | 20 | # https://gerrit.opencord.org/plugins/gitiles/onf-make |
| 21 | # ONF.makefile.version = 1.0 |
| 22 | # ----------------------------------------------------------------------- |
| 23 | |
| 24 | ifndef mk-include--onf-make # single-include guard macor |
Joey Armstrong | f9bffdf | 2022-12-27 07:05:28 -0500 | [diff] [blame] | 25 | |
| 26 | $(if $(DEBUG),$(warning ENTER)) |
| 27 | |
Joey Armstrong | 3f0e242 | 2023-07-05 18:25:41 -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 | f9bffdf | 2022-12-27 07:05:28 -0500 | [diff] [blame] | 35 | |
Joey Armstrong | 3f0e242 | 2023-07-05 18:25:41 -0400 | [diff] [blame] | 36 | include $(ONF_MAKEDIR)/consts.mk |
| 37 | include $(ONF_MAKEDIR)/help.mk |
| 38 | # include $(ONF_MAKEDIR)/help/include.mk # render target help |
| 39 | # include $(ONF_MAKEDIR)/utils/include.mk # dependency-less helper macros |
| 40 | include $(ONF_MAKEDIR)/etc/include.mk # banner macros |
| 41 | |
| 42 | # include $(ONF_MAKEDIR)/etc/commands.mk # Tools and local installers |
| 43 | |
| 44 | include $(ONF_MAKEDIR)/virtualenv.mk# # lint-{jjb,python} depends on venv |
| 45 | # include $(ONF_MAKEDIR)/lint/include.mk |
| 46 | # include $(ONF_MAKEDIR)/git-submodules.mk |
| 47 | # include $(ONF_MAKEDIR)/gerrit/include.mk |
| 48 | |
| 49 | include $(ONF_MAKEDIR)/todo.mk |
| 50 | # include $(ONF_MAKEDIR)/help/variables.mk |
| 51 | |
| 52 | ##---------------------## |
| 53 | ##---] ON_DEMAND [---## |
| 54 | ##---------------------## |
| 55 | $(if $(USE_DOCKER_MK),$(eval include $(ONF_MAKEDIR)/docker/include.mk)) |
| 56 | |
| 57 | ##-------------------## |
| 58 | ##---] TARGETS [---## |
| 59 | ##-------------------## |
| 60 | include $(ONF_MAKEDIR)/targets/clean.mk |
| 61 | # include $(ONF_MAKEDIR)/targets/check.mk |
| 62 | include $(ONF_MAKEDIR)/targets/sterile.mk |
| 63 | # include $(ONF_MAKEDIR)/targets/test.mk |
Joey Armstrong | f9bffdf | 2022-12-27 07:05:28 -0500 | [diff] [blame] | 64 | |
| 65 | $(if $(DEBUG),$(warning LEAVE)) |
| 66 | |
Joey Armstrong | 3f0e242 | 2023-07-05 18:25:41 -0400 | [diff] [blame] | 67 | ## -------------------------------------------------------------------------- |
| 68 | ## structure to support pre/post target handling w/o inlining in Makefile (?) |
| 69 | ## -------------------------------------------------------------------------- |
| 70 | ## include makefiles/include.mk |
| 71 | ## include makefiles/main/enter.mk |
| 72 | ## [... include *.mk ...] |
| 73 | ## include makefiles/main/leave.mk |
| 74 | |
| 75 | mk-include--onf-make := true |
| 76 | |
| 77 | endif # mk-include--onf-make |
| 78 | |
Joey Armstrong | f9bffdf | 2022-12-27 07:05:28 -0500 | [diff] [blame] | 79 | # [EOF] |