1 # set HAIKU_BUILD_TYPE early
2 switch $(HAIKU_BUILD_PROFILE) {
4 HAIKU_BUILD_TYPE = bootstrap ;
5 EnableBuildFeatures bootstrap_image ;
7 # Add a third pseudo target for the platform used when building anything
8 # for stage0 of the bootstrap process.
9 NotFile bootstrap_stage0 ;
11 HAIKU_DEFINES += HAIKU_BOOTSTRAP_BUILD ;
12 TARGET_DEFINES += HAIKU_BOOTSTRAP_BUILD ;
16 HAIKU_BUILD_TYPE = minimum ;
17 EnableBuildFeatures minimum_image ;
19 HAIKU_DEFINES += HAIKU_MINIMUM_BUILD ;
20 TARGET_DEFINES += HAIKU_MINIMUM_BUILD ;
24 HAIKU_BUILD_TYPE = regular ;
25 EnableBuildFeatures regular_image ;
27 HAIKU_DEFINES += HAIKU_REGULAR_BUILD ;
28 TARGET_DEFINES += HAIKU_REGULAR_BUILD ;
31 Echo "Starting build of type $(HAIKU_BUILD_TYPE) ..." ;
34 rule DefineDefaultBuildProfiles
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" ;
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" ;
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" ;
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" ;
66 switch $(HAIKU_BUILD_PROFILE) {
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 ;
95 # xz_utils can't be built with gcc2, so we install it for
96 # primary gcc 4 architectures or gcc 2 hybrids.
98 gcc2 @{ xz_utils_x86@secondary_x86 }@
101 local architectureObject ;
102 for architectureObject in [ MultiArchSubDirSetup ] {
103 on $(architectureObject) {
104 AddHaikuImagePackages openssl wonderbrush@gcc2 ;
108 AddOptionalHaikuImagePackages BeBook Development Git Welcome ;
110 # WebPositive can only built for x86_gcc2, x86 and x86_64
111 if $(HAIKU_PACKAGING_ARCHS) in x86_gcc2 x86 x86_64 {
112 AddOptionalHaikuImagePackages WebPositive ;
114 Echo "WebPositive not available on $(HAIKU_PACKAGING_ARCHS)" ;
119 Echo The alpha-* build profiles have been renamed to release-* ;
123 Echo Building Haiku Nightly ;
124 HAIKU_ROOT_USER_NAME ?= user ;
125 HAIKU_ROOT_USER_REAL_NAME ?= "Yourself" ;
126 AddGroupToHaikuImage party : 101 : user sshd ;
127 HAIKU_IMAGE_HOST_NAME ?= shredder ;
129 HAIKU_IMAGE_SIZE ?= 850 ;
131 HAIKU_IMAGE_SIZE ?= 600 ;
133 AddHaikuImagePackages
143 # xz_utils can't be built with gcc2, so we install it for
144 # primary gcc 4 architectures or gcc 2 hybrids.
146 gcc2 @{ xz_utils_x86@secondary_x86 }@
149 AddOptionalHaikuImagePackages Development Git ;
151 # WebPositive can only built for x86_gcc2, x86 and x86_64
152 if $(HAIKU_PACKAGING_ARCHS) in x86_gcc2 x86 x86_64 {
153 AddOptionalHaikuImagePackages WebPositive ;
155 Echo "WebPositive not available on $(HAIKU_PACKAGING_ARCHS)" ;
159 case "bootstrap-*" : {
160 Echo Building Haiku Bootstrap ;
161 HAIKU_IMAGE_HOST_NAME ?= shredder ;
162 HAIKU_IMAGE_SIZE ?= 20000 ;
164 AddHaikuImagePackages
189 # secondary architecture packages
190 local architectureObject ;
191 for architectureObject
192 in [ MultiArchSubDirSetup $(TARGET_PACKAGING_ARCHS[2-]) ] {
193 on $(architectureObject) {
194 AddHaikuImagePackages
214 AddOptionalHaikuImagePackages DevelopmentMin ;
218 Echo Building Haiku Minimum Target ;
219 HAIKU_IMAGE_HOST_NAME ?= shredder ;
221 HAIKU_IMAGE_SIZE ?= 450 ;
224 AddHaikuImagePackages
230 # Uncomment in official release branch.
231 #HAIKU_DEFINES += HAIKU_OFFICIAL_RELEASE ;
232 #TARGET_DEFINES += HAIKU_OFFICIAL_RELEASE ;
235 # If a build profile was specified on the command line, now is the time to
236 # check whether it is unknown or one of the default profiles.
237 if $(HAIKU_BUILD_PROFILE) && ! $(HAIKU_BUILD_PROFILE_DEFINED) {
238 # define the obvious default profiles
239 if $(HAIKU_BUILD_PROFILE) in anyboot-image cd-image image install
241 DefineBuildProfile $(HAIKU_BUILD_PROFILE) : $(HAIKU_BUILD_PROFILE) ;
243 Exit "Build profile" $(HAIKU_BUILD_PROFILE) "not defined." ;