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.image" ; 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.image" ; 49 50 # bootstrap profiles 51 DefineBuildProfile bootstrap-raw : image : "haiku-bootstrap.image" ; 52 DefineBuildProfile bootstrap-mmc : haiku-mmc-image : "haiku-mmc.image" ; 53 DefineBuildProfile bootstrap-vmware : vmware-image 54 : "haiku-bootstrap.vmdk" ; 55 56 # minimum profiles 57 DefineBuildProfile minimum-raw : image : "haiku-minimum.image" ; 58 DefineBuildProfile minimum-vmware : vmware-image : "haiku-minimum.vmdk" ; 59 DefineBuildProfile minimum-anyboot : anyboot-image 60 : "haiku-minimum-anyboot.image" ; 61 62 63 switch $(HAIKU_BUILD_PROFILE) { 64 case "release-*" : { 65 Echo Building Haiku R1/development preview ; 66 HAIKU_ROOT_USER_NAME ?= user ; 67 HAIKU_ROOT_USER_REAL_NAME ?= "Yourself" ; 68 AddGroupToHaikuImage party : 101 : user sshd ; 69 HAIKU_IMAGE_HOST_NAME ?= shredder ; 70 HAIKU_IMAGE_SIZE ?= 800 ; 71 72 AddHaikuImagePackages 73 bepdf 74 cvs 75 keymapswitcher 76 llvm 77 man 78 mercurial 79 nano 80 openssh 81 p7zip 82 pe 83 python 84 subversion 85 timgmsoundfont 86 vision 87 wpa_supplicant 88 wqy_microhei 89 # xz_utils can't be built with gcc2, so we install it for 90 # primary gcc 4 architectures or gcc 2 hybrids. 91 xz_utils@!gcc2 92 gcc2 @{ xz_utils_x86@secondary_x86 }@ 93 ; 94 95 local architectureObject ; 96 for architectureObject in [ MultiArchSubDirSetup ] { 97 on $(architectureObject) { 98 AddHaikuImagePackages openssl wonderbrush@gcc2 ; 99 } 100 } 101 102 AddOptionalHaikuImagePackages BeBook Development Git Welcome ; 103 104 # WebPositive can only built for x86_gcc2, x86 and x86_64 105 if $(HAIKU_PACKAGING_ARCHS) in x86_gcc2 x86 x86_64 { 106 AddOptionalHaikuImagePackages WebPositive ; 107 } else { 108 Echo "WebPositive not available on $(HAIKU_PACKAGING_ARCHS)" ; 109 } 110 } 111 112 case "alpha-*" : { 113 Echo The alpha-* build profiles have been renamed to release-* ; 114 } 115 116 case "nightly-*" : { 117 Echo Building Haiku Nightly ; 118 HAIKU_ROOT_USER_NAME ?= user ; 119 HAIKU_ROOT_USER_REAL_NAME ?= "Yourself" ; 120 AddGroupToHaikuImage party : 101 : user sshd ; 121 HAIKU_IMAGE_HOST_NAME ?= shredder ; 122 HAIKU_IMAGE_SIZE ?= 600 ; 123 124 AddHaikuImagePackages 125 man 126 nano 127 openssh 128 openssl 129 p7zip 130 pe 131 vision 132 wpa_supplicant 133 # xz_utils can't be built with gcc2, so we install it for 134 # primary gcc 4 architectures or gcc 2 hybrids. 135 xz_utils@!gcc2 136 gcc2 @{ xz_utils_x86@secondary_x86 }@ 137 ; 138 139 AddOptionalHaikuImagePackages Development Git ; 140 141 # WebPositive can only built for x86_gcc2, x86 and x86_64 142 if $(HAIKU_PACKAGING_ARCHS) in x86_gcc2 x86 x86_64 { 143 AddOptionalHaikuImagePackages WebPositive ; 144 } else { 145 Echo "WebPositive not available on $(HAIKU_PACKAGING_ARCHS)" ; 146 } 147 } 148 149 case "bootstrap-*" : { 150 Echo Building Haiku Bootstrap ; 151 HAIKU_IMAGE_HOST_NAME ?= shredder ; 152 HAIKU_IMAGE_SIZE ?= 20000 ; 153 154 AddHaikuImagePackages 155 autoconf 156 automake 157 binutils 158 bison 159 curl_devel 160 flex 161 freetype_devel 162 gawk 163 gcc 164 grep 165 haikuporter 166 libtool 167 libtool_libltdl 168 m4 169 make 170 ncurses 171 ncurses_devel 172 python 173 sed 174 texinfo 175 zlib_devel 176 ; 177 178 # secondary architecture packages 179 local architectureObject ; 180 for architectureObject 181 in [ MultiArchSubDirSetup $(TARGET_PACKAGING_ARCHS[2-]) ] { 182 on $(architectureObject) { 183 AddHaikuImagePackages 184 binutils 185 curl 186 curl_devel 187 freetype 188 freetype_devel 189 gcc 190 icu 191 libsolv 192 ncurses 193 ncurses_devel 194 zlib 195 zlib_devel 196 ; 197 } 198 } 199 200 AddOptionalHaikuImagePackages DevelopmentMin ; 201 } 202 203 case "minimum-*" : { 204 Echo Building Haiku Minimum Target ; 205 HAIKU_IMAGE_HOST_NAME ?= shredder ; 206 207 AddHaikuImagePackages 208 ; 209 } 210 } 211 212 213 # Uncomment in official release branch. 214 #HAIKU_DEFINES += HAIKU_OFFICIAL_RELEASE ; 215 #TARGET_DEFINES += HAIKU_OFFICIAL_RELEASE ; 216 217 218 # If a build profile was specified on the command line, now is the time to 219 # check whether it is unknown or one of the default profiles. 220 if $(HAIKU_BUILD_PROFILE) && ! $(HAIKU_BUILD_PROFILE_DEFINED) { 221 # define the obvious default profiles 222 if $(HAIKU_BUILD_PROFILE) in anyboot-image cd-image image install 223 vmware-image { 224 DefineBuildProfile $(HAIKU_BUILD_PROFILE) : $(HAIKU_BUILD_PROFILE) ; 225 } else { 226 Exit "Build profile" $(HAIKU_BUILD_PROFILE) "not defined." ; 227 } 228 } 229} 230