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