xref: /haiku/build/jam/BuildSetup (revision 4b7e219688450694efc9d1890f83f816758c16d3)
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 ;
23HAIKU_CONTAINER_SYSTEM_DIR_TOKENS on $(HAIKU_IMAGE_CONTAINER_NAME) = system ;
24
25# network boot archive
26HAIKU_NET_BOOT_ARCHIVE_CONTAINER_NAME = haiku-netboot-archive-container ;
27HAIKU_CONTAINER_GRIST on $(HAIKU_NET_BOOT_ARCHIVE_CONTAINER_NAME)
28	= NetBootArchive ;
29# HAIKU_INCLUDE_IN_CONTAINER_VAR -- update only mode not supported
30HAIKU_INSTALL_TARGETS_VAR on $(HAIKU_NET_BOOT_ARCHIVE_CONTAINER_NAME)
31	= HAIKU_NET_BOOT_ARCHIVE_INSTALL_TARGETS ;
32HAIKU_CONTAINER_SYSTEM_DIR_TOKENS on $(HAIKU_NET_BOOT_ARCHIVE_CONTAINER_NAME)
33	= system ;
34
35# boot floppy
36HAIKU_FLOPPY_BOOT_IMAGE_CONTAINER_NAME = haiku-boot-floppy-container ;
37HAIKU_CONTAINER_GRIST on $(HAIKU_FLOPPY_BOOT_IMAGE_CONTAINER_NAME)
38	= FloppyBootImage ;
39# HAIKU_INCLUDE_IN_CONTAINER_VAR -- update only mode not supported
40HAIKU_INSTALL_TARGETS_VAR on $(HAIKU_FLOPPY_BOOT_IMAGE_CONTAINER_NAME)
41	= HAIKU_FLOPPY_BOOT_IMAGE_INSTALL_TARGETS ;
42HAIKU_CONTAINER_SYSTEM_DIR_TOKENS on $(HAIKU_FLOPPY_BOOT_IMAGE_CONTAINER_NAME)
43	= system ;
44
45# boot CD image
46HAIKU_CD_BOOT_IMAGE_CONTAINER_NAME = haiku-boot-cd-container ;
47HAIKU_CONTAINER_GRIST on $(HAIKU_CD_BOOT_IMAGE_CONTAINER_NAME) = CDBootImage ;
48# HAIKU_INCLUDE_IN_CONTAINER_VAR -- update only mode not supported
49HAIKU_INSTALL_TARGETS_VAR on $(HAIKU_CD_BOOT_IMAGE_CONTAINER_NAME)
50	= HAIKU_CD_BOOT_IMAGE_INSTALL_TARGETS ;
51HAIKU_CONTAINER_SYSTEM_DIR_TOKENS on $(HAIKU_CD_BOOT_IMAGE_CONTAINER_NAME)
52	= system ;
53
54# boot CD for PPC image
55HAIKU_CD_BOOT_PPC_IMAGE_CONTAINER_NAME = haiku-boot-cd-ppc-container ;
56HAIKU_CONTAINER_GRIST on $(HAIKU_CD_BOOT_PPC_IMAGE_CONTAINER_NAME)
57	= CDBootPPCImage ;
58# HAIKU_INCLUDE_IN_CONTAINER_VAR -- update only mode not supported
59HAIKU_INSTALL_TARGETS_VAR on $(HAIKU_CD_BOOT_PPC_IMAGE_CONTAINER_NAME)
60	= HAIKU_CD_BOOT_PPC_IMAGE_INSTALL_TARGETS ;
61HAIKU_CONTAINER_SYSTEM_DIR_TOKENS on $(HAIKU_CD_BOOT_PPC_IMAGE_CONTAINER_NAME)
62	= system ;
63
64# Haiku image/install defaults
65HAIKU_DEFAULT_IMAGE_NAME = haiku.image ;
66HAIKU_DEFAULT_IMAGE_DIR = $(HAIKU_OUTPUT_DIR) ;
67HAIKU_DEFAULT_VMWARE_IMAGE_NAME = haiku.vmdk ;
68HAIKU_DEFAULT_INSTALL_DIR = /Haiku ;
69HAIKU_DEFAULT_IMAGE_SIZE ?= 300 ; # 300 MB
70HAIKU_DEFAULT_IMAGE_LABEL ?= Haiku ;
71
72# Haiku CD defaults
73HAIKU_DEFAULT_CD_NAME = haiku-cd.iso ;
74HAIKU_DEFAULT_CD_DIR = $(HAIKU_OUTPUT_DIR) ;
75HAIKU_DEFAULT_CD_LABEL = Haiku ;
76
77# Haiku Anyboot defaults
78HAIKU_DEFAULT_ANYBOOT_NAME = haiku-anyboot.image ;
79HAIKU_DEFAULT_ANYBOOT_DIR = $(HAIKU_OUTPUT_DIR) ;
80HAIKU_DEFAULT_ANYBOOT_LABEL ?= Haiku ;
81
82# analyze and optionally replace jam's target parameters
83ProcessCommandLineArguments ;
84
85
86# supported debug levels
87HAIKU_DEBUG_LEVELS = 0 1 2 3 4 5 ;
88
89# BeOS, BONE, Dan0 compatible platforms
90HAIKU_BEOS_COMPATIBLE_PLATFORMS = haiku r5 bone dano haiku_host ;
91HAIKU_BONE_COMPATIBLE_PLATFORMS = haiku bone dano haiku_host ;
92HAIKU_DANO_COMPATIBLE_PLATFORMS = haiku dano haiku_host ;
93HAIKU_HAIKU_COMPATIBLE_PLATFORMS = haiku haiku_host ;
94
95# configuration header directories
96HAIKU_CONFIG_HEADERS = [ FDirName $(HAIKU_TOP) build user_config_headers ]
97	[ FDirName $(HAIKU_TOP) build config_headers ] ;
98
99
100# object directories common to all architectures
101HAIKU_OBJECT_BASE_DIR = [ FDirName $(HAIKU_OBJECT_DIR) haiku ] ;
102HAIKU_COMMON_ARCH_OBJECT_DIR = [ FDirName $(HAIKU_OBJECT_BASE_DIR) common ] ;
103
104
105#pragma mark - haiku target platform settings
106
107
108local architecture ;
109for architecture in $(HAIKU_PACKAGING_ARCHS) {
110	ArchitectureSetup $(architecture) ;
111}
112
113# TODO: Might not be needed anymore.
114if $(HAIKU_HOST_BUILD_ONLY) = 1 {
115	HAIKU_GCC_VERSION = 0 0 0 ;
116}
117
118if $(HAIKU_PACKAGING_ARCH) {
119	KernelArchitectureSetup $(HAIKU_PACKAGING_ARCH) ;
120}
121
122HAIKU_DEFINES = __HAIKU__ ;
123HAIKU_LIBSUPC++ = $(HAIKU_LIBSUPC++_$(HAIKU_PACKAGING_ARCH)) ;
124HAIKU_LIBSTDC++ = $(HAIKU_LIBSTDC++_$(HAIKU_PACKAGING_ARCH)) ;
125
126
127# distro compatibility level defines
128HAIKU_DISTRO_COMPATIBILITY ?= "default" ;
129switch $(HAIKU_DISTRO_COMPATIBILITY) {
130	case official :
131		HAIKU_DEFINES += HAIKU_DISTRO_COMPATIBILITY_OFFICIAL ;
132		HAIKU_INCLUDE_TRADEMARKS = "" ;
133	case compatible :
134		HAIKU_DEFINES += HAIKU_DISTRO_COMPATIBILITY_COMPATIBLE ;
135		HAIKU_INCLUDE_TRADEMARKS = "" ;
136	case "default" :
137		HAIKU_DEFINES += HAIKU_DISTRO_COMPATIBILITY_DEFAULT ;
138		HAIKU_INCLUDE_TRADEMARKS = ;
139	case * :
140		Exit "Invalid value for HAIKU_DISTRO_COMPATIBILITY:"
141			$(HAIKU_DISTRO_COMPATIBILITY) ;
142}
143
144# If the environment variable HAIKU_INCLUDE_PATENTED_CODE is defined, we define
145# an equally named macro to the variable value. Some components use the macro
146# to allow compilation of code known to implemented patented ideas and/or
147# techniques, for example the Freetype bytecode hinter or sub-pixel rendering as
148# well as some problematic media codecs.
149if $(HAIKU_INCLUDE_PATENTED_CODE) {
150	HAIKU_DEFINES
151		+= HAIKU_INCLUDE_PATENTED_CODE=$(HAIKU_INCLUDE_PATENTED_CODE) ;
152}
153
154HAIKU_ATA_STACK ?= 1 ;
155
156# network libraries
157HAIKU_NETWORK_LIBS = network ;
158HAIKU_NETAPI_LIB = bnetapi ;
159HAIKU_SELECT_UNAME_ETC_LIB = ;	# libroot, against which we link anyway
160
161
162HAIKU_EXECUTABLE_MIME_TYPE = "application/x-vnd.Be-elfexecutable" ;
163
164# TODO: The version stuff should probably go into a separate file and be made
165# available as macro, too.
166# Set our version number if not already set and mark it as a developer build
167if ! $(HAIKU_BUILD_VERSION) {
168	HAIKU_BUILD_VERSION ?= "1 0 0 a 1" ;
169	HAIKU_BUILD_DESCRIPTION ?= "Developer Build" ;
170}
171
172# If HAIKU_BUILD_VERSION is set, but HAIKU_BUILD_DESCRIPTION isn't, mark it as
173# an unknown build.
174HAIKU_BUILD_DESCRIPTION ?= "Unknown Build" ;
175
176
177#pragma mark - host platform settings
178
179
180# determine the endianness of the host
181switch $(HOST_GCC_MACHINE) {
182	case amd64-*	: HAIKU_HOST_IS_BIG_ENDIAN = 0 ;
183	case i?86-*		: HAIKU_HOST_IS_BIG_ENDIAN = 0 ;
184	case powerpc-*	: HAIKU_HOST_IS_BIG_ENDIAN = 1 ;
185	case x86_64-*	: HAIKU_HOST_IS_BIG_ENDIAN = 0 ;
186
187	# the following are rather unlikely as hosts ...
188	case arm-*		: HAIKU_HOST_IS_BIG_ENDIAN = 0 ;
189	case m68k-*		: HAIKU_HOST_IS_BIG_ENDIAN = 1 ;
190	case mipsel-*	: HAIKU_HOST_IS_BIG_ENDIAN = 0 ;
191	case *			: Exit "Unsupported gcc host machine:" $(HOST_GCC_MACHINE) ;
192}
193
194# analyze the host gcc machine spec to find out about 64-bitness
195HOST_PLATFORM_IS_64_BIT = ;
196switch $(HOST_GCC_MACHINE) {
197	case amd64-* :				HOST_PLATFORM_IS_64_BIT = 1 ;
198	case i686-apple-darwin10 :	HOST_PLATFORM_IS_64_BIT = 1 ;
199	case i686-apple-darwin11 :	HOST_PLATFORM_IS_64_BIT = 1 ;
200	case x86_64-* :				HOST_PLATFORM_IS_64_BIT = 1 ;
201}
202
203# If HAIKU_HOST_USE_32BIT is set, add the required gcc base flag (the LD flag
204# is set later), or, if the architecture isn't actually 64 bit, clear
205# HAIKU_HOST_USE_32BIT.
206# Afterwards HOST_PLATFORM_IS_64_BIT will indicate whether the architecture is
207# effectively (i.e. when using the compiler/linker flags) 64 bit and
208# HAIKU_HOST_USE_32BIT will be set, iff the architecture is really 64 bit and
209# 32 bit mode was requested.
210if $(HAIKU_HOST_USE_32BIT) = 1 {
211	if $(HOST_PLATFORM_IS_64_BIT) {
212		# enable GCC -m32 option
213		HOST_GCC_BASE_FLAGS = -m32 ;
214		HOST_PLATFORM_IS_64_BIT = ;
215	} else {
216		HAIKU_HOST_USE_32BIT = 0 ;
217	}
218}
219
220
221# save jam's variables for the build platform
222HOST_AR				?= $(AR) ;
223HOST_CC				?= $(CC) ;
224HOST_C++			?= $(C++) ;
225HOST_LINK			?= $(LINK) ;
226HOST_RANLIB			?= $(RANLIB) ;
227HOST_CPPFLAGS		?= $(CPPFLAGS) ;
228HOST_CCFLAGS		?= $(HOST_GCC_BASE_FLAGS) $(CCFLAGS) ;
229HOST_C++FLAGS		?= $(HOST_GCC_BASE_FLAGS) $(C++FLAGS) ;
230HOST_LDFLAGS		?= $(LDFLAGS) ;
231HOST_LINKFLAGS		?= $(HOST_GCC_BASE_FLAGS) $(LINKFLAGS) ;
232HOST_DEFINES		?= $(DEFINES) ;
233HOST_HDRS			?= $(HDRS) ;
234
235
236# split up HOST_AR into the command name and flags
237HOST_AR				= [ Match "([^ ]*) *(.*)" : $(HOST_AR[1]) ]
238					  $(HOST_AR[2-]) ;
239HOST_ARFLAGS		= $(HOST_AR[2-]) ;
240HOST_AR				= $(HOST_AR[1]) ;
241HOST_UNARFLAGS		?= x ;
242
243# check the host platform compatibility
244SetPlatformCompatibilityFlagVariables HOST_PLATFORM : HOST : host
245	: linux openbsd freebsd darwin sunos cygwin ;
246HOST_PLATFORM_(host)_COMPATIBLE = 1 ;
247
248if $(HOST_PLATFORM) = linux || $(HOST_PLATFORM) = freebsd
249	|| $(HOST_PLATFORM) = darwin || $(HOST_PLATFORM) = cygwin
250	|| $(HOST_PLATFORM) = sunos || $(HOST_PLATFORM) = openbsd {
251	# don't use lex: otherwise rc will not work correctly
252	if $(LEX) = lex {
253		LEX = flex ;
254	}
255}
256
257# On recent versions of OS X cc and c++ point to clang, which fails to
258# compile some of the host tools. As a workaround, force use of GCC.
259if $(HOST_PLATFORM) = darwin {
260	HOST_CC = gcc ;
261	HOST_C++ = g++ ;
262}
263
264if $(HOST_PLATFORM) = cygwin {
265	HOST_LINKFLAGS += -Xlinker --allow-multiple-definition -Xlinker
266		--enable-auto-import ;
267}
268
269HOST_CPU ?= $(OSPLAT:L) ;
270
271# Jam doesn't know x86_64, so override HOST_CPU, if 64 bit.
272if $(HOST_CPU) = x86 && $(HOST_PLATFORM_IS_64_BIT) {
273	HOST_CPU = x86_64 ;
274}
275
276HOST_ARCH ?= $(HOST_CPU) ;
277HOST_ARCHS = $(HOST_ARCH) ;
278HOST_KERNEL_ARCH = host ;
279
280# analyze GCC version
281HOST_GCC_VERSION = [ FAnalyzeGCCVersion HOST_GCC_RAW_VERSION ] ;
282
283# set packaging architecture
284HOST_PACKAGING_ARCH		?= $(HOST_CPU) ;
285if $(HOST_PACKAGING_ARCH) = x86 && $(HOST_GCC_VERSION[1]) = 2 {
286	HOST_PACKAGING_ARCH = x86_gcc2 ;
287}
288HOST_PACKAGING_ARCHS = $(HOST_PACKAGING_ARCH) ;
289
290# directories
291HOST_OBJECT_BASE_DIR = [ FDirName $(HAIKU_OBJECT_DIR) $(HOST_PLATFORM) ] ;
292HOST_COMMON_ARCH_OBJECT_DIR = [ FDirName $(HOST_OBJECT_BASE_DIR) common ] ;
293HOST_ARCH_OBJECT_DIR
294	= [ FDirName $(HOST_OBJECT_BASE_DIR) $(HOST_PACKAGING_ARCH) ] ;
295HOST_COMMON_DEBUG_OBJECT_DIR = [ FDirName $(HOST_ARCH_OBJECT_DIR) common ] ;
296HOST_DEBUG_0_OBJECT_DIR = [ FDirName $(HOST_ARCH_OBJECT_DIR) release ] ;
297
298local level ;
299for level in $(HAIKU_DEBUG_LEVELS[2-]) {
300	HOST_DEBUG_$(level)_OBJECT_DIR
301		= [ FDirName $(HOST_ARCH_OBJECT_DIR) debug_$(level) ] ;
302}
303
304# set variables for gcc header options
305SetIncludePropertiesVariables HOST ;
306
307# assembler flags
308HOST_ASFLAGS = ;
309
310# C/C++ flags
311HOST_CCFLAGS += -Wno-multichar ;
312HOST_C++FLAGS += -Wno-multichar ;
313
314if $(HOST_PLATFORM) != cygwin {
315	HOST_PIC_CCFLAGS += -fPIC ;
316	HOST_PIC_C++FLAGS += -fPIC ;
317}
318
319if $(HOST_GCC_VERSION[1]) >= 3 {
320	HOST_GCC_BASE_FLAGS += -fno-strict-aliasing -fno-tree-vrp ;
321}
322
323HOST_KERNEL_CCFLAGS += $(HOST_GCC_BASE_FLAGS) -finline -fno-builtin
324	-D_KERNEL_MODE ;
325HOST_KERNEL_C++FLAGS += $(HOST_GCC_BASE_FLAGS) -finline -fno-builtin
326	-fno-exceptions -D_KERNEL_MODE ;
327HOST_KERNEL_DEFINES += _KERNEL_MODE ;
328
329HOST_KERNEL_PIC_CCFLAGS = -fno-pic ;
330HOST_KERNEL_PIC_LINKFLAGS = ;
331if $(HOST_ARCH) = ppc {
332	# Build a position independent PPC kernel. We need to be able to relocate
333	# the kernel, since the virtual address space layout at boot time is not
334	# fixed.
335	HOST_KERNEL_PIC_CCFLAGS = -fPIE ;
336	HOST_KERNEL_PIC_LINKFLAGS = -shared -fPIE ;
337}
338if $(HOST_ARCH) = m68k {
339	# Build a position independent M68K kernel. We need to be able to relocate
340	# the kernel, since the virtual address space layout at boot time is not
341	# fixed.
342	HOST_KERNEL_PIC_CCFLAGS = $(HAIKU_KERNEL_PIC_CCFLAGS) ;
343	HOST_KERNEL_PIC_LINKFLAGS = $(HAIKU_KERNEL_PIC_LINKFLAGS) ;
344}
345
346if $(HOST_PLATFORM) != darwin {
347	# fix for new changes to DSO linking policies
348	HOST_LINKFLAGS += -Xlinker --no-as-needed ;
349}
350
351
352# warning flags
353HOST_WARNING_CCFLAGS = -Wall -Wno-trigraphs -Wmissing-prototypes -Wpointer-arith
354	-Wcast-align -Wsign-compare ;
355HOST_WARNING_C++FLAGS = -Wall -Wno-trigraphs -Wno-ctor-dtor-privacy
356	-Woverloaded-virtual -Wpointer-arith -Wcast-align -Wsign-compare ;
357
358HOST_KERNEL_WARNING_CCFLAGS = -Wall -Wno-trigraphs -Wmissing-prototypes ;
359HOST_KERNEL_WARNING_C++FLAGS = -Wall -Wno-trigraphs ;
360
361# debug flags
362local hostDebugFlags ;
363switch $(HOST_PLATFORM) {
364	case haiku		: hostDebugFlags ?= -ggdb ;
365	case haiku_host	: hostDebugFlags ?= -ggdb ;
366	case linux		: hostDebugFlags ?= -ggdb ;
367	case freebsd	: hostDebugFlags ?= -ggdb ;
368	case darwin		: hostDebugFlags ?= -ggdb ;
369	case *			: hostDebugFlags ?= -g ;
370}
371
372# debug 0: suppress asserts
373HOST_DEBUG_0_CCFLAGS = [ FDefines NDEBUG=$(NDEBUG) ] ;
374HOST_DEBUG_0_C++FLAGS = [ FDefines NDEBUG=$(NDEBUG) ] ;
375
376HOST_KERNEL_DEBUG_0_CCFLAGS = [ FDefines NDEBUG=$(NDEBUG) ] ;
377HOST_KERNEL_DEBUG_0_C++FLAGS = [ FDefines NDEBUG=$(NDEBUG) ] ;
378
379local level ;
380for level in $(HAIKU_DEBUG_LEVELS[2-]) {
381	local flags = $(hostDebugFlags) [ FDefines DEBUG=$(level) ] ;
382	HOST_DEBUG_$(level)_CCFLAGS			= $(flags) ;
383	HOST_DEBUG_$(level)_C++FLAGS		= $(flags) ;
384	HOST_KERNEL_DEBUG_$(level)_CCFLAGS	= $(flags) ;
385	HOST_KERNEL_DEBUG_$(level)_C++FLAGS	= $(flags) ;
386}
387
388# ld flags
389if $(HAIKU_HOST_USE_32BIT) = 1 {
390	HOST_LDFLAGS += -melf_i386 ;
391}
392
393# private kernel headers do be used when compiling kernel code
394HOST_PRIVATE_KERNEL_HEADERS = ;
395
396# private shared kernel/libroot headers
397HOST_PRIVATE_SYSTEM_HEADERS = ;
398
399# under BeOS use copyattr instead of cp
400if $(HOST_PLATFORM_BEOS_COMPATIBLE)
401{
402	CP = copyattr --data ;
403}
404
405HOST_DEFINES += ARCH_$(HOST_CPU) ;
406HOST_DEFINES += _NO_INLINE_ASM ;
407
408# for builds of tools in the current environment
409HOST_BUILD_COMPATIBILITY_LIB_DIR = [ FDirName $(HOST_OBJECT_BASE_DIR) lib ] ;
410
411# For the generic attributes emulation: Target rm_attrs -- rm replacement that
412# also removes the attributes.
413HOST_RM_ATTRS_TARGET = ;
414
415if $(HOST_PLATFORM_BEOS_COMPATIBLE) {
416	# the C++ standard and support libraries
417	if $(HOST_GCC_VERSION[1]) < 3 {
418		HOST_LIBSTDC++ = stdc++.r4 ;
419		HOST_LIBSUPC++ = ;
420	} else {
421		HOST_LIBSTDC++ = stdc++ ;
422		HOST_LIBSUPC++ = supc++ ;
423	}
424
425	HOST_LIBROOT = root ;
426	HOST_STATIC_LIBROOT = $(HOST_LIBROOT) ;
427	HOST_LIBBE = libbe_build.so ;
428	HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR
429		= "export LIBRARY_PATH=$LIBRARY_PATH:$(HOST_BUILD_COMPATIBILITY_LIB_DIR)" ;
430	HOST_PTHREAD_LINKFLAGS = ;
431	HOST_LIBRARY_NAME_MAP_input_server = /system/servers/input_server ;
432	HOST_DEFINES += __STDC_FORMAT_MACROS __STDC_LIMIT_MACROS ;
433
434	local compatibilityHeader = -include [ FDirName $(HAIKU_TOP) headers build
435		HaikuBuildCompatibility.h ] ;
436	HOST_CCFLAGS += $(compatibilityHeader) ;
437	HOST_C++FLAGS += $(compatibilityHeader) ;
438
439	# compatibility library
440	HOST_HAIKU_COMPATIBILITY_LIBS = libhaikucompat.a ;
441} else {
442	HOST_LINKFLAGS += -lm ;
443	HOST_LIBSTDC++ = stdc++ ;
444	HOST_LIBROOT = libroot_build_function_remapper.a libroot_build.so ;
445	HOST_STATIC_LIBROOT = libroot_build_function_remapper.a libroot_build.a ;
446	HOST_LIBBE = libbe_build.so ;
447	if $(HOST_PLATFORM) = cygwin {
448		HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR
449			= "export PATH=$PATH:$(HOST_BUILD_COMPATIBILITY_LIB_DIR)" ;
450	} else if $(HOST_PLATFORM) = darwin {
451		HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR
452			= "export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$(HOST_BUILD_COMPATIBILITY_LIB_DIR)" ;
453	} else {
454		HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR
455			= "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(HOST_BUILD_COMPATIBILITY_LIB_DIR)" ;
456	}
457
458	if $(HOST_PLATFORM) = cygwin {
459		# not needed
460		HOST_PTHREAD_LINKFLAGS = ;
461	} else if $(HOST_PLATFORM) = freebsd {
462		HOST_PTHREAD_LINKFLAGS = -pthread ;
463	} else {
464		HOST_PTHREAD_LINKFLAGS = -pthread ;
465	}
466
467	# the C++ support library
468	if $(HOST_GCC_VERSION[1]) < 3 {
469		HOST_LIBSUPC++ = ;
470	} else {
471		HOST_LIBSUPC++ = supc++ ;
472	}
473
474	if $(HOST_PLATFORM) = darwin {
475		# part of the C++ runtime lives in libstdc++ on Darwin
476		HOST_LIBSUPC++ = gcc_s.1 stdc++ ;
477		HOST_LIBSTDC++ = ;
478	} else if $(HOST_PLATFORM) = freebsd {
479		if $(HOST_CPU) = x86_64 {
480			# amd64 FreeBSD 8 doesn't come without a shared libsupc++, and the
481			# static one prevents us from building shared libraries. So we have
482			# to work around by using the shared libstdc++.
483			HOST_LIBSUPC++ = stdc++ ;
484			HOST_LIBSTDC++ = ;
485		}
486	}
487
488	# Unlike glibc FreeBSD's libc doesn't have built-in regex support.
489	if $(HOST_PLATFORM) = freebsd {
490		HOST_LIBROOT += /usr/lib/libgnuregex.so ;
491		HOST_STATIC_LIBROOT += /usr/lib/libgnuregex.so ;
492	} else if $(HOST_PLATFORM) = darwin {
493		HOST_LIBROOT += /opt/local/lib/libgnuregex.dylib ;
494		HOST_STATIC_LIBROOT += /opt/local/lib/libgnuregex.dylib ;
495	}
496
497	# The BeOS compilers define __INTEL__ respectively __POWERPC__. On the
498	# build platform we need to make sure, this is also defined.
499	if $(HOST_CPU) = x86 {
500		HOST_DEFINES += __INTEL__ ;
501	} else if $(HOST_CPU) = x86_64 {
502		HOST_DEFINES += __x86_64__ ;
503	} else if $(HOST_CPU) = ppc {
504		HOST_DEFINES += __POWERPC__ ;
505	} else if $(HOST_CPU) = m68k {
506		HOST_DEFINES += __M68K__ ;
507	} else if $(HOST_CPU) = mipsel {
508		HOST_DEFINES += __MIPSEL__ ;
509	}
510
511	# Supposing this is a glibc platform, let's try to get features like large
512	# file support, ISO C 99 definitions, etc. On some platforms we need to
513	# request 64 bit off_t support explicitely.
514	HOST_DEFINES += _GNU_SOURCE _FILE_OFFSET_BITS=64 __STDC_FORMAT_MACROS
515		__STDC_LIMIT_MACROS ;
516
517	# On Linux with xattr support we can use it for our attribute emulation,
518	# which is somewhat more robust.
519	if $(HAIKU_HOST_USE_XATTR) = 1 {
520		HOST_DEFINES += HAIKU_HOST_USE_XATTR ;
521	} else {
522		# Otherwise the generic attribute emulation is used, which uses a
523		# directory per file to store its attribute. We need to redefine RM so
524		# that the attributes are removed as well. We use a wrapper script,
525		# which invokes a build tool. If the build tool hasn't been built yet,
526		# the normal "rm" is used and the attributes are leaked (likely there
527		# aren't any yet).
528		RM = $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR) ";"
529			[ FDirName $(HAIKU_TOP) build scripts rm_attrs ]
530			[ FDirName $(HAIKU_OBJECT_DIR) $(HOST_PLATFORM) $(HOST_ARCH) release
531				tools rm_attrs ] -f ;
532			# assumes that rm_attrs is built with debugging disabled
533		HOST_RM_ATTRS_TARGET = <build>rm_attrs ;
534
535		# If specified, use xattr support to tag files with unique IDs.
536		if $(HAIKU_HOST_USE_XATTR_REF) = 1 {
537			HOST_DEFINES += HAIKU_HOST_USE_XATTR_REF ;
538		}
539	}
540}
541
542# network libraries
543if $(HOST_PLATFORM_HAIKU_COMPATIBLE) {
544	HOST_NETWORK_LIBS = network ;
545	HOST_NETAPI_LIB = bnetapi ;
546	HOST_SELECT_UNAME_ETC_LIB = ;	# libroot
547} else if $(HOST_PLATFORM_BONE_COMPATIBLE) {
548	HOST_NETWORK_LIBS = socket bind ;
549	HOST_NETAPI_LIB = bnetapi ;
550	HOST_SELECT_UNAME_ETC_LIB = ;	# libroot
551} else if $(HOST_PLATFORM_BEOS_COMPATIBLE) {
552	HOST_NETWORK_LIBS = net ;
553	HOST_NETAPI_LIB = netapi ;
554	HOST_SELECT_UNAME_ETC_LIB = net ;
555} else if $(HOST_PLATFORM) = "sunos" {
556	HOST_NETWORK_LIBS = xnet ;
557	HOST_NETAPI_LIB = ;
558	HOST_SELECT_UNAME_ETC_LIB = ;
559} else {
560	# Linux,...
561	HOST_NETWORK_LIBS = ;
562	HOST_NETAPI_LIB = ;
563	HOST_SELECT_UNAME_ETC_LIB = ;
564}
565
566# define the executable MIME type
567HOST_EXECUTABLE_MIME_TYPE = "application/x-vnd.Be-elfexecutable" ;
568
569if $(METROWERKS) {
570	# at least parts of Haiku still can be compiled with
571	# the Metrowerks compiler on BeOS/PPC
572	HOST_EXECUTABLE_MIME_TYPE = "application/x-be-executable" ;
573}
574
575# Be API compatibility
576HOST_BE_API_HEADERS = ;
577HOST_BE_API_CCFLAGS = ;
578HOST_BE_API_C++FLAGS = ;
579
580# Add directory with system headers we need when building something for the host
581# platform, e.g. containing missing POSIX/GNU headers.
582HOST_HDRS += [ FDirName $(HAIKU_TOP) headers build host $(HOST_PLATFORM) ] ;
583
584if $(HOST_PLATFORM) = freebsd {
585	# FreeBSD's gcc doesn't include /usr/local/* in its search paths,
586	# though that's where most things from ports wind up being installed.
587	HOST_HDRS += /usr/local/include ;
588	HOST_LINKFLAGS += -L/usr/local/lib ;
589}
590
591HOST_BE_API_HEADERS =
592	[ FDirName $(HAIKU_TOP) headers build ]
593	[ FDirName $(HAIKU_TOP) headers build os ]
594	[ FDirName $(HAIKU_TOP) headers build os app ]
595	[ FDirName $(HAIKU_TOP) headers build os drivers ]
596	[ FDirName $(HAIKU_TOP) headers build os kernel ]
597	[ FDirName $(HAIKU_TOP) headers build os interface ]
598	[ FDirName $(HAIKU_TOP) headers build os locale ]
599	[ FDirName $(HAIKU_TOP) headers build os opengl ]
600	[ FDirName $(HAIKU_TOP) headers build os storage ]
601	[ FDirName $(HAIKU_TOP) headers build os support ]
602	[ FDirName $(HAIKU_TOP) headers build private ]
603;
604if ! $(HOST_PLATFORM_BEOS_COMPATIBLE) {
605	HOST_BE_API_CCFLAGS = -include BeOSBuildCompatibility.h ;
606	HOST_BE_API_C++FLAGS = $(HOST_BE_API_CCFLAGS) ;
607}
608
609
610#pragma mark - target platform settings
611
612
613# check the target platform compatibility
614SetPlatformCompatibilityFlagVariables TARGET_PLATFORM : TARGET : target ;
615
616# check the compatibility between host and target platform
617if $(TARGET_PLATFORM) != haiku {
618	if ! $(HOST_PLATFORM_($(TARGET_PLATFORM))_COMPATIBLE) {
619		Exit ERROR: The host platform is not compatible with target platform
620			$(TARGET_PLATFORM). ;
621	}
622}
623
624# Set TARGET_* variables either from HAIKU_* or HOST_* depending on the
625# specified TARGET_PLATFORM. Some variables are package architecture dependent
626# and their name gets a respective suffix. A few variables exist both with and
627# without suffix. The latter is either equivalent to the variable with the
628# primary architecture suffix (e.g. TARGET_ARCH) or is (additionally) applicable
629# for all architectures (e.g. TARGET_DEFINES).
630
631local buildVars =
632	ARCH ARCHS KERNEL_ARCH PACKAGING_ARCH PACKAGING_ARCHS
633
634	DEFINES
635	KERNEL_DEFINES
636
637	KERNEL_CCFLAGS KERNEL_C++FLAGS
638	KERNEL_PIC_CCFLAGS KERNEL_PIC_LINKFLAGS KERNEL_ADDON_LINKFLAGS
639	BOOT_CCFLAGS BOOT_C++FLAGS BOOT_LINKFLAGS
640
641	KERNEL_WARNING_CCFLAGS KERNEL_WARNING_C++FLAGS
642
643	KERNEL_DEBUG_$(HAIKU_DEBUG_LEVELS)_CCFLAGS
644	KERNEL_DEBUG_$(HAIKU_DEBUG_LEVELS)_C++FLAGS
645
646	PRIVATE_KERNEL_HEADERS
647
648	LIBSTDC++ LIBSUPC++
649
650	NETWORK_LIBS NETAPI_LIB SELECT_UNAME_ETC_LIB
651
652	EXECUTABLE_MIME_TYPE
653
654	OBJECT_BASE_DIR COMMON_ARCH_OBJECT_DIR
655	;
656
657local archDependentBuildVars =
658	ARCH CPU GCC_VERSION
659
660	AR CC C++ ELFEDIT LD OBJCOPY RANLIB STRIP
661
662	ARFLAGS ASFLAGS UNARFLAGS CPPFLAGS CCFLAGS C++FLAGS HDRS LDFLAGS
663	LINK LINKFLAGS
664
665	WARNING_CCFLAGS WARNING_C++FLAGS
666
667	DEBUG_$(HAIKU_DEBUG_LEVELS)_CCFLAGS DEBUG_$(HAIKU_DEBUG_LEVELS)_C++FLAGS
668
669	INCLUDES_SEPARATOR LOCAL_INCLUDES_OPTION SYSTEM_INCLUDES_OPTION
670
671	PRIVATE_SYSTEM_HEADERS
672
673	LIBSTDC++ LIBSUPC++
674
675	ARCH_OBJECT_DIR COMMON_DEBUG_OBJECT_DIR
676	DEBUG_$(HAIKU_DEBUG_LEVELS)_OBJECT_DIR
677	;
678
679if $(TARGET_PLATFORM) = haiku {
680	local var ;
681	for var in $(buildVars) {
682		TARGET_$(var) = $(HAIKU_$(var)) ;
683	}
684
685	for var in $(archDependentBuildVars)_$(TARGET_PACKAGING_ARCHS) {
686		TARGET_$(var) = $(HAIKU_$(var)) ;
687	}
688
689	TARGET_KERNEL_LIBGCC
690		= $(HAIKU_KERNEL_LIBGCC_$(TARGET_PACKAGING_ARCH)) ;
691	TARGET_KERNEL_LIBSUPC++
692		= $(HAIKU_KERNEL_LIBSUPC++_$(TARGET_PACKAGING_ARCH)) ;
693	TARGET_BOOT_LIBGCC
694		= $(HAIKU_BOOT_LIBGCC_$(TARGET_PACKAGING_ARCH)) ;
695	TARGET_BOOT_LIBSUPC++
696		= $(HAIKU_BOOT_LIBSUPC++_$(TARGET_PACKAGING_ARCH)) ;
697
698	TARGET_BOOT_PLATFORM		?= $(HAIKU_BOOT_PLATFORM) ;
699	TARGET_BOOT_BOARD			?= $(HAIKU_BOOT_BOARD) ;
700
701	local architecture ;
702	for architecture in $(TARGET_PACKAGING_ARCHS) {
703		TARGET_DEFINES_$(architecture) = $(HAIKU_DEFINES_$(architecture)) ;
704		TARGET_LIBRARY_NAME_MAP_$(architecture)
705			= HAIKU_LIBRARY_NAME_MAP_$(architecture) ;
706	}
707} else {
708	local var ;
709	for var in $(buildVars) {
710		TARGET_$(var) = $(HOST_$(var)) ;
711	}
712
713	for var in $(archDependentBuildVars) {
714		TARGET_$(var)_$(TARGET_PACKAGING_ARCH) = $(HOST_$(var)) ;
715	}
716
717	TARGET_KERNEL_LIBGCC		= ;
718	TARGET_KERNEL_LIBSUPC++		= ;
719	TARGET_BOOT_LIBGCC			= ;
720	TARGET_BOOT_LIBSUPC++		= ;
721
722	TARGET_BOOT_PLATFORM		= ;
723	TARGET_BOOT_BOARD			= ;
724
725	TARGET_DEFINES_$(TARGET_PACKAGING_ARCH) = ;
726		# all flags are in TARGET_DEFINES
727
728	TARGET_LIBRARY_NAME_MAP_$(TARGET_PACKAGING_ARCH) = HOST_LIBRARY_NAME_MAP ;
729}
730
731# define macro, for identifying the platform
732switch $(TARGET_PLATFORM) {
733	case r5			: TARGET_DEFINES	+= HAIKU_TARGET_PLATFORM_BEOS ;
734	case bone		: TARGET_DEFINES	+= HAIKU_TARGET_PLATFORM_BONE ;
735	case dano		: TARGET_DEFINES	+= HAIKU_TARGET_PLATFORM_DANO ;
736	case haiku_host	: TARGET_DEFINES	+= HAIKU_TARGET_PLATFORM_HAIKU ;
737	case haiku		: TARGET_DEFINES	+= HAIKU_TARGET_PLATFORM_HAIKU ;
738	case linux		: TARGET_DEFINES	+= HAIKU_TARGET_PLATFORM_LINUX ;
739	case freebsd	: TARGET_DEFINES	+= HAIKU_TARGET_PLATFORM_FREEBSD ;
740	case darwin		: TARGET_DEFINES	+= HAIKU_TARGET_PLATFORM_DARWIN ;
741	case cygwin		: TARGET_DEFINES	+= HAIKU_TARGET_PLATFORM_CYGWIN ;
742	case sunos		: TARGET_DEFINES	+= HAIKU_TARGET_PLATFORM_SUNOS ;
743	case libbe_test	: TARGET_DEFINES	+= HAIKU_TARGET_PLATFORM_LIBBE_TEST ;
744}
745
746# define macro, for identifying the host platform
747switch $(HOST_PLATFORM) {
748	case r5			: HOST_DEFINES	+= HAIKU_HOST_PLATFORM_BEOS ;
749	case bone		: HOST_DEFINES	+= HAIKU_HOST_PLATFORM_BONE ;
750	case dano		: HOST_DEFINES	+= HAIKU_HOST_PLATFORM_DANO ;
751	case haiku_host	: HOST_DEFINES	+= HAIKU_HOST_PLATFORM_HAIKU ;
752	case linux		: HOST_DEFINES	+= HAIKU_HOST_PLATFORM_LINUX ;
753	case freebsd	: HOST_DEFINES	+= HAIKU_HOST_PLATFORM_FREEBSD ;
754	case darwin		: HOST_DEFINES	+= HAIKU_HOST_PLATFORM_DARWIN ;
755	case cygwin		: HOST_DEFINES	+= HAIKU_HOST_PLATFORM_CYGWIN ;
756	case sunos		: HOST_DEFINES	+= HAIKU_HOST_PLATFORM_SUNOS ;
757}
758
759# define host platform 64 bit macro
760if $(HOST_PLATFORM_IS_64_BIT) {
761	HOST_DEFINES += HAIKU_HOST_PLATFORM_64_BIT ;
762}
763
764# define Haiku packaging architecture macro for host build
765HOST_DEFINES += HAIKU_PACKAGING_ARCH=\\\"$(HAIKU_PACKAGING_ARCH)\\\" ;
766
767
768#pragma mark -
769
770# In case we build for a BeOS compatible platform, but not for Haiku, we
771# include the HaikuBuildCompatibility.h header and link against
772# libhaikucompat.a.
773
774if ! $(TARGET_PLATFORM_HAIKU_COMPATIBLE) && $(TARGET_PLATFORM_BEOS_COMPATIBLE) {
775	# headers and flags
776	local compatibilityHeader = -include [ FDirName $(HAIKU_TOP) headers build
777		HaikuBuildCompatibility.h ] ;
778	TARGET_CCFLAGS_$(TARGET_PACKAGING_ARCH) += $(compatibilityHeader) ;
779	TARGET_C++FLAGS_$(TARGET_PACKAGING_ARCH) += $(compatibilityHeader) ;
780
781	# compatibility library
782	TARGET_HAIKU_COMPATIBILITY_LIBS = libhaikucompat.a ;
783}
784
785# special target libbe_test
786
787if $(TARGET_PLATFORM) = libbe_test {
788	# headers and flags
789	TARGET_HDRS_$(TARGET_PACKAGING_ARCH) +=
790		[ PublicHeaders $(DOT) app drivers game interface kernel locale storage
791			support ]
792		[ PrivateHeaders $(DOT) ] ;
793	TARGET_DEFINES += __HAIKU__ ;
794
795	TARGET_PRIVATE_SYSTEM_HEADERS_$(TARGET_PACKAGING_ARCH) =
796		[ PrivateHeaders $(DOT) system system/arch/$(TARGET_ARCH) ] ;
797
798	# directories
799	TARGET_OBJECT_BASE_DIR
800		= [ FDirName $(HAIKU_OBJECT_DIR) $(TARGET_PLATFORM) ] ;
801	TARGET_COMMON_ARCH_OBJECT_DIR
802		= [ FDirName $(TARGET_OBJECT_BASE_DIR) common ] ;
803	TARGET_ARCH_OBJECT_DIR_$(TARGET_PACKAGING_ARCH)
804		= [ FDirName $(TARGET_OBJECT_BASE_DIR) $(TARGET_ARCH) ] ;
805	TARGET_COMMON_DEBUG_OBJECT_DIR_$(TARGET_PACKAGING_ARCH)
806		= [ FDirName $(TARGET_ARCH_OBJECT_DIR_$(TARGET_PACKAGING_ARCH))
807			common ] ;
808	TARGET_DEBUG_0_OBJECT_DIR_$(TARGET_PACKAGING_ARCH)
809		= [ FDirName $(TARGET_ARCH_OBJECT_DIR_$(TARGET_PACKAGING_ARCH))
810			release ] ;
811
812	local level ;
813	for level in $(HAIKU_DEBUG_LEVELS[2-]) {
814		TARGET_DEBUG_$(level)_OBJECT_DIR_$(TARGET_PACKAGING_ARCH)
815			= [ FDirName $(TARGET_ARCH_OBJECT_DIR_$(TARGET_PACKAGING_ARCH))
816				debug_$(level) ] ;
817	}
818
819	# library name map
820	TARGET_LIBRARY_NAME_MAP_$(TARGET_PACKAGING_ARCH) = LIBBE_LIBRARY_NAME_MAP ;
821	LIBBE_LIBRARY_NAME_MAP_be = libbe_test.so ;
822}
823
824
825#pragma mark - common stuff
826
827
828# start with a clean state
829CCFLAGS = ;
830C++FLAGS = ;
831DEFINES = ;
832
833# Set CC, C++, LINK to invalid values, so that we realize early, that we use
834# the wrong compiler.
835CC = bad-cc ;
836C++ = bad-c++ ;
837LINK = bad-link ;
838
839
840# Defaults for warnings, optimization, and debugging.
841#
842WARNINGS ?= 1 ;
843OPTIM ?= -O2 ;
844DEBUG ?= 0 ;
845
846
847# Set the defaults for PLATFORM and SUPPORTED_PLATFORMS. PLATFORM is only
848# overridden for targets to be built for the host platform. SUPPORTED_PLATFORMS
849# can be overridden by the author of a component.
850PLATFORM = $(TARGET_PLATFORM) ;
851SUPPORTED_PLATFORMS = haiku ;
852
853
854# Instructs the Library rule to not make its object files temporary.
855# This is needed as some objects are used in a static library and for an
856# executable.
857KEEPOBJS = true ;
858
859
860# Set permissions to how they should be on the image.
861EXEMODE		= 755 ;
862FILEMODE	= 644 ;
863SHELLMODE	= 755 ;
864
865
866# output directories
867# TODO: Review this.
868HAIKU_DOCUMENTATION_DIR ?= [ FDirName $(HAIKU_OUTPUT_DIR) documentation ] ;
869HAIKU_DOCUMENTATION_OBJECT_DIR ?= [ FDirName $(HAIKU_COMMON_PLATFORM_OBJECT_DIR)
870	documentation ] ;
871
872# TODO: Rethink test stuff.
873HAIKU_TEST_DIR			?= [ FDirName $(HAIKU_OUTPUT_DIR) tests
874	$(TARGET_PLATFORM) $(HAIKU_ARCH) ] ;
875HAIKU_APP_TEST_DIR		?= [ FDirName $(HAIKU_TEST_DIR) apps ] ;
876HAIKU_APP_TEST_LIB_DIR 	?= [ FDirName $(HAIKU_APP_TEST_DIR) lib ] ;
877HAIKU_TMP_DIR			?= [ FDirName $(HAIKU_OUTPUT_DIR) tmp ] ;
878
879local architecture ;
880for architecture in $(HAIKU_PACKAGING_ARCHS) {
881	local baseDir
882		= [ FDirName $(TARGET_OBJECT_BASE_DIR) $(architecture) packaging ] ;
883	HAIKU_PACKAGES_DIR_$(architecture) = [ FDirName $(baseDir) packages ] ;
884	HAIKU_PACKAGES_BUILD_DIR_$(architecture)
885		= [ FDirName $(baseDir) packages_build ] ;
886	HAIKU_PACKAGE_REPOSITORIES_DIR_$(architecture)
887		= [ FDirName $(baseDir) repositories ] ;
888}
889
890
891HAIKU_PACKAGE_INFOS_DIR			= [ FDirName $(HAIKU_TOP) src data
892									package_infos ] ;
893
894TARGET_TEST_DIR				?= [ FDirName $(HAIKU_TEST_DIR)
895									$(TARGET_PLATFORM) ] ;
896TARGET_UNIT_TEST_DIR		?= [ FDirName $(TARGET_TEST_DIR) unittests ] ;
897TARGET_UNIT_TEST_LIB_DIR	?= [ FDirName $(TARGET_UNIT_TEST_DIR) lib ] ;
898
899# automatically setup the objects directory per subdirectory
900SUBDIRRULES += SetupObjectsDir ;
901
902# Add the standard (userland) warning flags variables to the ones restored in
903# every subdirectory. Thus we can easily meddle with them in subdirectories
904# with imported sources.
905AUTO_SET_UP_CONFIG_VARIABLES +=
906	HOST_WARNING_CCFLAGS HOST_WARNING_C++FLAGS
907	TARGET_WARNING_CCFLAGS_$(TARGET_PACKAGING_ARCHS)
908	TARGET_WARNING_C++FLAGS_$(TARGET_PACKAGING_ARCHS)
909	;
910
911# also add PLATFORM and SUPPORTED_PLATFORMS
912AUTO_SET_UP_CONFIG_VARIABLES += PLATFORM SUPPORTED_PLATFORMS ;
913
914
915# set up warnings
916local architecture ;
917for architecture in $(TARGET_PACKAGING_ARCHS) {
918	ArchitectureSetupWarnings $(architecture) ;
919}
920
921
922# set up architecture build features
923local architecture ;
924for architecture in $(TARGET_PACKAGING_ARCHS) {
925	InitArchitectureBuildFeatures $(architecture) ;
926}
927
928
929# The following directories cannot currently be compiled with DEBUG=1
930SetConfigVar DEBUG : HAIKU_TOP src add-ons disk_systems bfs : 0 : local ;
931SetConfigVar DEBUG : HAIKU_TOP src add-ons kernel drivers audio hda : 0 : local ;
932SetConfigVar DEBUG : HAIKU_TOP src add-ons kernel drivers audio ac97 auich : 0 : local ; # fails with gcc4 only
933SetConfigVar DEBUG : HAIKU_TOP src add-ons kernel drivers audio ac97 auvia : 0 : local ; # fails with gcc4 only
934SetConfigVar DEBUG : HAIKU_TOP src add-ons kernel drivers audio ac97 sis7018 : 0 : local ;
935SetConfigVar DEBUG : HAIKU_TOP src add-ons kernel file_systems btrfs : 0 : local ;
936SetConfigVar DEBUG : HAIKU_TOP src add-ons kernel file_systems ntfs libntfs : 0 : local ;
937SetConfigVar DEBUG : HAIKU_TOP src add-ons kernel file_systems udf : 0 : local ;
938SetConfigVar DEBUG : HAIKU_TOP src add-ons media media-add-ons dvb : 0 : local ;
939SetConfigVar DEBUG : HAIKU_TOP src add-ons print drivers gutenprint : 0 : local ;
940SetConfigVar DEBUG : HAIKU_TOP src servers input : 0 : local ;
941SetConfigVar DEBUG : HAIKU_TOP src servers media_addon : 0 : local ;
942SetConfigVar DEBUG : HAIKU_TOP src system boot loader file_systems bfs : 0 : local ;
943