xref: /haiku/build/jam/DefaultBuildProfiles (revision cf5cb76ffa691f6abc1b2baeabe10409ca74dba8)
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-vmware : vmware-image : "haiku-nightly.vmdk" ;
46	DefineBuildProfile nightly-cd : cd-image : "haiku-nightly.iso" ;
47	DefineBuildProfile nightly-anyboot : anyboot-image
48		: "haiku-nightly-anyboot.iso" ;
49
50	# bootstrap profiles
51	DefineBuildProfile bootstrap-raw : image : "haiku-bootstrap.image" ;
52	DefineBuildProfile bootstrap-mmc : haiku-mmc-image : "haiku-bootstrap.mmc" ;
53	DefineBuildProfile bootstrap-vmware : vmware-image
54		: "haiku-bootstrap.vmdk" ;
55	DefineBuildProfile bootstrap-anyboot : anyboot-image
56		: "haiku-bootstrap-anyboot.iso" ;
57
58	# minimum profiles
59	DefineBuildProfile minimum-raw : image : "haiku-minimum.image" ;
60	DefineBuildProfile minimum-mmc : haiku-mmc-image : "haiku-minimum.mmc" ;
61	DefineBuildProfile minimum-vmware : vmware-image : "haiku-minimum.vmdk" ;
62	DefineBuildProfile minimum-cd : cd-image : "haiku-minimum.iso" ;
63	DefineBuildProfile minimum-anyboot : anyboot-image
64		: "haiku-minimum-anyboot.iso" ;
65
66	switch $(HAIKU_BUILD_PROFILE) {
67		case "release-*" : {
68			Echo Building Haiku R1/development preview ;
69			HAIKU_ROOT_USER_NAME ?= user ;
70			HAIKU_ROOT_USER_REAL_NAME ?= "Yourself" ;
71			AddGroupToHaikuImage party : 101 : user sshd ;
72			HAIKU_IMAGE_HOST_NAME ?= shredder ;
73			if $(DEBUG) != 0 {
74				HAIKU_IMAGE_SIZE ?= 1300 ;
75			}
76			if $(HAIKU_INCLUDE_SOURCES) = 1 {
77				HAIKU_IMAGE_SIZE ?= 1100 ;
78			} else {
79				HAIKU_IMAGE_SIZE ?= 690 ;
80			}
81
82			AddHaikuImageSystemPackages
83				bepdf
84				keymapswitcher
85				mandoc
86				nano
87				noto
88				noto_sans_cjk_jp
89				openssh
90				p7zip
91				pdfwriter
92				pe
93				python
94				timgmsoundfont
95				vision
96				wpa_supplicant
97				wqy_microhei
98				# xz_utils can't be built with gcc2, so we install it for
99				# primary gcc 8 architectures or gcc 2 hybrids.
100				xz_utils@!gcc2
101				gcc2 @{ xz_utils_x86@secondary_x86 }@
102				;
103			AddHaikuImageSourcePackages
104				bepdf
105				nano
106				p7zip
107				;
108
109			local architectureObject ;
110			for architectureObject in [ MultiArchSubDirSetup ] {
111				on $(architectureObject) {
112					AddHaikuImageSystemPackages openssl wonderbrush@gcc2 ;
113				}
114			}
115
116			AddOptionalHaikuImagePackages BeBook Development Git Welcome ;
117
118			# WebPositive can only built for x86_gcc2, x86 and x86_64
119			if $(HAIKU_PACKAGING_ARCHS) in x86_gcc2 x86 x86_64 {
120				AddOptionalHaikuImagePackages WebPositive ;
121			} else {
122				Echo "WebPositive not available on $(HAIKU_PACKAGING_ARCHS)" ;
123			}
124		}
125
126		case "nightly-*" : {
127			Echo Building Haiku Nightly ;
128			HAIKU_ROOT_USER_NAME ?= user ;
129			HAIKU_ROOT_USER_REAL_NAME ?= "Yourself" ;
130			AddGroupToHaikuImage party : 101 : user sshd ;
131			HAIKU_IMAGE_HOST_NAME ?= shredder ;
132			if $(DEBUG) != 0 {
133				HAIKU_IMAGE_SIZE ?= 850 ;
134			}
135			HAIKU_IMAGE_SIZE ?= 600 ;
136			HAIKU_NIGHTLY_BUILD = 1 ;
137
138			AddHaikuImageSystemPackages
139				mandoc
140				nano
141				noto
142				openssh
143				openssl
144				p7zip
145				pe
146				vision
147				wpa_supplicant
148				# xz_utils can't be built with gcc2, so we install it for
149				# primary gcc 4 architectures or gcc 2 hybrids.
150				xz_utils@!gcc2
151				gcc2 @{ xz_utils_x86@secondary_x86 }@
152				;
153			AddHaikuImageSourcePackages
154				nano
155				p7zip
156				;
157
158			AddOptionalHaikuImagePackages Development Git ;
159
160			# WebPositive can only built for x86_gcc2, x86 and x86_64
161			if $(HAIKU_PACKAGING_ARCHS) in x86_gcc2 x86 x86_64 {
162				AddOptionalHaikuImagePackages WebPositive ;
163			} else {
164				Echo "WebPositive not available on $(HAIKU_PACKAGING_ARCHS)" ;
165			}
166		}
167
168		case "minimum-*" : {
169			Echo Building Haiku Minimum Target ;
170			HAIKU_IMAGE_HOST_NAME ?= shredder ;
171			if $(DEBUG) != 0 {
172				HAIKU_IMAGE_SIZE ?= 450 ;
173			}
174
175			AddHaikuImageSystemPackages
176				openssl
177				;
178		}
179
180		case "bootstrap-*" : {
181			Echo Building Haiku Bootstrap ;
182			HAIKU_IMAGE_HOST_NAME ?= shredder ;
183			HAIKU_IMAGE_SIZE ?= 20000 ;
184
185			AddHaikuImageSystemPackages
186				binutils
187				bison
188				expat
189				flex
190				gawk
191				gcc
192				grep
193				haikuporter
194				less
195				libedit
196				m4
197				make
198				ncurses6
199				noto
200				python
201				sed
202				texinfo
203				;
204
205			AddHaikuImageDisabledPackages
206				curl_devel
207				freetype_devel
208				libedit_devel
209				ncurses6_devel
210				zlib_devel
211			;
212
213			# secondary architecture packages
214			local architectureObject ;
215			for architectureObject
216					in [ MultiArchSubDirSetup $(TARGET_PACKAGING_ARCHS[2-]) ] {
217				on $(architectureObject) {
218					AddHaikuImageSystemPackages
219						binutils
220						curl
221						expat
222						freetype
223						gcc
224						icu
225						libsolv
226						libedit
227						ncurses6
228						zlib
229						;
230					AddHaikuImageDisabledPackages
231						curl_devel
232						freetype_devel
233						libedit_devel
234						ncurses6_devel
235						zlib_devel
236					;
237				}
238			}
239
240			AddOptionalHaikuImagePackages DevelopmentMin ;
241		}
242	}
243
244
245	# Uncomment in official release branch.
246	#HAIKU_DEFINES += HAIKU_OFFICIAL_RELEASE ;
247	#TARGET_DEFINES += HAIKU_OFFICIAL_RELEASE ;
248
249
250	# If a build profile was specified on the command line, now is the time to
251	# check whether it is unknown or one of the default profiles.
252	if $(HAIKU_BUILD_PROFILE) && ! $(HAIKU_BUILD_PROFILE_DEFINED) {
253		# define the obvious default profiles
254		if $(HAIKU_BUILD_PROFILE) in cd-image install vmware-image {
255			DefineBuildProfile $(HAIKU_BUILD_PROFILE) : $(HAIKU_BUILD_PROFILE) ;
256		} else {
257			Exit "Build profile" $(HAIKU_BUILD_PROFILE) "not defined." ;
258		}
259	}
260}
261