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 HAIKU_NIGHTLY_BUILD = 1 ; 146 147 AddHaikuImagePackages 148 man 149 nano 150 noto 151 openssh 152 openssl 153 p7zip 154 pe 155 vision 156 wpa_supplicant 157 # xz_utils can't be built with gcc2, so we install it for 158 # primary gcc 4 architectures or gcc 2 hybrids. 159 xz_utils@!gcc2 160 gcc2 @{ xz_utils_x86@secondary_x86 }@ 161 ; 162 AddHaikuImageSourcePackages 163 man 164 nano 165 p7zip 166 gcc 167 ; 168 169 AddOptionalHaikuImagePackages Development Git ; 170 171 # WebPositive can only built for x86_gcc2, x86 and x86_64 172 if $(HAIKU_PACKAGING_ARCHS) in x86_gcc2 x86 x86_64 { 173 AddOptionalHaikuImagePackages WebPositive ; 174 } else { 175 Echo "WebPositive not available on $(HAIKU_PACKAGING_ARCHS)" ; 176 } 177 } 178 179 case "minimum-*" : { 180 Echo Building Haiku Minimum Target ; 181 HAIKU_IMAGE_HOST_NAME ?= shredder ; 182 if $(DEBUG) != 0 { 183 HAIKU_IMAGE_SIZE ?= 450 ; 184 } 185 186 AddHaikuImagePackages 187 openssl 188 ; 189 } 190 191 case "bootstrap-*" : { 192 Echo Building Haiku Bootstrap ; 193 HAIKU_IMAGE_HOST_NAME ?= shredder ; 194 HAIKU_IMAGE_SIZE ?= 20000 ; 195 196 AddHaikuImagePackages 197 binutils 198 bison 199 curl_devel 200 expat 201 flex 202 freetype_devel 203 gawk 204 gcc 205 grep 206 haikuporter 207 less 208 libedit 209 libedit_devel 210 m4 211 make 212 ncurses6 213 ncurses6_devel 214 noto 215 python 216 sed 217 texinfo 218 zlib_devel 219 ; 220 221 # secondary architecture packages 222 local architectureObject ; 223 for architectureObject 224 in [ MultiArchSubDirSetup $(TARGET_PACKAGING_ARCHS[2-]) ] { 225 on $(architectureObject) { 226 AddHaikuImagePackages 227 binutils 228 curl 229 curl_devel 230 expat 231 freetype 232 freetype_devel 233 gcc 234 icu 235 libsolv 236 libedit 237 libedit_devel 238 ncurses6 239 ncurses6_devel 240 zlib 241 zlib_devel 242 ; 243 } 244 } 245 246 AddOptionalHaikuImagePackages DevelopmentMin ; 247 } 248 } 249 250 251 # Uncomment in official release branch. 252 #HAIKU_DEFINES += HAIKU_OFFICIAL_RELEASE ; 253 #TARGET_DEFINES += HAIKU_OFFICIAL_RELEASE ; 254 255 256 # If a build profile was specified on the command line, now is the time to 257 # check whether it is unknown or one of the default profiles. 258 if $(HAIKU_BUILD_PROFILE) && ! $(HAIKU_BUILD_PROFILE_DEFINED) { 259 # define the obvious default profiles 260 if $(HAIKU_BUILD_PROFILE) in anyboot-image cd-image image install 261 vmware-image { 262 DefineBuildProfile $(HAIKU_BUILD_PROFILE) : $(HAIKU_BUILD_PROFILE) ; 263 } else { 264 Exit "Build profile" $(HAIKU_BUILD_PROFILE) "not defined." ; 265 } 266 } 267} 268