xref: /haiku/build/jam/DefaultBuildProfiles (revision 9a6a20d4689307142a7ed26a1437ba47e244e73f)
1# set HAIKU_BUILD_TYPE early
2switch $(HAIKU_BUILD_PROFILE) {
3	case "bootstrap-*" : {
4		HAIKU_BUILD_TYPE = bootstrap ;
5		EnableBuildFeatures bootstrap_image ;
6
7		# Add a third pseudo target for the platform used when building anything
8		# for stage0 of the bootstrap process.
9		NotFile bootstrap_stage0 ;
10
11		HAIKU_DEFINES += HAIKU_BOOTSTRAP_BUILD ;
12		TARGET_DEFINES += HAIKU_BOOTSTRAP_BUILD ;
13	}
14
15	case "minimum-*" : {
16		HAIKU_BUILD_TYPE = minimum ;
17		EnableBuildFeatures minimum_image ;
18
19		HAIKU_DEFINES += HAIKU_MINIMUM_BUILD ;
20		TARGET_DEFINES += HAIKU_MINIMUM_BUILD ;
21	}
22
23	case "*" : {
24		HAIKU_BUILD_TYPE = regular ;
25		EnableBuildFeatures regular_image ;
26
27		HAIKU_DEFINES += HAIKU_REGULAR_BUILD ;
28		TARGET_DEFINES += HAIKU_REGULAR_BUILD ;
29	}
30}
31Echo "Starting build of type $(HAIKU_BUILD_TYPE) ..." ;
32
33
34rule DefineDefaultBuildProfiles
35{
36	# release profiles
37	DefineBuildProfile release-raw : image : "haiku-release.image" ;
38	DefineBuildProfile release-vmware : vmware-image : "haiku-release.vmdk" ;
39	DefineBuildProfile release-cd : cd-image : "haiku-release.iso" ;
40	DefineBuildProfile release-anyboot : anyboot-image
41		: "haiku-release-anyboot.iso" ;
42
43	# nightly profiles
44	DefineBuildProfile nightly-raw : image : "haiku-nightly.image" ;
45	DefineBuildProfile nightly-mmc : haiku-mmc-image : "haiku-nightly.mmc" ;
46	DefineBuildProfile nightly-vmware : vmware-image : "haiku-nightly.vmdk" ;
47	DefineBuildProfile nightly-cd : cd-image : "haiku-nightly.iso" ;
48	DefineBuildProfile nightly-anyboot : anyboot-image
49		: "haiku-nightly-anyboot.iso" ;
50
51	# bootstrap profiles
52	DefineBuildProfile bootstrap-raw : image : "haiku-bootstrap.image" ;
53	DefineBuildProfile bootstrap-mmc : haiku-mmc-image : "haiku-bootstrap.mmc" ;
54	DefineBuildProfile bootstrap-vmware : vmware-image
55		: "haiku-bootstrap.vmdk" ;
56	DefineBuildProfile bootstrap-anyboot : anyboot-image
57		: "haiku-bootstrap-anyboot.iso" ;
58
59	# minimum profiles
60	DefineBuildProfile minimum-raw : image : "haiku-minimum.image" ;
61	DefineBuildProfile minimum-mmc : haiku-mmc-image : "haiku-minimum.mmc" ;
62	DefineBuildProfile minimum-vmware : vmware-image : "haiku-minimum.vmdk" ;
63	DefineBuildProfile minimum-cd : cd-image : "haiku-minimum.iso" ;
64	DefineBuildProfile minimum-anyboot : anyboot-image
65		: "haiku-minimum-anyboot.iso" ;
66
67	switch $(HAIKU_BUILD_PROFILE) {
68		case "release-*" : {
69			Echo Building Haiku R1/development preview ;
70			HAIKU_ROOT_USER_NAME ?= user ;
71			HAIKU_ROOT_USER_REAL_NAME ?= "Yourself" ;
72			AddGroupToHaikuImage party : 101 : user sshd ;
73			HAIKU_IMAGE_HOST_NAME ?= shredder ;
74
75			if $(HAIKU_INCLUDE_SOURCES) = 1 || $(DEBUG) != 0 {
76				HAIKU_IMAGE_SIZE ?= 1400 ;
77			} else {
78				HAIKU_IMAGE_SIZE ?= 800 ;
79			}
80
81			AddHaikuImageSystemPackages
82				bepdf
83				keymapswitcher
84				mandoc
85				noto
86				noto_sans_cjk_jp
87				openssh
88				pdfwriter
89				pe
90				timgmsoundfont
91				vision
92				wonderbrush
93				wpa_supplicant
94				# Some packages can't be built with gcc2, so we install the gcc13
95				# secondary architecture package instead in this case
96				!gcc2 @{ nano p7zip python3.10 xz_utils }@
97				gcc2 @{ nano_x86@secondary_x86 p7zip_x86@secondary_x86
98					python3.10_x86@secondary_x86 xz_utils_x86@secondary_x86 }@
99				;
100			AddHaikuImageSourcePackages
101				bepdf
102				nano
103				p7zip
104				;
105
106			local architectureObject ;
107			for architectureObject in [ MultiArchSubDirSetup ] {
108				on $(architectureObject) {
109					AddHaikuImageSystemPackages openssl3 ;
110				}
111			}
112
113			AddOptionalHaikuImagePackages BeBook Development Git Welcome ;
114
115			# WebPositive can only built for x86_gcc2, x86 and x86_64
116			if $(HAIKU_PACKAGING_ARCHS) in x86_gcc2 x86 x86_64 {
117				AddOptionalHaikuImagePackages WebPositive ;
118			} else {
119				Echo "WebPositive not available on $(HAIKU_PACKAGING_ARCHS)" ;
120			}
121		}
122
123		case "nightly-*" : {
124			Echo Building Haiku Nightly ;
125			HAIKU_ROOT_USER_NAME ?= user ;
126			HAIKU_ROOT_USER_REAL_NAME ?= "Yourself" ;
127			AddGroupToHaikuImage party : 101 : user sshd ;
128			HAIKU_IMAGE_HOST_NAME ?= shredder ;
129			if $(DEBUG) != 0 {
130				HAIKU_IMAGE_SIZE ?= 850 ;
131			}
132			HAIKU_IMAGE_SIZE ?= 650 ;
133			HAIKU_NIGHTLY_BUILD = 1 ;
134
135			AddHaikuImageSystemPackages
136				mandoc
137				noto
138				openssh
139				openssl3
140				pe
141				vision
142				wpa_supplicant
143				# xz_utils can't be built with gcc2, so we install it for
144				# primary gcc 8 architectures or gcc 2 hybrids.
145				!gcc2 @{ nano p7zip xz_utils }@
146				gcc2 @{
147					nano_x86@secondary_x86
148					p7zip_x86@secondary_x86
149					xz_utils_x86@secondary_x86
150				}@
151				;
152			AddHaikuImageSourcePackages
153				nano
154				p7zip
155				;
156
157			AddOptionalHaikuImagePackages Development Git ;
158
159			# WebPositive can only built for x86_gcc2, x86 and x86_64
160			if $(HAIKU_PACKAGING_ARCHS) in x86_gcc2 x86 x86_64 {
161				AddOptionalHaikuImagePackages WebPositive ;
162			} else {
163				Echo "WebPositive not available on $(HAIKU_PACKAGING_ARCHS)" ;
164			}
165		}
166
167		case "minimum-*" : {
168			Echo Building Haiku Minimum Target ;
169			HAIKU_IMAGE_HOST_NAME ?= shredder ;
170			if $(DEBUG) != 0 {
171				HAIKU_IMAGE_SIZE ?= 450 ;
172			}
173
174			AddHaikuImageSystemPackages
175				openssl3
176				;
177		}
178
179		case "bootstrap-*" : {
180			Echo Building Haiku Bootstrap ;
181			HAIKU_IMAGE_HOST_NAME ?= shredder ;
182			HAIKU_IMAGE_SIZE ?= 20000 ;
183
184			AddHaikuImageSystemPackages
185				binutils
186				bison
187				expat
188				flex
189				gcc
190				grep
191				haikuporter
192				less
193				libedit
194				make
195				ncurses6
196				noto
197				python
198				sed
199				texinfo
200				!gcc2 @{ gawk grep }@
201				gcc2 @{ grep_x86@secondary_x86 mawk }@
202				;
203
204			AddHaikuImageDisabledPackages
205				freetype_devel
206				libedit_devel
207				ncurses6_devel
208				zlib_devel
209			;
210
211			# secondary architecture packages
212			local architectureObject ;
213			for architectureObject
214					in [ MultiArchSubDirSetup $(TARGET_PACKAGING_ARCHS[2-]) ] {
215				on $(architectureObject) {
216					AddHaikuImageSystemPackages
217						binutils
218						expat
219						freetype
220						gcc
221						icu@gcc2 icu74@!gcc2
222						libedit
223						ncurses6
224						zlib
225						;
226					AddHaikuImageDisabledPackages
227						freetype_devel
228						libedit_devel
229						ncurses6_devel
230						zlib_devel
231					;
232				}
233			}
234
235			AddOptionalHaikuImagePackages DevelopmentMin ;
236		}
237	}
238
239
240	# Uncomment in official release branch.
241	#HAIKU_DEFINES += HAIKU_OFFICIAL_RELEASE ;
242	#TARGET_DEFINES += HAIKU_OFFICIAL_RELEASE ;
243
244
245	# If a build profile was specified on the command line, now is the time to
246	# check whether it is unknown or one of the default profiles.
247	if $(HAIKU_BUILD_PROFILE) && ! $(HAIKU_BUILD_PROFILE_DEFINED) {
248		# define the obvious default profiles
249		if $(HAIKU_BUILD_PROFILE) in cd-image install vmware-image {
250			DefineBuildProfile $(HAIKU_BUILD_PROFILE) : $(HAIKU_BUILD_PROFILE) ;
251		} else {
252			Exit "Build profile" $(HAIKU_BUILD_PROFILE) "not defined." ;
253		}
254	}
255}
256