2018-08-16 17:54:31 -05:00
|
|
|
# SONiC make file
|
2016-08-04 12:39:33 -05:00
|
|
|
|
2020-12-24 23:55:20 -06:00
|
|
|
NOJESSIE ?= 1
|
2020-02-02 14:04:18 -06:00
|
|
|
NOSTRETCH ?= 0
|
2021-06-30 14:45:40 -05:00
|
|
|
NOBUSTER ?= 0
|
2021-06-30 14:45:40 -05:00
|
|
|
NOBULLSEYE ?= 0
|
2016-10-31 23:50:59 -05:00
|
|
|
|
2021-08-05 20:11:54 -05:00
|
|
|
ifeq ($(NOJESSIE),0)
|
|
|
|
BUILD_JESSIE=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(NOSTRETCH),0)
|
|
|
|
BUILD_STRETCH=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(NOBUSTER),0)
|
|
|
|
BUILD_BUSTER=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(NOBULLSEYE),0)
|
|
|
|
BUILD_BULLSEYE=1
|
|
|
|
endif
|
|
|
|
|
|
|
|
PLATFORM_PATH := platform/$(if $(PLATFORM),$(PLATFORM),$(CONFIGURED_PLATFORM))
|
|
|
|
PLATFORM_CHECKOUT := platform/checkout
|
|
|
|
PLATFORM_CHECKOUT_FILE := $(PLATFORM_CHECKOUT)/$(PLATFORM).ini
|
|
|
|
PLATFORM_CHECKOUT_CMD := $(shell if [ -f $(PLATFORM_CHECKOUT_FILE) ]; then PLATFORM_PATH=$(PLATFORM_PATH) j2 $(PLATFORM_CHECKOUT)/template.j2 $(PLATFORM_CHECKOUT_FILE); fi)
|
|
|
|
|
2016-12-05 13:12:19 -06:00
|
|
|
%::
|
2018-08-16 17:54:31 -05:00
|
|
|
@echo "+++ --- Making $@ --- +++"
|
2019-05-27 17:50:51 -05:00
|
|
|
ifeq ($(NOJESSIE), 0)
|
2020-02-02 14:04:18 -06:00
|
|
|
EXTRA_DOCKER_TARGETS=$(notdir $@) make -f Makefile.work jessie
|
2017-09-22 02:57:23 -05:00
|
|
|
endif
|
2020-02-02 14:04:18 -06:00
|
|
|
ifeq ($(NOSTRETCH), 0)
|
|
|
|
EXTRA_DOCKER_TARGETS=$(notdir $@) BLDENV=stretch make -f Makefile.work stretch
|
|
|
|
endif
|
2021-06-30 14:45:40 -05:00
|
|
|
ifeq ($(NOBUSTER), 0)
|
2021-06-30 14:45:40 -05:00
|
|
|
EXTRA_DOCKER_TARGETS=$(notdir $@) BLDENV=buster make -f Makefile.work buster
|
2021-06-30 14:45:40 -05:00
|
|
|
endif
|
|
|
|
ifeq ($(NOBULLSEYE), 0)
|
|
|
|
BLDENV=bullseye make -f Makefile.work $@
|
|
|
|
endif
|
2016-08-04 12:39:33 -05:00
|
|
|
|
2019-05-27 17:50:51 -05:00
|
|
|
jessie:
|
2018-08-16 17:54:31 -05:00
|
|
|
@echo "+++ Making $@ +++"
|
2019-05-27 17:50:51 -05:00
|
|
|
ifeq ($(NOJESSIE), 0)
|
|
|
|
make -f Makefile.work jessie
|
2018-08-16 17:54:31 -05:00
|
|
|
endif
|
2017-12-21 13:15:06 -06:00
|
|
|
|
2020-02-02 14:04:18 -06:00
|
|
|
stretch:
|
|
|
|
@echo "+++ Making $@ +++"
|
|
|
|
ifeq ($(NOSTRETCH), 0)
|
|
|
|
make -f Makefile.work stretch
|
|
|
|
endif
|
2020-02-02 14:03:34 -06:00
|
|
|
|
2021-06-30 14:45:40 -05:00
|
|
|
buster:
|
|
|
|
@echo "+++ Making $@ +++"
|
|
|
|
ifeq ($(NOBUSTER), 0)
|
|
|
|
make -f Makefile.work buster
|
|
|
|
endif
|
|
|
|
|
2020-12-09 16:13:33 -06:00
|
|
|
init:
|
|
|
|
@echo "+++ Making $@ +++"
|
|
|
|
make -f Makefile.work $@
|
|
|
|
|
2021-08-05 20:11:54 -05:00
|
|
|
#
|
|
|
|
# Function to invoke target $@ in Makefile.work with proper BLDENV
|
|
|
|
#
|
|
|
|
define make_work
|
2018-08-16 17:54:31 -05:00
|
|
|
@echo "+++ Making $@ +++"
|
2021-08-05 20:11:54 -05:00
|
|
|
$(if $(BUILD_JESSIE),make -f Makefile.work $@,)
|
|
|
|
$(if $(BUILD_STRETCH),BLDENV=stretch make -f Makefile.work $@,)
|
|
|
|
$(if $(BUILD_BUSTER),BLDENV=buster make -f Makefile.work $@,)
|
|
|
|
$(if $(BUILD_BULLSEYE),BLDENV=bullseye make -f Makefile.work $@,)
|
|
|
|
endef
|
|
|
|
|
|
|
|
.PHONY: $(PLATFORM_PATH)
|
|
|
|
|
|
|
|
$(PLATFORM_PATH):
|
|
|
|
@echo "+++ Cheking $@ +++"
|
|
|
|
$(PLATFORM_CHECKOUT_CMD)
|
|
|
|
|
|
|
|
configure : $(PLATFORM_PATH)
|
|
|
|
$(call make_work, $@)
|
|
|
|
|
|
|
|
clean reset showtag sonic-slave-build sonic-slave-bash :
|
|
|
|
$(call make_work, $@)
|
2020-12-21 01:31:10 -06:00
|
|
|
|
|
|
|
# Freeze the versions, see more detail options: scripts/versions_manager.py freeze -h
|
|
|
|
freeze:
|
|
|
|
@scripts/versions_manager.py freeze $(FREEZE_VERSION_OPTIONS)
|