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