blob: d7c6ca8b192c36995f8c1f4873584ed1a6b96a81 [file] [log] [blame]
Joey Armstrong36c9bcd2023-04-05 19:05:56 -04001# -*- makefile -*-
2# -----------------------------------------------------------------------
3# Copyright 2017-2023 Open Networking Foundation
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#
17# SPDX-FileCopyrightText: 2017-2023 Open Networking Foundation (ONF) and the ONF Contributors
18# SPDX-License-Identifier: Apache-2.0
19# -----------------------------------------------------------------------
20
21$(if $(DEBUG),$(warning ENTER))
22
23##--------------------##
24##---] INCLUDES [---##
25##--------------------##
26include $(MAKEDIR)/release/consts.mk
27include $(MAKEDIR)/release/macros.mk
28
29## -----------------------------------------------------------------------
30## Intent: Dispaly a help section for release targets
31## -----------------------------------------------------------------------
32help::
33 @echo
34 @echo '[RELEASE]'
35 @echo ' release Creates release ready binaries for BBSimctl and BBR artifacts'
36
37##--------------------##
38##---] INCLUDES [---##
39##--------------------##
40include $(MAKEDIR)/release/bbr.mk
41include $(MAKEDIR)/release/bbsim.mk
42include $(MAKEDIR)/release/bbsimctl.mk
43
44## -----------------------------------------------------------------------
45## Intent: Cross-compile binaries for release
46## -----------------------------------------------------------------------
47release-target-deps += release-bbr
48release-target-deps += release-bbsim
49# release-deps += release-bbsimctl
50
51## -----------------------------------------------------------------------
52## Intent: Create a release from targets release-{bbr,bbsim,bbsimctl}
53## Debug: $(foreach tgt,$(release-target-deps),$(info ** release-target-deps=$(tgt)))
54## -----------------------------------------------------------------------
55.PHONY: release
56release: $(release-target-deps)
57
58## -----------------------------------------------------------------------
59## Intent: Initialize storage then build release target groups (bbr, bbsim)
60## -----------------------------------------------------------------------
61.PHONY: $(release-targetdeps)
62$(release-target-deps) : release-init-mkdir
63
64## -----------------------------------------------------------------------
65## Intent: Prepare for a clean release build
66## -----------------------------------------------------------------------
67release-init:
68 @echo
69 @echo "** -----------------------------------------------------------------------"
70 @echo "** $(MAKE): processing target [$@]"
71 @echo "** -----------------------------------------------------------------------"
72
73 @echo -e "\n** Create filesystem target for docker volume: $(RELEASE_DIR)"
74 $(RM) -r "./$(RELEASE_DIR)"
75 mkdir -vp "$(RELEASE_DIR)"
76
77## -----------------------------------------------------------------------
78## Intent: Create storage for release binaries and docker volume mount
79## -----------------------------------------------------------------------
80.PHONY: release-init
81release-init-mkdir:
82 mkdir -vp "$(RELEASE_DIR)"
83
84$(if $(DEBUG),$(warning LEAVE))
85
86# [EOF]