Obsolete VTE pre-2.91 ABI
[oi-userland.git] / components / openindiana / bhyve-fw / Makefile
blob03b4189d2b58b33438493db4ab038bf3df1b03ed
2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
5 # 1.0 of the CDDL.
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright 2022 OmniOS Community Edition (OmniOSce) Association.
16 include ../../../make-rules/shared-macros.mk
18 COMPONENT_NAME= uefi-edk2
19 COMPONENT_VERSION= 20230801
20 #COMPONENT_REVISION= 0
21 COMPONENT_FMRI= system/bhyve/firmware
22 COMPONENT_CLASSIFICATION=System/Core
23 COMPONENT_SUMMARY= UEFI-EDK2(+CSM) firmware for bhyve
25 COMPONENT_TAG= il-udk2014.sp1-3
26 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_TAG)
27 COMPONENT_ARCHIVE= $(COMPONENT_NAME)-$(COMPONENT_TAG).tar.xz
28 COMPONENT_ARCHIVE_HASH= \
29 sha256:998236765edaa683afc9a4799d40992c92d7ed543abf3fd28a3bc8b40aa2bc3d
30 COMPONENT_ARCHIVE_URL= \
31 https://github.com/illumos/$(COMPONENT_NAME)/releases/download/$(COMPONENT_TAG)/$(COMPONENT_ARCHIVE)
33 COMPONENT_TAG_1= il-edk2-stable202308-1
34 COMPONENT_SRC_1= $(COMPONENT_NAME)-$(COMPONENT_TAG_1)
35 COMPONENT_ARCHIVE_1= $(COMPONENT_NAME)-$(COMPONENT_TAG_1).tar.xz
36 COMPONENT_ARCHIVE_HASH_1= \
37 sha256:8aaacf4b7c6a875c78492ad74856802abcbce89ee8cf980efbd12c74946b3b79
38 COMPONENT_ARCHIVE_URL_1= \
39 https://github.com/illumos/$(COMPONENT_NAME)/releases/download/$(COMPONENT_TAG_1)/$(COMPONENT_ARCHIVE_1)
41 COMPONENT_PROJECT_URL= https://github.com/illumos/uefi-edk2
42 COMPONENT_LICENSE= simplified-BSD
44 include $(WS_MAKE_RULES)/prep.mk
45 include $(WS_MAKE_RULES)/justmake.mk
46 include $(WS_MAKE_RULES)/ips.mk
48 ENV = /usr/bin/env -i
50 COMPONENT_BUILD_ENV = PATH=$(PATH.illumos)
51 COMPONENT_BUILD_ENV += GMAKE=/usr/bin/gmake
52 COMPONENT_BUILD_ENV += GAS=/usr/bin/gas
53 COMPONENT_BUILD_ENV += GAR=/usr/bin/gar
54 COMPONENT_BUILD_ENV += GLD=/usr/bin/gld
55 COMPONENT_BUILD_ENV += GOBJCOPY=/usr/bin/gobjcopy
57 # Four variants of the bhyve firmware are built;
58 # DEBUG and RELEASE, and with and without CSM.
59 VARIANTS = DEBUG DEBUG.csm RELEASE RELEASE.csm
61 BUILD_64 = $(VARIANTS:%=$(BUILD_DIR)/%/.built)
62 INSTALL_64 = $(VARIANTS:%=$(BUILD_DIR)/%/.installed)
64 COMPONENT_BUILD_ACTION = \
65 cd $(@D); $(ENV) $(COMPONENT_BUILD_ENV) \
66 ./build $(COMPONENT_BUILD_ARGS) $(COMPONENT_BUILD_TARGETS)
68 $(BUILD_DIR)/RELEASE/.built: SOURCE_DIR = $(SOURCE_DIR_1)
69 $(BUILD_DIR)/RELEASE/.built: COMPONENT_BUILD_ENV += GCCPATH=$(GCC_ROOT)
70 $(BUILD_DIR)/RELEASE/.built: COMPONENT_BUILD_ARGS =
71 $(BUILD_DIR)/RELEASE/.built: COMPONENT_BUILD_TARGETS = RELEASE
73 $(BUILD_DIR)/DEBUG/.built: SOURCE_DIR = $(SOURCE_DIR_1)
74 $(BUILD_DIR)/DEBUG/.built: COMPONENT_BUILD_ENV += GCCPATH=$(GCC_ROOT)
75 $(BUILD_DIR)/DEBUG/.built: COMPONENT_BUILD_ARGS =
76 $(BUILD_DIR)/DEBUG/.built: COMPONENT_BUILD_TARGETS = DEBUG
78 $(BUILD_DIR)/RELEASE.csm/.built: COMPONENT_BUILD_ENV += GCCPATH=/opt/gcc/4.4.4
79 $(BUILD_DIR)/RELEASE.csm/.built: COMPONENT_BUILD_ENV += PYTHON=/usr/bin/amd64/python2.7
80 $(BUILD_DIR)/RELEASE.csm/.built: COMPONENT_BUILD_ARGS = -csm
81 $(BUILD_DIR)/RELEASE.csm/.built: COMPONENT_BUILD_TARGETS = RELEASE
83 $(BUILD_DIR)/DEBUG.csm/.built: COMPONENT_BUILD_ENV += GCCPATH=/opt/gcc/4.4.4
84 $(BUILD_DIR)/DEBUG.csm/.built: COMPONENT_BUILD_ENV += PYTHON=/usr/bin/amd64/python2.7
85 $(BUILD_DIR)/DEBUG.csm/.built: COMPONENT_BUILD_ARGS = -csm
86 $(BUILD_DIR)/DEBUG.csm/.built: COMPONENT_BUILD_TARGETS = DEBUG
88 COMPONENT_PRE_INSTALL_ACTION = \
89 $(MKDIR) -p $(PROTO_DIR)/usr/share/bhyve/firmware
91 COMPONENT_INSTALL_ACTION = \
92 cd $(@D); \
93 $(CP) ./Build/BhyveX64/$(COMPONENT_INSTALL_TARGETS)_ILLGCC/FV/$(COMPONENT_INSTALL_SOURCE) \
94 $(PROTO_DIR)/usr/share/bhyve/firmware/$(COMPONENT_INSTALL_FILE)
96 $(BUILD_DIR)/DEBUG/.installed: COMPONENT_INSTALL_SOURCE = BHYVE_CODE.fd
97 $(BUILD_DIR)/DEBUG/.installed: COMPONENT_INSTALL_TARGETS = DEBUG
98 $(BUILD_DIR)/DEBUG/.installed: COMPONENT_INSTALL_FILE = BHYVE_DEBUG.fd
100 $(BUILD_DIR)/DEBUG.csm/.installed: COMPONENT_INSTALL_SOURCE = BHYVE.fd
101 $(BUILD_DIR)/DEBUG.csm/.installed: COMPONENT_INSTALL_TARGETS = DEBUG
102 $(BUILD_DIR)/DEBUG.csm/.installed: COMPONENT_INSTALL_FILE = BHYVE_DEBUG_CSM.fd
104 $(BUILD_DIR)/RELEASE/.installed: COMPONENT_INSTALL_SOURCE = BHYVE_CODE.fd
105 $(BUILD_DIR)/RELEASE/.installed: COMPONENT_INSTALL_TARGETS = RELEASE
106 $(BUILD_DIR)/RELEASE/.installed: COMPONENT_INSTALL_FILE = BHYVE_RELEASE.fd
107 $(BUILD_DIR)/RELEASE/.installed: \
108 COMPONENT_POST_INSTALL_ACTION = \
109 $(LN) -s $(COMPONENT_INSTALL_FILE) \
110 $(PROTO_DIR)/usr/share/bhyve/firmware/BHYVE.fd; \
111 $(CP) $(@D)/Build/BhyveX64/$(COMPONENT_INSTALL_TARGETS)_ILLGCC/FV/BHYVE_VARS.fd \
112 $(PROTO_DIR)/usr/share/bhyve/firmware/BHYVE_VARS.fd
114 $(BUILD_DIR)/RELEASE.csm/.installed: COMPONENT_INSTALL_SOURCE = BHYVE.fd
115 $(BUILD_DIR)/RELEASE.csm/.installed: COMPONENT_INSTALL_TARGETS = RELEASE
116 $(BUILD_DIR)/RELEASE.csm/.installed: COMPONENT_INSTALL_FILE = BHYVE_RELEASE_CSM.fd
117 $(BUILD_DIR)/RELEASE.csm/.installed: \
118 COMPONENT_POST_INSTALL_ACTION = $(LN) -s $(COMPONENT_INSTALL_FILE) \
119 $(PROTO_DIR)/usr/share/bhyve/firmware/BHYVE_CSM.fd
121 build: $(BUILD_64)
123 install: $(INSTALL_64)
125 test: $(NO_TESTS)
127 # Build dependencies
128 REQUIRED_PACKAGES += developer/acpi
129 REQUIRED_PACKAGES += developer/illumos-gcc
130 REQUIRED_PACKAGES += runtime/python-27
132 # Auto-generated dependencies