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