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 8 architectures or gcc 2 hybrids. 101 xz_utils@!gcc2 102 gcc2 @{ xz_utils_x86@secondary_x86 }@ 103 ; 104 AddHaikuImageSourcePackages 105 bepdf 106 man 107 nano 108 p7zip 109 gcc 110 ; 111 112 local architectureObject ; 113 for architectureObject in [ MultiArchSubDirSetup ] { 114 on $(architectureObject) { 115 AddHaikuImagePackages openssl wonderbrush@gcc2 ; 116 } 117 } 118 119 AddOptionalHaikuImagePackages BeBook Development Git Welcome ; 120 121 # WebPositive can only built for x86_gcc2, x86 and x86_64 122 if $(HAIKU_PACKAGING_ARCHS) in x86_gcc2 x86 x86_64 { 123 AddOptionalHaikuImagePackages WebPositive ; 124 } else { 125 Echo "WebPositive not available on $(HAIKU_PACKAGING_ARCHS)" ; 126 } 127 } 128 129 case "alpha-*" : { 130 Echo The alpha-* build profiles have been renamed to release-* ; 131 Exit ; 132 } 133 134 case "nightly-*" : { 135 Echo Building Haiku Nightly ; 136 HAIKU_ROOT_USER_NAME ?= user ; 137 HAIKU_ROOT_USER_REAL_NAME ?= "Yourself" ; 138 AddGroupToHaikuImage party : 101 : user sshd ; 139 HAIKU_IMAGE_HOST_NAME ?= shredder ; 140 if $(DEBUG) != 0 { 141 HAIKU_IMAGE_SIZE ?= 850 ; 142 } 143 HAIKU_IMAGE_SIZE ?= 600 ; 144 HAIKU_NIGHTLY_BUILD = 1 ; 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 openssl 187 ; 188 } 189 190 case "bootstrap-*" : { 191 Echo Building Haiku Bootstrap ; 192 HAIKU_IMAGE_HOST_NAME ?= shredder ; 193 HAIKU_IMAGE_SIZE ?= 20000 ; 194 195 AddHaikuImagePackages 196 binutils 197 bison 198 curl_devel 199 expat 200 flex 201 freetype_devel 202 gawk 203 gcc 204 grep 205 haikuporter 206 less 207 libedit 208 libedit_devel 209 m4 210 make 211 ncurses6 212 ncurses6_devel 213 noto 214 python 215 sed 216 texinfo 217 zlib_devel 218 ; 219 220 # secondary architecture packages 221 local architectureObject ; 222 for architectureObject 223 in [ MultiArchSubDirSetup $(TARGET_PACKAGING_ARCHS[2-]) ] { 224 on $(architectureObject) { 225 AddHaikuImagePackages 226 binutils 227 curl 228 curl_devel 229 expat 230 freetype 231 freetype_devel 232 gcc 233 icu 234 libsolv 235 libedit 236 libedit_devel 237 ncurses6 238 ncurses6_devel 239 zlib 240 zlib_devel 241 ; 242 } 243 } 244 245 AddOptionalHaikuImagePackages DevelopmentMin ; 246 } 247 } 248 249 250 # Uncomment in official release branch. 251 #HAIKU_DEFINES += HAIKU_OFFICIAL_RELEASE ; 252 #TARGET_DEFINES += HAIKU_OFFICIAL_RELEASE ; 253 254 255 # If a build profile was specified on the command line, now is the time to 256 # check whether it is unknown or one of the default profiles. 257 if $(HAIKU_BUILD_PROFILE) && ! $(HAIKU_BUILD_PROFILE_DEFINED) { 258 # define the obvious default profiles 259 if $(HAIKU_BUILD_PROFILE) in anyboot-image cd-image image install 260 vmware-image { 261 DefineBuildProfile $(HAIKU_BUILD_PROFILE) : $(HAIKU_BUILD_PROFILE) ; 262 } else { 263 Exit "Build profile" $(HAIKU_BUILD_PROFILE) "not defined." ; 264 } 265 } 266} 267