1 2# Variable naming conventions: 3# TARGET_*: A build system variable specifying a property for building for 4# the target platform (usually Haiku). E.g. TARGET_CC specifies the 5# compiler when building a target for the target platform. 6# HOST_*: A build system variable specifying a property of the platform 7# hosting the build. E.g. HOST_CC specifies the compiler when 8# building a target for the host platform (a build tool for 9# instance). 10# HAIKU_*: A build system variable specifying a build system property. Usually 11# directory paths and the like. 12 13 14#pragma mark - container settings 15 16# Haiku image 17HAIKU_IMAGE_CONTAINER_NAME = haiku-image-container ; 18HAIKU_CONTAINER_GRIST on $(HAIKU_IMAGE_CONTAINER_NAME) = HaikuImage ; 19HAIKU_INCLUDE_IN_CONTAINER_VAR on $(HAIKU_IMAGE_CONTAINER_NAME) 20 = HAIKU_INCLUDE_IN_IMAGE ; 21HAIKU_INSTALL_TARGETS_VAR on $(HAIKU_IMAGE_CONTAINER_NAME) 22 = HAIKU_IMAGE_INSTALL_TARGETS ; 23 24# network boot archive 25HAIKU_NET_BOOT_ARCHIVE_CONTAINER_NAME = haiku-netboot-archive-container ; 26HAIKU_CONTAINER_GRIST on $(HAIKU_NET_BOOT_ARCHIVE_CONTAINER_NAME) 27 = NetBootArchive ; 28# HAIKU_INCLUDE_IN_CONTAINER_VAR -- update only mode not supported 29HAIKU_INSTALL_TARGETS_VAR on $(HAIKU_NET_BOOT_ARCHIVE_CONTAINER_NAME) 30 = HAIKU_NET_BOOT_ARCHIVE_INSTALL_TARGETS ; 31 32# alternative gcc archive 33HAIKU_ALTERNATIVE_GCC_ARCHIVE_CONTAINER_NAME 34 = haiku-alternative-gcc-archive-container ; 35HAIKU_CONTAINER_GRIST on $(HAIKU_ALTERNATIVE_GCC_ARCHIVE_CONTAINER_NAME) 36 = AlternativeGCCArchive ; 37# HAIKU_INCLUDE_IN_CONTAINER_VAR -- update only mode not supported 38HAIKU_INSTALL_TARGETS_VAR on $(HAIKU_ALTERNATIVE_GCC_ARCHIVE_CONTAINER_NAME) 39 = HAIKU_ALTERNATIVE_GCC_ARCHIVE_INSTALL_TARGETS ; 40 41# boot floppy 42HAIKU_FLOPPY_BOOT_IMAGE_CONTAINER_NAME = haiku-boot-floppy-container ; 43HAIKU_CONTAINER_GRIST on $(HAIKU_FLOPPY_BOOT_IMAGE_CONTAINER_NAME) 44 = FloppyBootImage ; 45# HAIKU_INCLUDE_IN_CONTAINER_VAR -- update only mode not supported 46HAIKU_INSTALL_TARGETS_VAR on $(HAIKU_FLOPPY_BOOT_IMAGE_CONTAINER_NAME) 47 = HAIKU_FLOPPY_BOOT_IMAGE_INSTALL_TARGETS ; 48 49# boot CD image 50HAIKU_CD_BOOT_IMAGE_CONTAINER_NAME = haiku-boot-cd-container ; 51HAIKU_CONTAINER_GRIST on $(HAIKU_CD_BOOT_IMAGE_CONTAINER_NAME) = CDBootImage ; 52# HAIKU_INCLUDE_IN_CONTAINER_VAR -- update only mode not supported 53HAIKU_INSTALL_TARGETS_VAR on $(HAIKU_CD_BOOT_IMAGE_CONTAINER_NAME) 54 = HAIKU_CD_BOOT_IMAGE_INSTALL_TARGETS ; 55 56# boot CD for PPC image 57HAIKU_CD_BOOT_PPC_IMAGE_CONTAINER_NAME = haiku-boot-cd-ppc-container ; 58HAIKU_CONTAINER_GRIST on $(HAIKU_CD_BOOT_PPC_IMAGE_CONTAINER_NAME) = CDBootPPCImage ; 59# HAIKU_INCLUDE_IN_CONTAINER_VAR -- update only mode not supported 60HAIKU_INSTALL_TARGETS_VAR on $(HAIKU_CD_BOOT_PPC_IMAGE_CONTAINER_NAME) 61 = HAIKU_CD_BOOT_PPC_IMAGE_INSTALL_TARGETS ; 62 63# Haiku image/install defaults 64HAIKU_DEFAULT_IMAGE_NAME = haiku.image ; 65HAIKU_DEFAULT_IMAGE_DIR = $(HAIKU_OUTPUT_DIR) ; 66HAIKU_DEFAULT_VMWARE_IMAGE_NAME = haiku.vmdk ; 67HAIKU_DEFAULT_INSTALL_DIR = /Haiku ; 68HAIKU_DEFAULT_IMAGE_SIZE ?= 200 ; # 200 MB 69HAIKU_DEFAULT_IMAGE_LABEL ?= Haiku ; 70 71# Haiku CD defaults 72HAIKU_DEFAULT_CD_NAME = haiku-cd.iso ; 73HAIKU_DEFAULT_CD_DIR = $(HAIKU_OUTPUT_DIR) ; 74HAIKU_DEFAULT_CD_LABEL = Haiku ; 75 76# Haiku Anyboot defaults 77HAIKU_DEFAULT_ANYBOOT_NAME = haiku-anyboot.image ; 78HAIKU_DEFAULT_ANYBOOT_DIR = $(HAIKU_OUTPUT_DIR) ; 79HAIKU_DEFAULT_ANYBOOT_LABEL ?= Haiku ; 80 81# analyze and optionally replace jam's target parameters 82ProcessCommandLineArguments ; 83 84 85# include Timezones/libgccObjects 86{ 87 local timezones = [ GLOB $(HAIKU_BUILD_OUTPUT_DIR) : Timezones ] ; 88 local libgccObjects = [ GLOB $(HAIKU_BUILD_OUTPUT_DIR) : libgccObjects ] ; 89 90 if ! ( $(timezones) && $(libgccObjects) ) { 91 ECHO "No `Timezones' or `libgccObjects' found in" 92 "$(HAIKU_BUILD_OUTPUT_DIR)!" ; 93 EXIT "Please run ./configure in the source tree's root directory" 94 "again!" ; 95 } 96 97 LOCATE on Timezones = $(HAIKU_BUILD_OUTPUT_DIR) ; 98 LOCATE on libgccObjects = $(HAIKU_BUILD_OUTPUT_DIR) ; 99 100 include Timezones ; 101 include libgccObjects ; 102} 103 104 105# supported debug levels 106HAIKU_DEBUG_LEVELS = 0 1 2 3 4 5 ; 107 108# BeOS, BONE, Dan0 compatible platforms 109HAIKU_BEOS_COMPATIBLE_PLATFORMS = haiku r5 bone dano haiku_host ; 110HAIKU_BONE_COMPATIBLE_PLATFORMS = haiku bone dano haiku_host ; 111HAIKU_DANO_COMPATIBLE_PLATFORMS = haiku dano haiku_host ; 112HAIKU_HAIKU_COMPATIBLE_PLATFORMS = haiku haiku_host ; 113 114# configuration header directories 115HAIKU_CONFIG_HEADERS = [ FDirName $(HAIKU_TOP) build user_config_headers ] 116 [ FDirName $(HAIKU_TOP) build config_headers ] ; 117 118 119#pragma mark - 120 121# haiku target platform settings 122 123# analyze GCC version 124HAIKU_GCC_VERSION = [ FAnalyzeGCCVersion HAIKU_GCC_RAW_VERSION ] ; 125 126# enable GCC -pipe option, if requested 127if $(HAIKU_USE_GCC_PIPE) = 1 { 128 HAIKU_GCC_BASE_FLAGS = -pipe ; 129} 130 131# disable strict aliasing on anything newer than gcc 2 as it may lead to 132# unexpected results. also disable the tree-vrp (value range propagation) 133# optimization for now as with the current gcc4 version we are using this 134# results in some broken code. 135# TODO: remove the -fno-strict-aliasing option when all code has been 136# analyzed/fixed with regard to aliasing. 137# TODO: retest/remove the -fno-tree-vrp option as soon as we have updated our 138# gcc4 compiler. 139if $(HAIKU_GCC_VERSION[1]) >= 3 { 140 HAIKU_GCC_BASE_FLAGS += -fno-strict-aliasing -fno-tree-vrp ; 141} 142# TODO: With Haiku as the host platform, this does not appear to be set up 143# correctly, at least when compiling the libbe_test target platform. When 144# enabling the lines below, these flags suddenly appear as link flags passed 145# to ld as well. 146#if $(HOST_GCC_VERSION[1]) >= 3 { 147# HOST_GCC_BASE_FLAGS += -fno-strict-aliasing -fno-tree-vrp ; 148#} 149 150# override gcc 2.95.3's header directory -- strictly necessary only when using 151# the BeOS native compiler (since its headers are incompatible), but it doesn't 152# harm for the cross-compiler either. 153if $(HAIKU_GCC_VERSION[1]) = 2 { 154 HAIKU_GCC_HEADERS_DIR = [ FDirName $(HAIKU_TOP) headers build gcc-2.95.3 ] ; 155} 156 157# the subdirectory into which the alternative GCC libraries are to be installed 158if $(HAIKU_GCC_VERSION[1]) = 2 { 159 HAIKU_ALTERNATIVE_GCC_LIB_SUBDIR = gcc2 ; 160} else { 161 HAIKU_ALTERNATIVE_GCC_LIB_SUBDIR = gcc4 ; 162} 163 164# initial state for flags etc. 165HAIKU_C++ ?= $(HAIKU_CC) ; 166HAIKU_LINK = $(HAIKU_CC) ; 167HAIKU_LINKFLAGS = $(HAIKU_GCC_BASE_FLAGS) ; 168 169HAIKU_HDRS = [ FStandardHeaders ] ; 170HAIKU_CCFLAGS = $(HAIKU_GCC_BASE_FLAGS) -nostdinc ; 171HAIKU_C++FLAGS = $(HAIKU_GCC_BASE_FLAGS) -nostdinc ; 172HAIKU_KERNEL_CCFLAGS = $(HAIKU_GCC_BASE_FLAGS) ; 173HAIKU_KERNEL_C++FLAGS = $(HAIKU_GCC_BASE_FLAGS) ; 174HAIKU_DEFINES = __HAIKU__ ; 175HAIKU_NO_WERROR ?= 0 ; 176 177# distro compatibility level defines 178HAIKU_DISTRO_COMPATIBILITY ?= "default" ; 179switch $(HAIKU_DISTRO_COMPATIBILITY) { 180 case official : HAIKU_DEFINES += HAIKU_DISTRO_COMPATIBILITY_OFFICIAL ; 181 case compatible : HAIKU_DEFINES += HAIKU_DISTRO_COMPATIBILITY_COMPATIBLE ; 182 case "default" : HAIKU_DEFINES += HAIKU_DISTRO_COMPATIBILITY_DEFAULT ; 183 case * : Exit "Invalid value for HAIKU_DISTRO_COMPATIBILITY:" 184 $(HAIKU_DISTRO_COMPATIBILITY) ; 185} 186 187# analyze the gcc machine spec to determine HAIKU_CPU 188switch $(HAIKU_GCC_MACHINE) { 189 case i?86-* : HAIKU_CPU = x86 ; 190 case x86_64-* : HAIKU_CPU = x86_64 ; 191 case powerpc-* : HAIKU_CPU = ppc ; 192 case m68k-* : HAIKU_CPU = m68k ; 193 case mipsel-* : HAIKU_CPU = mipsel ; 194 case arm-* : HAIKU_CPU = arm ; 195 case * : Exit "Unsupported gcc target machine:" 196 $(HAIKU_GCC_MACHINE) ; 197} 198 199# determine the endianness of the host 200switch $(HOST_GCC_MACHINE) { 201 case amd64-* : HAIKU_HOST_IS_BIG_ENDIAN = 0 ; 202 case i?86-* : HAIKU_HOST_IS_BIG_ENDIAN = 0 ; 203 case powerpc-* : HAIKU_HOST_IS_BIG_ENDIAN = 1 ; 204 case x86_64-* : HAIKU_HOST_IS_BIG_ENDIAN = 0 ; 205 206 # the following are rather unlikely as hosts ... 207 case arm-* : HAIKU_HOST_IS_BIG_ENDIAN = 0 ; 208 case m68k-* : HAIKU_HOST_IS_BIG_ENDIAN = 1 ; 209 case mipsel-* : HAIKU_HOST_IS_BIG_ENDIAN = 0 ; 210 case * : Exit "Unsupported gcc host machine:" $(HOST_GCC_MACHINE) ; 211} 212 213switch $(HAIKU_CPU) { 214 case ppc : 215 { 216 HAIKU_DEFINES += __POWERPC__ ; 217 HAIKU_BOOT_PLATFORM = openfirmware ; 218 HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 1440 ; # in kB 219 # offset in floppy image (>= sizeof(haiku_loader)) 220 HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 192 ; # in kB - unused yet 221 } 222 case arm : 223 { 224 HAIKU_DEFINES += __ARM__ ; 225 HAIKU_BOOT_PLATFORM = u-boot ; 226 HAIKU_BOOT_BOARD ?= verdex ; 227 HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 1440 ; 228 # in kB (there is not really a floppy on the gumstix ;) ) 229 # offset in floppy image (>= sizeof(haiku_loader)) 230 HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 192 ; # in kB - unused yet 231 HAIKU_NO_WERROR = 1 ; 232 # we use #warning as placeholders for things to write... 233 } 234 case x86 : 235 { 236 HAIKU_DEFINES += __INTEL__ ; 237 HAIKU_BOOT_PLATFORM = bios_ia32 ; 238 HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 2880 ; # in kB 239 # offset in floppy image (>= sizeof(haiku_loader)) 240 HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 300 ; # in kB 241 242 # yasm is required for target arch x86 243 if ! $(HAIKU_YASM) { 244 Exit "HAIKU_YASM not set. Please re-run configure." ; 245 } 246 } 247 case x86_64 : 248 { 249 HAIKU_DEFINES += __x86_64__ ; 250 HAIKU_BOOT_PLATFORM = bios_ia32 ; 251 HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 2880 ; # in kB 252 # offset in floppy image (>= sizeof(haiku_loader)) 253 HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 300 ; # in kB 254 255 # yasm is required for target arch x86_64 256 if ! $(HAIKU_YASM) { 257 Exit "HAIKU_YASM not set. Please re-run configure." ; 258 } 259 } 260 case m68k : 261 { 262 HAIKU_DEFINES += __M68K__ ; 263 HAIKU_BOOT_PLATFORM = atari_m68k ; 264 HAIKU_BOOT_FLOPPY_IMAGE_SIZE = 1440 ; # in kB 265 # offset in floppy image (>= sizeof(haiku_loader)) 266 HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 150 ; # in kB 267 HAIKU_NO_WERROR = 1 ; 268 # we use #warning as placeholders for things to write... 269 } 270 case mipsel : 271 { 272 HAIKU_DEFINES += __MIPSEL__ ; 273 # RouterBOARD firmware (ELF image over TFTP) 274 HAIKU_BOOT_PLATFORM = routerboard_mipsel ; 275 # offset in floppy image (>= sizeof(haiku_loader)) 276 HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 192 ; # in kB 277 HAIKU_NO_WERROR = 1 ; 278 # we use #warning as placeholders for things to write... 279 } 280 case * : 281 Exit "Currently unsupported target CPU:" $(HAIKU_CPU) ; 282} 283HAIKU_ARCH ?= $(HAIKU_CPU) ; 284HAIKU_ARCH_MACRO_DEFINE = ARCH_$(HAIKU_ARCH) ; 285HAIKU_DEFINES += $(HAIKU_ARCH_MACRO_DEFINE) ; 286HAIKU_DEFINES += BOOT_ARCHIVE_IMAGE_OFFSET=$(HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET) ; 287HAIKU_ATA_STACK ?= 1 ; 288 289# directories 290HAIKU_OBJECT_BASE_DIR = [ FDirName $(HAIKU_OBJECT_DIR) haiku ] ; 291HAIKU_COMMON_ARCH_OBJECT_DIR = [ FDirName $(HAIKU_OBJECT_BASE_DIR) common ] ; 292HAIKU_ARCH_OBJECT_DIR = [ FDirName $(HAIKU_OBJECT_BASE_DIR) $(HAIKU_ARCH) ] ; 293HAIKU_COMMON_DEBUG_OBJECT_DIR = [ FDirName $(HAIKU_ARCH_OBJECT_DIR) common ] ; 294HAIKU_DEBUG_0_OBJECT_DIR = [ FDirName $(HAIKU_ARCH_OBJECT_DIR) release ] ; 295 296local level ; 297for level in $(HAIKU_DEBUG_LEVELS[2-]) { 298 HAIKU_DEBUG_$(level)_OBJECT_DIR 299 = [ FDirName $(HAIKU_ARCH_OBJECT_DIR) debug_$(level) ] ; 300} 301 302# set variables for gcc header options 303SetIncludePropertiesVariables HAIKU ; 304 305# assembler flags 306HAIKU_ASFLAGS = ; 307 308# C/C++ flags 309HAIKU_KERNEL_CCFLAGS += -finline -fno-builtin ; 310HAIKU_KERNEL_C++FLAGS += -finline -fno-builtin -fno-exceptions ; 311HAIKU_KERNEL_DEFINES += _KERNEL_MODE ; 312 313if $(HAIKU_GCC_VERSION[1]) >= 3 { 314 HAIKU_KERNEL_C++FLAGS += -fno-use-cxa-atexit ; 315} 316 317if $(HAIKU_GCC_VERSION[1]) >= 4 { 318 HAIKU_C++FLAGS += -Wno-deprecated ; 319 320 if $(HAIKU_GCC_VERSION[2]) >= 3 { 321 HAIKU_KERNEL_CCFLAGS += -ffreestanding ; 322 HAIKU_KERNEL_C++FLAGS += -ffreestanding ; 323 } 324} 325 326HAIKU_KERNEL_PIC_CCFLAGS = -fno-pic ; 327HAIKU_KERNEL_PIC_LINKFLAGS = ; 328 329switch $(HAIKU_ARCH) { 330 case ppc : 331 { 332 # Build a position independent PPC kernel. We need to be able to 333 # relocate the kernel, since the virtual address space layout at boot 334 # time is not fixed. 335 HAIKU_KERNEL_PIC_CCFLAGS = -fPIE ; 336 HAIKU_KERNEL_PIC_LINKFLAGS = -shared -fPIE ; 337 } 338 339 case m68k : 340 { 341 # We don't want to have to handle emulating missing FPU opcodes for 040 342 # and 060 in the kernel. 343 HAIKU_KERNEL_CCFLAGS += -m68020-60 ; 344 HAIKU_KERNEL_C++FLAGS += -m68020-60 ; 345 } 346 case x86 : 347 { 348 HAIKU_CCFLAGS += -march=pentium ; 349 HAIKU_C++FLAGS += -march=pentium ; 350 HAIKU_KERNEL_CCFLAGS += -march=pentium ; 351 HAIKU_KERNEL_C++FLAGS += -march=pentium ; 352 353 # Enable use of the gcc built-in atomic functions instead of atomic_*(). 354 # The former are inlined and have thus less overhead. They are not 355 # available with gcc 2, but the header will take care of that. 356 HAIKU_DEFINES += B_USE_BUILTIN_ATOMIC_FUNCTIONS ; 357 } 358 case x86_64 : 359 { 360 # Enable use of the gcc built-in atomic functions instead of atomic_*(). 361 # The former are inlined and have thus less overhead. 362 HAIKU_DEFINES += B_USE_BUILTIN_ATOMIC_FUNCTIONS ; 363 } 364} 365 366# If the environment variable HAIKU_INCLUDE_PATENTED_CODE is defined, we 367# define an equally named macro to the variable value. Some components use the 368# macro to allow compilation of code known to implemented patented ideas and/or 369# techniques, for example the Freetype bytecode hinter or sub-pixel rendering 370# as well as some problematic media codecs. 371if $(HAIKU_INCLUDE_PATENTED_CODE) { 372 HAIKU_DEFINES 373 += HAIKU_INCLUDE_PATENTED_CODE=$(HAIKU_INCLUDE_PATENTED_CODE) ; 374} 375 376# warning flags 377HAIKU_WARNING_CCFLAGS = -Wall -Wno-trigraphs -Wmissing-prototypes 378 -Wpointer-arith -Wcast-align -Wsign-compare -Wno-multichar ; 379HAIKU_WARNING_C++FLAGS = -Wall -Wno-trigraphs -Wno-ctor-dtor-privacy 380 -Woverloaded-virtual -Wpointer-arith -Wcast-align -Wsign-compare 381 -Wno-multichar ; 382 383HAIKU_KERNEL_WARNING_CCFLAGS = -Wall -Wno-trigraphs -Wmissing-prototypes 384 -Wno-multichar ; 385HAIKU_KERNEL_WARNING_C++FLAGS = -Wall -Wno-trigraphs -Wno-multichar ; 386 387# debug flags 388HAIKU_DEBUG_FLAGS ?= -ggdb ; 389 390# debug 0: suppress asserts 391HAIKU_DEBUG_0_CCFLAGS = [ FDefines NDEBUG=$(NDEBUG) ] ; 392HAIKU_DEBUG_0_C++FLAGS = [ FDefines NDEBUG=$(NDEBUG) ] ; 393 394HAIKU_KERNEL_DEBUG_0_CCFLAGS = [ FDefines NDEBUG=$(NDEBUG) ] ; 395HAIKU_KERNEL_DEBUG_0_C++FLAGS = [ FDefines NDEBUG=$(NDEBUG) ] ; 396 397local level ; 398for level in $(HAIKU_DEBUG_LEVELS[2-]) { 399 local flags = $(HAIKU_DEBUG_FLAGS) [ FDefines DEBUG=$(level) ] ; 400 HAIKU_DEBUG_$(level)_CCFLAGS = $(flags) ; 401 HAIKU_DEBUG_$(level)_C++FLAGS = $(flags) ; 402 HAIKU_KERNEL_DEBUG_$(level)_CCFLAGS = $(flags) ; 403 HAIKU_KERNEL_DEBUG_$(level)_C++FLAGS = $(flags) ; 404} 405 406if $(HAIKU_GCC_VERSION[1]) >= 3 { 407 # TODO: Temporary work-around. Should be defined in the compiler specs 408 HAIKU_LINKFLAGS += -Xlinker --no-undefined ; 409} else { 410 HAIKU_DEFINES += _BEOS_R5_COMPATIBLE_ ; 411} 412 413# private shared kernel/libroot headers 414HAIKU_PRIVATE_SYSTEM_HEADERS = 415 [ PrivateHeaders $(DOT) system system/arch/$(HAIKU_ARCH) ] 416; 417 418# private kernel headers to be used when compiling kernel code 419HAIKU_PRIVATE_KERNEL_HEADERS = 420 [ PrivateHeaders $(DOT) kernel libroot shared 421 kernel/boot/platform/$(HAIKU_BOOT_PLATFORM) ] 422 [ ArchHeaders $(HAIKU_ARCH) ] 423 [ FDirName $(HAIKU_COMMON_DEBUG_OBJECT_DIR) system kernel ] 424 $(HAIKU_PRIVATE_SYSTEM_HEADERS) 425; 426 427# Add some grist to the libgcc objects 428HAIKU_GCC_LIBGCC_OBJECTS = $(HAIKU_GCC_LIBGCC_OBJECTS:G=libgcc) ; 429 430# the C++ standard library 431HAIKU_BUILD_SHARED_LIBSTDC++ = ; 432if $(HAIKU_SHARED_LIBSTDC++) { 433 HAIKU_LIBSTDC++ = $(HAIKU_SHARED_LIBSTDC++) ; 434} else { 435 # no shared library available with the compiler -- build it 436 if $(HAIKU_GCC_VERSION[1]) = 2 { 437 HAIKU_LIBSTDC++ = libstdc++.r4.so ; 438 } else { 439 HAIKU_LIBSTDC++ = libstdc++.so ; 440 } 441 HAIKU_SHARED_LIBSTDC++ = $(HAIKU_LIBSTDC++) ; 442 HAIKU_BUILD_SHARED_LIBSTDC++ = 1 ; 443} 444 445# the C++ support (runtime) library 446HAIKU_BUILD_SHARED_LIBSUPC++ = ; 447if $(HAIKU_SHARED_LIBSUPC++) { 448 HAIKU_LIBSUPC++ = $(HAIKU_SHARED_LIBSUPC++) ; 449} else { 450 # no shared library available with the compiler -- build it for gcc 4 451 if $(HAIKU_GCC_VERSION[1]) != 2 { 452 HAIKU_SHARED_LIBSUPC++ = libsupc++.so ; 453 HAIKU_BUILD_SHARED_LIBSUPC++ = 1 ; 454 } 455 456 HAIKU_LIBSUPC++ = $(HAIKU_SHARED_LIBSUPC++) ; 457} 458 459 460# network libraries 461HAIKU_NETWORK_LIBS = network ; 462HAIKU_NETAPI_LIB = bnetapi ; 463HAIKU_SELECT_UNAME_ETC_LIB = ; # libroot, against which we link anyway 464 465 466# locale libraries 467HAIKU_LOCALE_LIBS = liblocale.so liblocalestub.a ; 468 469 470# library and executable glue code 471local commonGlueCode = 472 <src!system!glue>init_term_dyn.o 473 <src!system!glue!arch!$(HAIKU_ARCH)>crti.o 474 <src!system!glue!arch!$(HAIKU_ARCH)>crtn.o 475; 476HAIKU_LIBRARY_BEGIN_GLUE_CODE = 477 <src!system!glue!arch!$(HAIKU_ARCH)>crti.o 478 crtbegin.o 479 <src!system!glue>init_term_dyn.o 480; 481HAIKU_LIBRARY_END_GLUE_CODE = 482 crtend.o 483 <src!system!glue!arch!$(HAIKU_ARCH)>crtn.o 484; 485HAIKU_EXECUTABLE_BEGIN_GLUE_CODE = 486 <src!system!glue!arch!$(HAIKU_ARCH)>crti.o 487 crtbegin.o 488 <src!system!glue>start_dyn.o 489 <src!system!glue>init_term_dyn.o 490; 491HAIKU_EXECUTABLE_END_GLUE_CODE = $(HAIKU_LIBRARY_END_GLUE_CODE) ; 492HAIKU_KERNEL_ADDON_BEGIN_GLUE_CODE = crtbegin.o 493 <src!system!glue>haiku_version_glue.o ; 494HAIKU_KERNEL_ADDON_END_GLUE_CODE = $(HAIKU_GCC_LIBGCC) crtend.o ; 495 496SEARCH on crtbegin.o crtend.o = $(HAIKU_GCC_LIB_DIR) ; 497 498HAIKU_EXECUTABLE_MIME_TYPE = "application/x-vnd.Be-elfexecutable" ; 499 500# TODO: The version stuff should probably go into a separate file and be made 501# available as macro, too. 502# Set our version number if not already set and mark it as a developer build 503if ! $(HAIKU_BUILD_VERSION) { 504 HAIKU_BUILD_VERSION ?= "1 0 0 a 1" ; 505 HAIKU_BUILD_DESCRIPTION ?= "Developer Build" ; 506} 507 508# If HAIKU_BUILD_VERSION is set, but HAIKU_BUILD_DESCRIPTION isn't, mark it as 509# an unknown build. 510HAIKU_BUILD_DESCRIPTION ?= "Unknown Build" ; 511 512# init library name map 513{ 514 local i ; 515 for i in be bnetapi debug game GL locale mail media midi midi2 network 516 opengl root screensaver textencoding tracker translation z { 517 HAIKU_LIBRARY_NAME_MAP_$(i) = lib$(i).so ; 518 } 519 HAIKU_LIBRARY_NAME_MAP_libstdc++ = $(HAIKU_LIBSTDC++) ; 520 HAIKU_LIBRARY_NAME_MAP_libsupc++ = $(HAIKU_LIBSUPC++) ; 521 HAIKU_LIBRARY_NAME_MAP_input_server = <nogrist>input_server ; 522} 523 524 525#pragma mark - 526 527# host platform settings 528 529# analyze the host gcc machine spec to find out about 64-bitness 530HOST_PLATFORM_IS_64_BIT = ; 531if $(HAIKU_HOST_USE_32BIT) = 1 { 532 # enable GCC -m32 option 533 HOST_GCC_BASE_FLAGS = -m32 ; 534} else { 535 switch $(HOST_GCC_MACHINE) { 536 case amd64-* : HOST_PLATFORM_IS_64_BIT = 1 ; 537 case i686-apple-darwin10 : HOST_PLATFORM_IS_64_BIT = 1 ; 538 case x86_64-* : HOST_PLATFORM_IS_64_BIT = 1 ; 539 } 540} 541 542 543# save jam's variables for the build platform 544HOST_AR ?= $(AR) ; 545HOST_CC ?= $(CC) ; 546HOST_C++ ?= $(C++) ; 547HOST_LINK ?= $(LINK) ; 548HOST_RANLIB ?= $(RANLIB) ; 549HOST_CPPFLAGS ?= $(CPPFLAGS) ; 550HOST_CCFLAGS ?= $(HOST_GCC_BASE_FLAGS) $(CCFLAGS) ; 551HOST_C++FLAGS ?= $(HOST_GCC_BASE_FLAGS) $(C++FLAGS) ; 552HOST_LDFLAGS ?= $(HOST_GCC_BASE_FLAGS) $(LDFLAGS) ; 553HOST_LINKFLAGS ?= $(HOST_GCC_BASE_FLAGS) $(LINKFLAGS) ; 554HOST_DEFINES ?= $(DEFINES) ; 555HOST_HDRS ?= $(HDRS) ; 556 557 558# split up HOST_AR into the command name and flags 559HOST_AR = [ Match "([^ ]*) *(.*)" : $(HOST_AR[1]) ] 560 $(HOST_AR[2-]) ; 561HOST_ARFLAGS = $(HOST_AR[2-]) ; 562HOST_AR = $(HOST_AR[1]) ; 563HOST_UNARFLAGS ?= x ; 564 565# check the host platform compatibility 566SetPlatformCompatibilityFlagVariables HOST_PLATFORM : HOST : host 567 : linux openbsd freebsd darwin sunos cygwin ; 568 569if $(HOST_PLATFORM) = linux || $(HOST_PLATFORM) = freebsd 570 || $(HOST_PLATFORM) = darwin || $(HOST_PLATFORM) = cygwin 571 || $(HOST_PLATFORM) = sunos || $(HOST_PLATFORM) = openbsd { 572 # don't use lex: otherwise rc will not work correctly 573 if $(LEX) = lex { 574 LEX = flex ; 575 } 576} 577 578if $(HOST_PLATFORM) = cygwin { 579 HOST_LINKFLAGS += -Xlinker --allow-multiple-definition -Xlinker 580 --enable-auto-import ; 581} 582 583HOST_CPU ?= $(OSPLAT:L) ; 584 585HOST_ARCH ?= $(HOST_CPU) ; 586HOST_ARCH_MACRO_DEFINE = ARCH_$(HOST_CPU) ; 587 588 589# directories 590HOST_OBJECT_BASE_DIR = [ FDirName $(HAIKU_OBJECT_DIR) $(HOST_PLATFORM) ] ; 591HOST_COMMON_ARCH_OBJECT_DIR = [ FDirName $(HOST_OBJECT_BASE_DIR) common ] ; 592HOST_ARCH_OBJECT_DIR = [ FDirName $(HOST_OBJECT_BASE_DIR) $(HOST_ARCH) ] ; 593HOST_COMMON_DEBUG_OBJECT_DIR = [ FDirName $(HOST_ARCH_OBJECT_DIR) common ] ; 594HOST_DEBUG_0_OBJECT_DIR = [ FDirName $(HOST_ARCH_OBJECT_DIR) release ] ; 595 596local level ; 597for level in $(HAIKU_DEBUG_LEVELS[2-]) { 598 HOST_DEBUG_$(level)_OBJECT_DIR 599 = [ FDirName $(HOST_ARCH_OBJECT_DIR) debug_$(level) ] ; 600} 601 602# analyze GCC version 603HOST_GCC_VERSION = [ FAnalyzeGCCVersion HOST_GCC_RAW_VERSION ] ; 604 605# set variables for gcc header options 606SetIncludePropertiesVariables HOST ; 607 608# assembler flags 609HOST_ASFLAGS = ; 610 611# C/C++ flags 612HOST_CCFLAGS += -Wno-multichar ; 613HOST_C++FLAGS += -Wno-multichar ; 614 615if $(HOST_PLATFORM) != cygwin { 616 HOST_PIC_CCFLAGS += -fPIC ; 617 HOST_PIC_C++FLAGS += -fPIC ; 618} 619 620HOST_KERNEL_CCFLAGS += $(HOST_GCC_BASE_FLAGS) -finline -fno-builtin 621 -D_KERNEL_MODE ; 622HOST_KERNEL_C++FLAGS += $(HOST_GCC_BASE_FLAGS) -finline -fno-builtin 623 -fno-exceptions -D_KERNEL_MODE ; 624HOST_KERNEL_DEFINES += _KERNEL_MODE ; 625 626HOST_KERNEL_PIC_CCFLAGS = -fno-pic ; 627HOST_KERNEL_PIC_LINKFLAGS = ; 628if $(HOST_ARCH) = ppc { 629 # Build a position independent PPC kernel. We need to be able to relocate 630 # the kernel, since the virtual address space layout at boot time is not 631 # fixed. 632 HOST_KERNEL_PIC_CCFLAGS = -fPIE ; 633 HOST_KERNEL_PIC_LINKFLAGS = -shared -fPIE ; 634} 635if $(HOST_ARCH) = m68k { 636 # Build a position independent M68K kernel. We need to be able to relocate 637 # the kernel, since the virtual address space layout at boot time is not 638 # fixed. 639 HOST_KERNEL_PIC_CCFLAGS = $(HAIKU_KERNEL_PIC_CCFLAGS) ; 640 HOST_KERNEL_PIC_LINKFLAGS = $(HAIKU_KERNEL_PIC_LINKFLAGS) ; 641} 642 643# warning flags 644HOST_WARNING_CCFLAGS = -Wall -Wno-trigraphs -Wmissing-prototypes -Wpointer-arith 645 -Wcast-align -Wsign-compare ; 646HOST_WARNING_C++FLAGS = -Wall -Wno-trigraphs -Wno-ctor-dtor-privacy 647 -Woverloaded-virtual -Wpointer-arith -Wcast-align -Wsign-compare ; 648 649HOST_KERNEL_WARNING_CCFLAGS = -Wall -Wno-trigraphs -Wmissing-prototypes ; 650HOST_KERNEL_WARNING_C++FLAGS = -Wall -Wno-trigraphs ; 651 652# debug flags 653switch $(HOST_PLATFORM) { 654 case haiku : HOST_DEBUG_FLAGS ?= -ggdb ; 655 case haiku_host : HOST_DEBUG_FLAGS ?= -ggdb ; 656 case linux : HOST_DEBUG_FLAGS ?= -ggdb ; 657 case freebsd : HOST_DEBUG_FLAGS ?= -ggdb ; 658 case darwin : HOST_DEBUG_FLAGS ?= -ggdb ; 659 case * : HOST_DEBUG_FLAGS ?= -g ; 660} 661 662# debug 0: suppress asserts 663HOST_DEBUG_0_CCFLAGS = [ FDefines NDEBUG=$(NDEBUG) ] ; 664HOST_DEBUG_0_C++FLAGS = [ FDefines NDEBUG=$(NDEBUG) ] ; 665 666HOST_KERNEL_DEBUG_0_CCFLAGS = [ FDefines NDEBUG=$(NDEBUG) ] ; 667HOST_KERNEL_DEBUG_0_C++FLAGS = [ FDefines NDEBUG=$(NDEBUG) ] ; 668 669local level ; 670for level in $(HAIKU_DEBUG_LEVELS[2-]) { 671 local flags = $(HOST_DEBUG_FLAGS) [ FDefines DEBUG=$(level) ] ; 672 HOST_DEBUG_$(level)_CCFLAGS = $(flags) ; 673 HOST_DEBUG_$(level)_C++FLAGS = $(flags) ; 674 HOST_KERNEL_DEBUG_$(level)_CCFLAGS = $(flags) ; 675 HOST_KERNEL_DEBUG_$(level)_C++FLAGS = $(flags) ; 676} 677 678# ld flags 679if $(HOST_ARCH) = x86 && $(HAIKU_HOST_USE_32BIT) = 1 { 680 HOST_LDFLAGS += -melf_i386 ; 681} 682 683# private kernel headers do be used when compiling kernel code 684HOST_PRIVATE_KERNEL_HEADERS = ; 685 686# private shared kernel/libroot headers 687HOST_PRIVATE_SYSTEM_HEADERS = ; 688 689# under BeOS use copyattr instead of cp 690if $(HOST_PLATFORM_BEOS_COMPATIBLE) 691{ 692 CP = copyattr --data ; 693} 694 695HOST_DEFINES += $(HOST_ARCH_MACRO_DEFINE) ; 696HOST_DEFINES += _NO_INLINE_ASM ; 697 698if $(HOST_PLATFORM_BEOS_COMPATIBLE) { 699 # TODO: That's obviously not correct, but in the way the COMPILE_FOR_R5 700 # macro is used, it actually seems to mean r5/bone/dano. 701 # TODO: Deprecated. Remove! 702 HOST_DEFINES += COMPILE_FOR_R5 ; 703} 704 705# for builds of tools in the current environment 706HOST_BUILD_COMPATIBILITY_LIB_DIR = [ FDirName $(HOST_OBJECT_BASE_DIR) lib ] ; 707 708# For the generic attributes emulation: Target rm_attrs -- rm replacement that 709# also removes the attributes. 710HOST_RM_ATTRS_TARGET = ; 711 712if $(HOST_PLATFORM_BEOS_COMPATIBLE) { 713 # the C++ standard and support libraries 714 if $(HOST_GCC_VERSION[1]) < 3 { 715 HOST_LIBSTDC++ = stdc++.r4 ; 716 HOST_LIBSUPC++ = ; 717 } else { 718 HOST_LIBSTDC++ = stdc++ ; 719 HOST_LIBSUPC++ = supc++ ; 720 } 721 722 HOST_LIBROOT = root ; 723 HOST_STATIC_LIBROOT = $(HOST_LIBROOT) ; 724 HOST_LIBBE = be ; 725 HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR = "export LIBRARY_PATH=$LIBRARY_PATH:$(HOST_BUILD_COMPATIBILITY_LIB_DIR)" ; 726 HOST_LIBRARY_NAME_MAP_input_server = /system/servers/input_server ; 727 HOST_DEFINES += __STDC_FORMAT_MACROS __STDC_LIMIT_MACROS ; 728 729 local compatibilityHeader = -include [ FDirName $(HAIKU_TOP) headers build 730 HaikuBuildCompatibility.h ] ; 731 HOST_CCFLAGS += $(compatibilityHeader) ; 732 HOST_C++FLAGS += $(compatibilityHeader) ; 733 734 # compatibility library 735 HOST_HAIKU_COMPATIBILITY_LIBS = libhaikucompat.a ; 736} else { 737 HOST_LIBSTDC++ = stdc++ ; 738 HOST_LIBROOT = libroot_build.so ; 739 HOST_STATIC_LIBROOT = libroot_build.a ; 740 HOST_LIBBE = libbe_build.so ; 741 if $(HOST_PLATFORM) = cygwin { 742 HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR 743 = "export PATH=$PATH:$(HOST_BUILD_COMPATIBILITY_LIB_DIR)" ; 744 } else if $(HOST_PLATFORM) = darwin { 745 HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR 746 = "export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$(HOST_BUILD_COMPATIBILITY_LIB_DIR)" ; 747 } else { 748 HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR 749 = "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(HOST_BUILD_COMPATIBILITY_LIB_DIR)" ; 750 } 751 752 # the C++ support library 753 if $(HOST_GCC_VERSION[1]) < 3 { 754 HOST_LIBSUPC++ = ; 755 } else { 756 HOST_LIBSUPC++ = supc++ ; 757 } 758 759 if $(HOST_PLATFORM) = darwin { 760 # part of the C++ runtime lives in libstdc++ on Darwin 761 HOST_LIBSUPC++ = gcc_s.1 stdc++ ; 762 HOST_LIBSTDC++ = ; 763 } else if $(HOST_PLATFORM) = freebsd { 764 if $(HOST_CPU) = x86 && $(HOST_PLATFORM_IS_64_BIT) = 1 { 765 # amd64 FreeBSD 8 doesn't come without a shared libsupc++, and the 766 # static one prevents us from building shared libraries. So we have 767 # to work around by using the shared libstdc++. 768 HOST_LIBSUPC++ = stdc++ ; 769 HOST_LIBSTDC++ = ; 770 } 771 } 772 773 # Unlike glibc FreeBSD's libc doesn't have built-in regex support. 774 if $(HOST_PLATFORM) = freebsd { 775 HOST_LIBROOT += /usr/lib/libgnuregex.so ; 776 HOST_STATIC_LIBROOT += /usr/lib/libgnuregex.so ; 777 } else if $(HOST_PLATFORM) = darwin { 778 HOST_LIBROOT += /opt/local/lib/libgnuregex.dylib ; 779 HOST_STATIC_LIBROOT += /opt/local/lib/libgnuregex.dylib ; 780 } 781 782 # The BeOS compilers define __INTEL__ respectively __POWERPC__. On the 783 # build platform we need to make sure, this is also defined. 784 if $(HOST_CPU) = x86 { 785 HOST_DEFINES += __INTEL__ ; 786 } else if $(HOST_CPU) = ppc { 787 HOST_DEFINES += __POWERPC__ ; 788 } else if $(HOST_CPU) = m68k { 789 HOST_DEFINES += __M68K__ ; 790 } else if $(HOST_CPU) = mipsel { 791 HOST_DEFINES += __MIPSEL__ ; 792 } 793 794 # Supposing this is a glibc platform, let's try to get features like large 795 # file support, ISO C 99 definitions, etc. On some platforms we need to 796 # request 64 bit off_t support explicitely. 797 HOST_DEFINES += _GNU_SOURCE _FILE_OFFSET_BITS=64 __STDC_FORMAT_MACROS 798 __STDC_LIMIT_MACROS ; 799 800 # On Linux with xattr support we can use it for our attribute emulation, 801 # which is somewhat more robust. 802 if $(HAIKU_HOST_USE_XATTR) = 1 { 803 HOST_DEFINES += HAIKU_HOST_USE_XATTR ; 804 } else { 805 # Otherwise the generic attribute emulation is used, which uses a 806 # directory per file to store its attribute. We need to redefine RM so 807 # that the attributes are removed as well. We use a wrapper script, 808 # which invokes a build tool. If the build tool hasn't been built yet, 809 # the normal "rm" is used and the attributes are leaked (likely there 810 # aren't any yet). 811 RM = $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR) ";" 812 [ FDirName $(HAIKU_TOP) build scripts rm_attrs ] 813 [ FDirName $(HAIKU_OBJECT_DIR) $(HOST_PLATFORM) $(HOST_ARCH) release 814 tools rm_attrs ] -f ; 815 # assumes that rm_attrs is built with debugging disabled 816 HOST_RM_ATTRS_TARGET = <build>rm_attrs ; 817 } 818} 819 820# network libraries 821if $(HOST_PLATFORM_HAIKU_COMPATIBLE) { 822 HOST_NETWORK_LIBS = network ; 823 HOST_NETAPI_LIB = bnetapi ; 824 HOST_SELECT_UNAME_ETC_LIB = ; # libroot 825} else if $(HOST_PLATFORM_BONE_COMPATIBLE) { 826 HOST_NETWORK_LIBS = socket bind ; 827 HOST_NETAPI_LIB = bnetapi ; 828 HOST_SELECT_UNAME_ETC_LIB = ; # libroot 829} else if $(HOST_PLATFORM_BEOS_COMPATIBLE) { 830 HOST_NETWORK_LIBS = net ; 831 HOST_NETAPI_LIB = netapi ; 832 HOST_SELECT_UNAME_ETC_LIB = net ; 833} else if $(HOST_PLATFORM) = "sunos" { 834 HOST_NETWORK_LIBS = xnet ; 835 HOST_NETAPI_LIB = ; 836 HOST_SELECT_UNAME_ETC_LIB = ; 837} else { 838 # Linux,... 839 HOST_NETWORK_LIBS = ; 840 HOST_NETAPI_LIB = ; 841 HOST_SELECT_UNAME_ETC_LIB = ; 842} 843 844# define the executable MIME type 845HOST_EXECUTABLE_MIME_TYPE = "application/x-vnd.Be-elfexecutable" ; 846 847if $(METROWERKS) { 848 # at least parts of Haiku still can be compiled with 849 # the Metrowerks compiler on BeOS/PPC 850 HOST_EXECUTABLE_MIME_TYPE = "application/x-be-executable" ; 851} 852 853# Be API compatibility 854HOST_BE_API_HEADERS = ; 855HOST_BE_API_CCFLAGS = ; 856HOST_BE_API_C++FLAGS = ; 857 858if ! $(HOST_PLATFORM_BEOS_COMPATIBLE) { 859 HOST_BE_API_HEADERS = 860 [ FDirName $(HAIKU_TOP) headers build ] 861 [ FDirName $(HAIKU_TOP) headers build os ] 862 [ FDirName $(HAIKU_TOP) headers build os app ] 863 [ FDirName $(HAIKU_TOP) headers build os drivers ] 864 [ FDirName $(HAIKU_TOP) headers build os kernel ] 865 [ FDirName $(HAIKU_TOP) headers build os interface ] 866 [ FDirName $(HAIKU_TOP) headers build os opengl ] 867 [ FDirName $(HAIKU_TOP) headers build os storage ] 868 [ FDirName $(HAIKU_TOP) headers build os support ] 869 ; 870 HOST_BE_API_CCFLAGS = -include BeOSBuildCompatibility.h ; 871 HOST_BE_API_C++FLAGS = $(HOST_BE_API_CCFLAGS) ; 872} 873 874# Add directory with system headers we need when building something for the host 875# platform, e.g. containing missing POSIX/GNU headers. 876HOST_HDRS += [ FDirName $(HAIKU_TOP) headers build host $(HOST_PLATFORM) ] ; 877 878# For all versions of BeOS also add the common beos directory. 879if $(HOST_PLATFORM) in r5 bone dano { 880 HOST_HDRS += [ FDirName $(HAIKU_TOP) headers build host beos_common ] ; 881} 882 883 884#pragma mark - 885 886# target platform settings 887 888# check the target platform compatibility 889SetPlatformCompatibilityFlagVariables TARGET_PLATFORM : TARGET : target ; 890 891# check the compatibility between host and target platform 892if $(TARGET_PLATFORM) != haiku { 893 if ! $(HOST_PLATFORM_($(TARGET_PLATFORM))_COMPATIBLE) { 894 Exit ERROR: The host platform is not compatible with target platform 895 $(TARGET_PLATFORM). ; 896 } 897} 898 899# Set TARGET_* variables either from HAIKU_* or HOST_* depending on the 900# specified TARGET_PLATFORM. 901 902local buildVars = 903 ARCH CPU GCC_VERSION 904 905 AR CC C++ LD OBJCOPY RANLIB 906 907 INCLUDES_SEPARATOR LOCAL_INCLUDES_OPTION SYSTEM_INCLUDES_OPTION 908 909 HDRS CPPFLAGS CCFLAGS C++FLAGS LDFLAGS LINK LINKFLAGS DEFINES 910 ARFLAGS UNARFLAGS 911 KERNEL_DEFINES 912 913 KERNEL_CCFLAGS KERNEL_C++FLAGS 914 KERNEL_PIC_CCFLAGS KERNEL_PIC_LINKFLAGS 915 WARNING_CCFLAGS WARNING_C++FLAGS 916 917 KERNEL_WARNING_CCFLAGS KERNEL_WARNING_C++FLAGS 918 919 DEBUG_FLAGS 920 921 DEBUG_$(HAIKU_DEBUG_LEVELS)_CCFLAGS DEBUG_$(HAIKU_DEBUG_LEVELS)_C++FLAGS 922 923 KERNEL_DEBUG_$(HAIKU_DEBUG_LEVELS)_CCFLAGS 924 KERNEL_DEBUG_$(HAIKU_DEBUG_LEVELS)_C++FLAGS 925 926 PRIVATE_KERNEL_HEADERS 927 PRIVATE_SYSTEM_HEADERS 928 929 LIBSTDC++ LIBSUPC++ 930 STATIC_LIBSTDC++ STATIC_LIBSUPC++ 931 932 NETWORK_LIBS NETAPI_LIB SELECT_UNAME_ETC_LIB 933 934 ARCH_MACRO_DEFINE EXECUTABLE_MIME_TYPE 935 936 OBJECT_BASE_DIR COMMON_ARCH_OBJECT_DIR COMMON_DEBUG_OBJECT_DIR 937 DEBUG_$(HAIKU_DEBUG_LEVELS)_OBJECT_DIR 938; 939 940if $(TARGET_PLATFORM) = haiku { 941 local var ; 942 for var in $(buildVars) { 943 TARGET_$(var) = $(HAIKU_$(var)) ; 944 } 945 946 TARGET_GCC_LIB_DIR = $(HAIKU_GCC_LIB_DIR) ; 947 TARGET_GCC_HEADERS_DIR = $(HAIKU_GCC_HEADERS_DIR) ; 948 TARGET_GCC_LIBGCC = $(HAIKU_GCC_LIBGCC) ; 949 TARGET_GCC_LIBGCC_OBJECTS = $(HAIKU_GCC_LIBGCC_OBJECTS) ; 950 951 TARGET_BOOT_PLATFORM ?= $(HAIKU_BOOT_PLATFORM) ; 952 TARGET_BOOT_BOARD ?= $(HAIKU_BOOT_BOARD) ; 953 954 TARGET_LIBRARY_NAME_MAP = HAIKU_LIBRARY_NAME_MAP ; 955 956} else { 957 local var ; 958 for var in $(buildVars) { 959 TARGET_$(var) = $(HOST_$(var)) ; 960 } 961 962 TARGET_GCC_LIB_DIR = ; 963 TARGET_GCC_HEADERS_DIR = ; 964 TARGET_GCC_LIBGCC = ; 965 TARGET_GCC_LIBGCC_OBJECTS = ; 966 967 TARGET_BOOT_PLATFORM = ; 968 TARGET_BOOT_BOARD = ; 969 970 TARGET_LIBRARY_NAME_MAP = HOST_LIBRARY_NAME_MAP ; 971} 972 973# define macro, for identifying the platform 974switch $(TARGET_PLATFORM) { 975 case r5 : TARGET_DEFINES += HAIKU_TARGET_PLATFORM_BEOS ; 976 case bone : TARGET_DEFINES += HAIKU_TARGET_PLATFORM_BONE ; 977 case dano : TARGET_DEFINES += HAIKU_TARGET_PLATFORM_DANO ; 978 case haiku_host : TARGET_DEFINES += HAIKU_TARGET_PLATFORM_HAIKU ; 979 case haiku : TARGET_DEFINES += HAIKU_TARGET_PLATFORM_HAIKU ; 980 case linux : TARGET_DEFINES += HAIKU_TARGET_PLATFORM_LINUX ; 981 case freebsd : TARGET_DEFINES += HAIKU_TARGET_PLATFORM_FREEBSD ; 982 case darwin : TARGET_DEFINES += HAIKU_TARGET_PLATFORM_DARWIN ; 983 case cygwin : TARGET_DEFINES += HAIKU_TARGET_PLATFORM_CYGWIN ; 984 case sunos : TARGET_DEFINES += HAIKU_TARGET_PLATFORM_SUNOS ; 985 case libbe_test : TARGET_DEFINES += HAIKU_TARGET_PLATFORM_LIBBE_TEST ; 986} 987 988# define macro, for identifying the host platform 989switch $(HOST_PLATFORM) { 990 case r5 : HOST_DEFINES += HAIKU_HOST_PLATFORM_BEOS ; 991 case bone : HOST_DEFINES += HAIKU_HOST_PLATFORM_BONE ; 992 case dano : HOST_DEFINES += HAIKU_HOST_PLATFORM_DANO ; 993 case haiku_host : HOST_DEFINES += HAIKU_HOST_PLATFORM_HAIKU ; 994 case linux : HOST_DEFINES += HAIKU_HOST_PLATFORM_LINUX ; 995 case freebsd : HOST_DEFINES += HAIKU_HOST_PLATFORM_FREEBSD ; 996 case darwin : HOST_DEFINES += HAIKU_HOST_PLATFORM_DARWIN ; 997 case cygwin : HOST_DEFINES += HAIKU_HOST_PLATFORM_CYGWIN ; 998 case sunos : HOST_DEFINES += HAIKU_HOST_PLATFORM_SUNOS ; 999} 1000 1001# define host platform 64 bit macro 1002if $(HOST_PLATFORM_IS_64_BIT) { 1003 HOST_DEFINES += HAIKU_HOST_PLATFORM_64_BIT ; 1004} 1005 1006#pragma mark - 1007 1008# In case we build for a BeOS compatible platform, but not for Haiku, we 1009# include the HaikuBuildCompatibility.h header and link against 1010# libhaikucompat.a. 1011 1012if ! $(TARGET_PLATFORM_HAIKU_COMPATIBLE) && $(TARGET_PLATFORM_BEOS_COMPATIBLE) { 1013 # headers and flags 1014 local compatibilityHeader = -include [ FDirName $(HAIKU_TOP) headers build 1015 HaikuBuildCompatibility.h ] ; 1016 TARGET_CCFLAGS += $(compatibilityHeader) ; 1017 TARGET_C++FLAGS += $(compatibilityHeader) ; 1018 1019 # compatibility library 1020 TARGET_HAIKU_COMPATIBILITY_LIBS = libhaikucompat.a ; 1021} 1022 1023# special target libbe_test 1024 1025if $(TARGET_PLATFORM) = libbe_test { 1026 # headers and flags 1027 TARGET_HDRS += 1028 [ PublicHeaders $(DOT) app drivers game interface kernel storage 1029 support ] 1030 [ PrivateHeaders $(DOT) ] ; 1031 TARGET_DEFINES += __HAIKU__ ; 1032 1033 TARGET_PRIVATE_SYSTEM_HEADERS = 1034 [ PrivateHeaders $(DOT) system system/arch/$(TARGET_ARCH) ] ; 1035 1036 # directories 1037 TARGET_OBJECT_BASE_DIR 1038 = [ FDirName $(HAIKU_OBJECT_DIR) $(TARGET_PLATFORM) ] ; 1039 TARGET_COMMON_ARCH_OBJECT_DIR 1040 = [ FDirName $(TARGET_OBJECT_BASE_DIR) common ] ; 1041 TARGET_ARCH_OBJECT_DIR 1042 = [ FDirName $(TARGET_OBJECT_BASE_DIR) $(TARGET_ARCH) ] ; 1043 TARGET_COMMON_DEBUG_OBJECT_DIR 1044 = [ FDirName $(TARGET_ARCH_OBJECT_DIR) common ] ; 1045 TARGET_DEBUG_0_OBJECT_DIR 1046 = [ FDirName $(TARGET_ARCH_OBJECT_DIR) release ] ; 1047 1048 local level ; 1049 for level in $(HAIKU_DEBUG_LEVELS[2-]) { 1050 TARGET_DEBUG_$(level)_OBJECT_DIR 1051 = [ FDirName $(TARGET_ARCH_OBJECT_DIR) debug_$(level) ] ; 1052 } 1053 1054 # library name map 1055 TARGET_LIBRARY_NAME_MAP = LIBBE_LIBRARY_NAME_MAP ; 1056 LIBBE_LIBRARY_NAME_MAP_be = libbe_test.so ; 1057} 1058 1059 1060#pragma mark - 1061 1062# common stuff 1063 1064# start with a clean state 1065CCFLAGS = ; 1066C++FLAGS = ; 1067DEFINES = ; 1068 1069# Set CC, C++, LINK to invalid values, so that we realize early, that we use 1070# the wrong compiler. 1071CC = bad-cc ; 1072C++ = bad-c++ ; 1073LINK = bad-link ; 1074 1075# Allow compiling unit tests on Zeta. Instead of fixing the PostMessage() 1076# issues, they deprecated that nice function. This will enable it again: 1077C++FLAGS += -D_ZETA_USING_DEPRECATED_API_=1 ; 1078# Same for buggy find_directory threadsafety fixes 1079C++FLAGS += -D_ZETA_TS_FIND_DIR_=1 ; 1080 # TODO: Doesn't really belong here. 1081 1082 1083# Defaults for warnings, optimization, and debugging. 1084# 1085WARNINGS ?= 1 ; 1086OPTIM ?= -O2 ; 1087DEBUG ?= 0 ; 1088 1089 1090# Set the defaults for PLATFORM and SUPPORTED_PLATFORMS. PLATFORM is only 1091# overridden for targets to be built for the host platform. SUPPORTED_PLATFORMS 1092# can be overridden by the author of a component. 1093PLATFORM = $(TARGET_PLATFORM) ; 1094SUPPORTED_PLATFORMS = haiku ; 1095 1096 1097# Instructs the Library rule to not make its object files temporary. 1098# This is needed as some objects are used in a static library and for an 1099# executable. 1100KEEPOBJS = true ; 1101 1102 1103# Set permissions to how they should be on the image. 1104EXEMODE = 755 ; 1105FILEMODE = 644 ; 1106SHELLMODE = 755 ; 1107 1108 1109# output directories 1110# TODO: Review this. 1111HAIKU_DOCUMENTATION_DIR ?= [ FDirName $(HAIKU_OUTPUT_DIR) documentation ] ; 1112HAIKU_DOCUMENTATION_OBJECT_DIR ?= [ FDirName $(HAIKU_COMMON_PLATFORM_OBJECT_DIR) 1113 documentation ] ; 1114 1115# TODO: Rethink test stuff. 1116HAIKU_TEST_DIR ?= [ FDirName $(HAIKU_OUTPUT_DIR) tests 1117 $(TARGET_PLATFORM) $(HAIKU_ARCH) ] ; 1118HAIKU_APP_TEST_DIR ?= [ FDirName $(HAIKU_TEST_DIR) apps ] ; 1119HAIKU_APP_TEST_LIB_DIR ?= [ FDirName $(HAIKU_APP_TEST_DIR) lib ] ; 1120HAIKU_TMP_DIR ?= [ FDirName $(HAIKU_OUTPUT_DIR) tmp ] ; 1121 1122HAIKU_PACKAGE_DIR ?= [ FDirName $(HAIKU_OUTPUT_DIR) packages ] ; 1123HAIKU_PACKAGE_OBJECT_DIR ?= [ FDirName $(HAIKU_OBJECT_DIR) packages ] ; 1124 1125TARGET_TEST_DIR ?= [ FDirName $(HAIKU_TEST_DIR) 1126 $(TARGET_PLATFORM) ] ; 1127TARGET_UNIT_TEST_DIR ?= [ FDirName $(TARGET_TEST_DIR) unittests ] ; 1128TARGET_UNIT_TEST_LIB_DIR ?= [ FDirName $(TARGET_UNIT_TEST_DIR) lib ] ; 1129 1130# automatically setup the objects directory per subdirectory 1131SUBDIRRULES += SetupObjectsDir ; 1132 1133# Add the standard (userland) warning flags variables to the ones restored in 1134# every subdirectory. Thus we can easily meddle with them in subdirectories 1135# with imported sources. 1136AUTO_SET_UP_CONFIG_VARIABLES += 1137 HOST_WARNING_CCFLAGS HOST_WARNING_C++FLAGS 1138 TARGET_WARNING_CCFLAGS TARGET_WARNING_C++FLAGS 1139 1140 # also add PLATFORM and SUPPORTED_PLATFORMS 1141 PLATFORM SUPPORTED_PLATFORMS 1142; 1143 1144 1145# enable -Werror for certain parts of the source tree 1146 1147if $(HAIKU_GCC_VERSION[1]) = 2 { 1148 rule EnableWerror dirTokens : scope { 1149 AppendToConfigVar CCFLAGS : HAIKU_TOP $(dirTokens) : -Werror 1150 : $(scope) ; 1151 AppendToConfigVar C++FLAGS : HAIKU_TOP $(dirTokens) : -Werror 1152 : $(scope) ; 1153 } 1154} else { 1155 # -Wuninitialized gives too many false positives. 1156 rule EnableWerror dirTokens : scope { 1157 AppendToConfigVar CCFLAGS : HAIKU_TOP $(dirTokens) 1158 : -Werror -Wno-error=uninitialized : $(scope) ; 1159 AppendToConfigVar C++FLAGS : HAIKU_TOP $(dirTokens) 1160 : -Werror -Wno-error=uninitialized : $(scope) ; 1161 } 1162} 1163 1164# Work-around for GCC 2 problem -- despite -Wno-multichar it reports 1165# multichar warnings in headers/private/kernel/debugger_keymaps.h included by 1166# src/system/kernel/arch/x86/arch_debug_console.cpp. 1167if $(HAIKU_GCC_VERSION[1]) = 2 { 1168 local file = <src!system!kernel!arch!x86>arch_debug_console.o ; 1169 C++FLAGS on $(file) = [ on $(file) return $(C++FLAGS) ] ; 1170} 1171 1172if $(HAIKU_NO_WERROR) != 1 { 1173 EnableWerror src add-ons accelerants 3dfx ; 1174 EnableWerror src add-ons accelerants ati ; 1175 EnableWerror src add-ons accelerants common ; 1176 EnableWerror src add-ons accelerants et6x00 ; 1177# EnableWerror src add-ons accelerants intel_extreme ; 1178# EnableWerror src add-ons accelerants matrox ; 1179 EnableWerror src add-ons accelerants neomagic ; 1180# EnableWerror src add-ons accelerants nvidia ; 1181 EnableWerror src add-ons accelerants nvidia_gpgpu ; 1182# EnableWerror src add-ons accelerants radeon ; 1183 EnableWerror src add-ons accelerants radeon_hd ; 1184 EnableWerror src add-ons accelerants s3 ; 1185 EnableWerror src add-ons accelerants skeleton ; 1186 EnableWerror src add-ons accelerants vesa ; 1187 EnableWerror src add-ons accelerants via ; 1188 EnableWerror src add-ons accelerants vmware ; 1189 EnableWerror src add-ons bluetooth ; 1190 EnableWerror src add-ons decorators ; 1191 EnableWerror src add-ons disk_systems ; 1192 EnableWerror src add-ons input_server devices ; 1193# EnableWerror src add-ons input_server filters ; 1194# EnableWerror src add-ons input_server methods ; 1195# EnableWerror src add-ons kernel bus_managers acpi ; 1196 EnableWerror src add-ons kernel bus_managers agp_gart ; 1197 EnableWerror src add-ons kernel bus_managers ata ; 1198 EnableWerror src add-ons kernel bus_managers config_manager ; 1199 EnableWerror src add-ons kernel bus_managers firewire ; 1200 EnableWerror src add-ons kernel bus_managers isa ; 1201 EnableWerror src add-ons kernel bus_managers pci ; 1202# EnableWerror src add-ons kernel bus_managers ps2 ; # gcc2 1203 EnableWerror src add-ons kernel bus_managers scsi ; 1204 EnableWerror src add-ons kernel bus_managers usb ; 1205 EnableWerror src add-ons kernel busses agp_gart ; 1206 EnableWerror src add-ons kernel busses ata ; 1207 EnableWerror src add-ons kernel busses scsi ; 1208 EnableWerror src add-ons kernel busses usb ; 1209 EnableWerror src add-ons kernel console ; 1210 EnableWerror src add-ons kernel cpu ; 1211# EnableWerror src add-ons kernel debugger ; # gcc2 1212# EnableWerror src add-ons kernel drivers audio ; 1213 EnableWerror src add-ons kernel drivers bluetooth ; 1214 EnableWerror src add-ons kernel drivers bus ; 1215 EnableWerror src add-ons kernel drivers common ; 1216 EnableWerror src add-ons kernel drivers disk ; 1217 EnableWerror src add-ons kernel drivers dvb ; 1218# EnableWerror src add-ons kernel drivers graphics ; 1219# EnableWerror src add-ons kernel drivers input ; 1220 EnableWerror src add-ons kernel drivers joystick ; 1221 EnableWerror src add-ons kernel drivers midi ; 1222 EnableWerror src add-ons kernel drivers misc ; 1223# EnableWerror src add-ons kernel drivers network ; 1224 EnableWerror src add-ons kernel drivers ports ; 1225# EnableWerror src add-ons kernel drivers power ; 1226 EnableWerror src add-ons kernel drivers printer ; 1227 EnableWerror src add-ons kernel drivers random ; 1228 EnableWerror src add-ons kernel drivers tty ; 1229 EnableWerror src add-ons kernel drivers video ; 1230 EnableWerror src add-ons kernel file_systems bfs ; 1231 EnableWerror src add-ons kernel file_systems cdda ; 1232# EnableWerror src add-ons kernel file_systems ext2 ; 1233# EnableWerror src add-ons kernel file_systems fat ; 1234# EnableWerror src add-ons kernel file_systems googlefs ; 1235 EnableWerror src add-ons kernel file_systems iso9660 ; 1236 EnableWerror src add-ons kernel file_systems layers ; 1237 EnableWerror src add-ons kernel file_systems netfs ; 1238 EnableWerror src add-ons kernel file_systems nfs ; 1239# EnableWerror src add-ons kernel file_systems ntfs ; 1240 EnableWerror src add-ons kernel file_systems packagefs ; 1241 EnableWerror src add-ons kernel file_systems ramfs ; 1242# EnableWerror src add-ons kernel file_systems reiserfs ; 1243 EnableWerror src add-ons kernel file_systems udf ; 1244 EnableWerror src add-ons kernel file_systems userlandfs ; 1245 EnableWerror src add-ons kernel generic ; 1246 EnableWerror src add-ons kernel network atalink_protocols ; 1247 EnableWerror src add-ons kernel network devices ; 1248 EnableWerror src add-ons kernel network notifications ; 1249 EnableWerror src add-ons kernel network ppp ; 1250# EnableWerror src add-ons kernel network protocols ; 1251# EnableWerror src add-ons kernel network stack ; 1252 EnableWerror src add-ons kernel partitioning_systems ; 1253 EnableWerror src add-ons locale ; 1254 EnableWerror src add-ons mail_daemon ; 1255 EnableWerror src add-ons media media-add-ons demultiplexer ; 1256 EnableWerror src add-ons media media-add-ons dvb ; 1257 EnableWerror src add-ons media media-add-ons esound_sink ; 1258 EnableWerror src add-ons media media-add-ons finepix_webcam ; 1259 EnableWerror src add-ons media media-add-ons firewire_dv ; 1260 EnableWerror src add-ons media media-add-ons legacy ; 1261 EnableWerror src add-ons media media-add-ons mixer ; 1262 EnableWerror src add-ons media media-add-ons multi_audio ; 1263 EnableWerror src add-ons media media-add-ons opensound ; 1264 EnableWerror src add-ons media media-add-ons radeon ; 1265 EnableWerror src add-ons media media-add-ons reader ; 1266 EnableWerror src add-ons media media-add-ons tone_producer_demo ; 1267 EnableWerror src add-ons media media-add-ons usb_vision ; 1268# EnableWerror src add-ons media media-add-ons usb_webcam ; 1269 EnableWerror src add-ons media media-add-ons video_mixer ; 1270# EnableWerror src add-ons media media-add-ons video_producer_demo ; 1271 EnableWerror src add-ons media media-add-ons videowindow ; 1272 EnableWerror src add-ons media media-add-ons writer ; 1273 EnableWerror src add-ons media plugins ac3_decoder ; 1274 EnableWerror src add-ons media plugins aiff_reader ; 1275 EnableWerror src add-ons media plugins ape_reader ; 1276# EnableWerror src add-ons media plugins asf_reader ; 1277 EnableWerror src add-ons media plugins au_reader ; 1278# EnableWerror src add-ons media plugins avi_reader ; 1279# EnableWerror src add-ons media plugins ffmpeg ; 1280# EnableWerror src add-ons media plugins matroska ; 1281# EnableWerror src add-ons media plugins mov_reader ; 1282 EnableWerror src add-ons media plugins mp3_decoder ; 1283# EnableWerror src add-ons media plugins mp3_reader ; 1284 EnableWerror src add-ons media plugins mp4_reader ; 1285 EnableWerror src add-ons media plugins musepack ; 1286# EnableWerror src add-ons media plugins ogg ; 1287# EnableWerror src add-ons media plugins raw_decoder ; 1288# EnableWerror src add-ons media plugins speex ; 1289 EnableWerror src add-ons media plugins theora ; 1290 EnableWerror src add-ons media plugins vorbis ; 1291# EnableWerror src add-ons media plugins wav_reader ; 1292 EnableWerror src add-ons media plugins xvid_decoder ; 1293 EnableWerror src add-ons opengl ; 1294 EnableWerror src add-ons print ; 1295 EnableWerror src add-ons screen_savers ; 1296 EnableWerror src add-ons tracker ; 1297 EnableWerror src add-ons translators bmp ; 1298# EnableWerror src add-ons translators exr ; 1299 EnableWerror src add-ons translators gif ; 1300 EnableWerror src add-ons translators hpgs ; 1301 EnableWerror src add-ons translators hvif ; 1302 EnableWerror src add-ons translators ico ; 1303# EnableWerror src add-ons translators jpeg ; # gcc2 1304 EnableWerror src add-ons translators jpeg2000 ; 1305 EnableWerror src add-ons translators pcx ; 1306# EnableWerror src add-ons translators png ; # gcc2 1307 EnableWerror src add-ons translators ppm ; 1308 EnableWerror src add-ons translators raw ; 1309 EnableWerror src add-ons translators rtf ; 1310 EnableWerror src add-ons translators sgi ; 1311 EnableWerror src add-ons translators shared ; 1312 EnableWerror src add-ons translators stxt ; 1313 EnableWerror src add-ons translators tga ; 1314 EnableWerror src add-ons translators tiff ; 1315# EnableWerror src add-ons translators wonderbrush ; 1316# EnableWerror src add-ons print ; 1317 EnableWerror src bin package ; 1318 EnableWerror src apps aboutsystem ; 1319 EnableWerror src apps activitymonitor ; 1320 EnableWerror src apps bootman ; 1321 EnableWerror src apps bsnow ; 1322 EnableWerror src apps cdplayer ; 1323# EnableWerror src apps charactermap ; 1324 EnableWerror src apps clock ; 1325 EnableWerror src apps codycam ; 1326 EnableWerror src apps cortex ; 1327 EnableWerror src apps deskbar ; 1328 EnableWerror src apps deskcalc ; 1329 EnableWerror src apps devices ; 1330 EnableWerror src apps diskprobe ; 1331# EnableWerror src apps diskusage ; 1332 EnableWerror src apps drivesetup ; 1333 EnableWerror src apps expander ; 1334 EnableWerror src apps fontdemo ; 1335 EnableWerror src apps glteapot ; 1336 EnableWerror src apps haiku3d ; 1337# EnableWerror src apps icon-o-matic ; 1338 EnableWerror src apps installer ; 1339 EnableWerror src apps launchbox ; 1340 EnableWerror src apps magnify ; 1341# EnableWerror src apps mail ; 1342 EnableWerror src apps mandelbrot ; 1343 EnableWerror src apps mediaconverter ; 1344# EnableWerror src apps mediaplayer ; 1345 EnableWerror src apps midiplayer ; 1346 EnableWerror src apps networkstatus ; 1347 EnableWerror src apps packageinstaller ; 1348 EnableWerror src apps pairs ; 1349 EnableWerror src apps people ; 1350# EnableWerror src apps poorman ; 1351 EnableWerror src apps powerstatus ; 1352 EnableWerror src apps processcontroller ; 1353 EnableWerror src apps pulse ; 1354 EnableWerror src apps readonlybootprompt ; 1355 EnableWerror src apps screenshot ; 1356 EnableWerror src apps showimage ; 1357 EnableWerror src apps soundrecorder ; 1358 EnableWerror src apps stylededit ; 1359 EnableWerror src apps sudoku ; 1360 EnableWerror src apps terminal ; 1361 EnableWerror src apps text_search ; 1362 EnableWerror src apps tracker ; 1363 EnableWerror src apps tv ; 1364 EnableWerror src apps workspaces ; 1365 EnableWerror src kits app ; 1366 EnableWerror src kits bluetooth ; 1367 EnableWerror src kits debug ; 1368 EnableWerror src kits device ; 1369 EnableWerror src kits game ; 1370 EnableWerror src kits interface ; 1371# EnableWerror src kits locale ; 1372 EnableWerror src kits mail ; 1373# EnableWerror src kits media ; # gcc2 1374 EnableWerror src kits midi ; 1375 EnableWerror src kits midi2 ; 1376 EnableWerror src kits network ; 1377 EnableWerror src kits notification ; 1378 EnableWerror src kits opengl ; 1379 EnableWerror src kits print ; 1380 EnableWerror src kits screensaver ; 1381 EnableWerror src kits shared ; 1382 EnableWerror src kits storage ; 1383 EnableWerror src kits support ; 1384 EnableWerror src kits textencoding ; 1385# EnableWerror src kits tracker ; 1386 EnableWerror src kits translation ; 1387 EnableWerror src servers ; 1388 EnableWerror src system kernel ; 1389 EnableWerror src system runtime_loader ; 1390} 1391 1392