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