xref: /haiku/build/jam/DefaultBuildProfiles (revision 445d4fd926c569e7b9ae28017da86280aaecbae2)
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				wpa_supplicant
93				wqy_microhei
94				# Some packages can't be built with gcc2, so we install the gcc8
95				# secondary architecture package instead in this case
96				!gcc2 @{ nano p7zip python3.9 xz_utils }@
97				gcc2 @{ nano_x86@secondary_x86 p7zip_x86@secondary_x86
98					python3.9_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 openssl wonderbrush@gcc2 ;
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 ?= 600 ;
133			HAIKU_NIGHTLY_BUILD = 1 ;
134
135			AddHaikuImageSystemPackages
136				mandoc
137				noto
138				openssh
139				openssl
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				openssl
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				mawk
196				ncurses6
197				noto
198				python
199				sed
200				texinfo
201				!gcc2 @{ grep }@
202				gcc2 @{ grep_x86@secondary_x86 }@
203				;
204
205			AddHaikuImageDisabledPackages
206				freetype_devel
207				libedit_devel
208				ncurses6_devel
209				zlib_devel
210			;
211
212			# secondary architecture packages
213			local architectureObject ;
214			for architectureObject
215					in [ MultiArchSubDirSetup $(TARGET_PACKAGING_ARCHS[2-]) ] {
216				on $(architectureObject) {
217					AddHaikuImageSystemPackages
218						binutils
219						expat
220						freetype
221						gcc
222						icu@gcc2 icu66@!gcc2
223						libsolv
224						libedit
225						ncurses6
226						zlib
227						;
228					AddHaikuImageDisabledPackages
229						freetype_devel
230						libedit_devel
231						ncurses6_devel
232						zlib_devel
233					;
234				}
235			}
236
237			AddOptionalHaikuImagePackages DevelopmentMin ;
238		}
239	}
240
241
242	# Uncomment in official release branch.
243	#HAIKU_DEFINES += HAIKU_OFFICIAL_RELEASE ;
244	#TARGET_DEFINES += HAIKU_OFFICIAL_RELEASE ;
245
246
247	# If a build profile was specified on the command line, now is the time to
248	# check whether it is unknown or one of the default profiles.
249	if $(HAIKU_BUILD_PROFILE) && ! $(HAIKU_BUILD_PROFILE_DEFINED) {
250		# define the obvious default profiles
251		if $(HAIKU_BUILD_PROFILE) in cd-image install vmware-image {
252			DefineBuildProfile $(HAIKU_BUILD_PROFILE) : $(HAIKU_BUILD_PROFILE) ;
253		} else {
254			Exit "Build profile" $(HAIKU_BUILD_PROFILE) "not defined." ;
255		}
256	}
257}
258