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