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