]> git.saurik.com Git - apple/xnu.git/blame - makedefs/MakeInc.def
xnu-2422.110.17.tar.gz
[apple/xnu.git] / makedefs / MakeInc.def
CommitLineData
39236c6e 1# -*- mode: makefile;-*-
1c79356b 2#
39236c6e 3# Copyright (C) 1999-2012 Apple Inc. All rights reserved.
1c79356b 4#
39236c6e
A
5# MakeInc.def contains global definitions for building,
6# linking, and installing files.
1c79356b 7#
1c79356b 8
6d2010ae 9#
39236c6e 10# Architecture Configuration options
6d2010ae 11#
39236c6e 12SUPPORTED_ARCH_CONFIGS := X86_64
6d2010ae 13
2d21ac55 14#
1c79356b
A
15# Kernel Configuration options
16#
39236c6e 17SUPPORTED_KERNEL_CONFIGS = RELEASE DEVELOPMENT DEBUG PROFILE
2d21ac55 18
316670eb
A
19#
20# Machine Configuration options
21#
39236c6e
A
22
23SUPPORTED_X86_64_MACHINE_CONFIGS = NONE
6d2010ae 24
6d2010ae 25
2d21ac55 26#
39236c6e 27# Platform options
2d21ac55 28#
39236c6e 29SUPPORTED_PLATFORMS = MacOSX iPhoneOS iPhoneSimulator
2d21ac55 30
6d2010ae 31#
39236c6e 32# Setup up *_LC variables during recursive invocations
6d2010ae 33#
6d2010ae 34
39236c6e
A
35ifndef CURRENT_ARCH_CONFIG_LC
36 export CURRENT_ARCH_CONFIG_LC := $(shell printf "%s" "$(CURRENT_ARCH_CONFIG)" | $(TR) A-Z a-z)
6d2010ae
A
37endif
38
39236c6e
A
39ifndef CURRENT_KERNEL_CONFIG_LC
40 export CURRENT_KERNEL_CONFIG_LC := $(shell printf "%s" "$(CURRENT_KERNEL_CONFIG)" | $(TR) A-Z a-z)
316670eb 41endif
6d2010ae 42
39236c6e
A
43ifndef CURRENT_MACHINE_CONFIG_LC
44 export CURRENT_MACHINE_CONFIG_LC := $(shell printf "%s" "$(CURRENT_MACHINE_CONFIG)" | $(TR) A-Z a-z)
6d2010ae
A
45endif
46
39236c6e 47
2d21ac55 48#
39236c6e 49# Component List
2d21ac55 50#
39236c6e
A
51COMPONENT_LIST = osfmk bsd libkern iokit pexpert libsa security
52COMPONENT = $(if $(word 2,$(subst /, ,$(RELATIVE_SOURCE_PATH))),$(word 2,$(subst /, ,$(RELATIVE_SOURCE_PATH))),$(firstword $(subst /, ,$(RELATIVE_SOURCE_PATH))))
53COMPONENT_IMPORT_LIST = $(filter-out $(COMPONENT),$(COMPONENT_LIST))
1c79356b 54
1c79356b 55
316670eb
A
56#
57# Deployment target flag
58#
316670eb 59ifeq ($(PLATFORM),MacOSX)
39236c6e 60 DEPLOYMENT_TARGET_FLAGS = -mmacosx-version-min=$(SDKVERSION)
316670eb 61else ifeq ($(PLATFORM),iPhoneOS)
39236c6e 62 DEPLOYMENT_TARGET_FLAGS = -miphoneos-version-min=$(SDKVERSION)
316670eb 63else ifeq ($(PLATFORM),iPhoneSimulator)
39236c6e 64 DEPLOYMENT_TARGET_FLAGS =
316670eb 65else
39236c6e 66 DEPLOYMENT_TARGET_FLAGS =
316670eb
A
67endif
68
39236c6e 69
1c79356b
A
70#
71# Standard defines list
72#
39236c6e
A
73DEFINES = -DAPPLE -DKERNEL -DKERNEL_PRIVATE -DXNU_KERNEL_PRIVATE \
74 -DPRIVATE -D__MACHO__=1 -Dvolatile=__volatile $(IDENT) \
75 $(SEED_DEFINES)
1c79356b
A
76
77#
78# Compiler command
79#
39236c6e
A
80KCC = $(CC)
81KC++ = $(CXX)
9bccf70c 82
91447636
A
83#
84# Compiler warning flags
85#
86
87CWARNFLAGS_STD = \
6d2010ae
A
88 -Wall -Werror -Wno-format-y2k -Wextra -Wstrict-prototypes \
89 -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual \
90 -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wchar-subscripts \
91 -Winline -Wnested-externs -Wredundant-decls -Wextra-tokens
92
6d2010ae 93# Can be overridden in Makefile.template or Makefile.$arch
91447636
A
94export CWARNFLAGS ?= $(CWARNFLAGS_STD)
95
6d2010ae
A
96define add_perfile_cflags
97$(1)_CWARNFLAGS_ADD += $2
98endef
99
91447636 100CXXWARNFLAGS_STD = \
6d2010ae
A
101 -Wall -Werror -Wno-format-y2k -Wextra -Wpointer-arith -Wreturn-type \
102 -Wcast-qual -Wwrite-strings -Wswitch -Wcast-align -Wchar-subscripts \
103 -Wredundant-decls -Wextra-tokens
104
39236c6e
A
105# overloaded-virtual warnings are non-fatal (9000888)
106CXXWARNFLAGS_STD += -Wno-error=overloaded-virtual
91447636 107
6d2010ae 108# Can be overridden in Makefile.template or Makefile.$arch
91447636
A
109export CXXWARNFLAGS ?= $(CXXWARNFLAGS_STD)
110
6d2010ae
A
111define add_perfile_cxxflags
112$(1)_CXXWARNFLAGS_ADD += $2
113endef
9bccf70c 114
2d21ac55
A
115#
116# Default ARCH_FLAGS, for use with compiler/linker/assembler/mig drivers
117
b0d623f7 118ARCH_FLAGS_X86_64 = -arch x86_64
c910b4d9 119
2d21ac55 120
1c79356b
A
121#
122# Default CFLAGS
123#
124ifdef RC_CFLAGS
39236c6e 125OTHER_CFLAGS = $(subst $(addprefix -arch ,$(RC_ARCHS)),,$(RC_CFLAGS))
1c79356b
A
126endif
127
39236c6e
A
128#
129# Debug info
130#
131DSYMKERNELSYSDIR = mach_kernel.sys.dSYM
132DSYMINFODIR = Contents
133DSYMKGMACROSDIR = Contents/Resources
134DSYMLLDBMACROSDIR = Contents/Resources/Python
135DSYMDWARFDIR = Contents/Resources/DWARF
136
137DEBUG_CFLAGS := -gdwarf-2
138BUILD_DSYM := 1
2d21ac55
A
139
140#
141# We must not use -fno-keep-inline-functions, or it will remove the dtrace
142# probes from the kernel.
143#
39236c6e 144CFLAGS_GEN = $(DEBUG_CFLAGS) -nostdinc \
316670eb
A
145 -freorder-blocks -fno-builtin -fno-common \
146 -fsigned-bitfields $(OTHER_CFLAGS)
1c79356b 147
39236c6e
A
148CFLAGS_RELEASE =
149CFLAGS_DEVELOPMENT =
150CFLAGS_DEBUG =
151CFLAGS_PROFILE = -pg
1c79356b 152
39236c6e 153CFLAGS_X86_64 = -Dx86_64 -DX86_64 -D__X86_64__ -DLP64 \
316670eb 154 -DPAGE_SIZE_FIXED -mkernel -msoft-float \
39236c6e 155 -fno-limit-debug-info # Workaround for 11076603
316670eb 156
2d21ac55 157
39236c6e
A
158CFLAGS_RELEASEX86_64 = -O2
159CFLAGS_DEVELOPMENTX86_64 = -O2
b0d623f7 160# No space optimization for the DEBUG kernel for the benefit of gdb:
39236c6e
A
161CFLAGS_DEBUGX86_64 = -O0
162CFLAGS_PROFILEX86_64 = -O2
163
164CFLAGS_RELEASEARM = -O2
165CFLAGS_DEVELOPMENTARM = -O2
166CFLAGS_DEBUGARM = -O0
167CFLAGS_PROFILEARM = -O2
168
169CFLAGS = $(CFLAGS_GEN) \
170 $($(addsuffix $(CURRENT_MACHINE_CONFIG),MACHINE_FLAGS_$(CURRENT_ARCH_CONFIG)_)) \
171 $($(addsuffix $(CURRENT_ARCH_CONFIG),ARCH_FLAGS_)) \
172 $($(addsuffix $(CURRENT_ARCH_CONFIG),CFLAGS_)) \
173 $($(addsuffix $(CURRENT_KERNEL_CONFIG),CFLAGS_)) \
174 $($(addsuffix $(CURRENT_ARCH_CONFIG), $(addsuffix $(CURRENT_KERNEL_CONFIG),CFLAGS_))) \
316670eb 175 $(DEPLOYMENT_TARGET_FLAGS) \
1c79356b
A
176 $(DEFINES)
177
6d2010ae 178#
55e303ae 179# Default C++ flags
1c79356b 180#
6d2010ae
A
181
182OTHER_CXXFLAGS =
316670eb
A
183
184CXXFLAGS_GEN = -fapple-kext $(OTHER_CXXFLAGS)
1c79356b 185
39236c6e
A
186# For the moment, do not use gnu++11
187#CXXFLAGS_ARM = -std=gnu++11
188
55e303ae 189CXXFLAGS = $(CXXFLAGS_GEN) \
39236c6e
A
190 $($(addsuffix $(CURRENT_ARCH_CONFIG),CXXFLAGS_)) \
191 $($(addsuffix $(CURRENT_KERNEL_CONFIG),CXXFLAGS_))
192
1c79356b
A
193
194#
195# Assembler command
196#
0c530ab8
A
197AS = $(CC)
198S_KCC = $(CC)
1c79356b
A
199
200#
201# Default SFLAGS
202#
39236c6e 203SFLAGS_GEN = -D__ASSEMBLER__ $(OTHER_CFLAGS)
1c79356b 204
39236c6e
A
205SFLAGS_RELEASE =
206SFLAGS_DEVELOPMENT =
207SFLAGS_DEBUG =
208SFLAGS_PROFILE =
1c79356b 209
39236c6e 210SFLAGS_X86_64 = $(CFLAGS_X86_64)
1c79356b 211
39236c6e
A
212SFLAGS = $(SFLAGS_GEN) \
213 $($(addsuffix $(CURRENT_MACHINE_CONFIG),MACHINE_FLAGS_$(CURRENT_ARCH_CONFIG)_)) \
214 $($(addsuffix $(CURRENT_ARCH_CONFIG),ARCH_FLAGS_)) \
215 $($(addsuffix $(CURRENT_ARCH_CONFIG),SFLAGS_)) \
216 $($(addsuffix $(CURRENT_KERNEL_CONFIG),SFLAGS_)) \
316670eb 217 $(DEPLOYMENT_TARGET_FLAGS) \
1c79356b
A
218 $(DEFINES)
219
220#
221# Linker command
222#
0c530ab8 223LD = $(KC++) -nostdlib
1c79356b
A
224
225#
226# Default LDFLAGS
227#
39236c6e
A
228# Availability of DWARF allows DTrace CTF (compressed type format) to be constructed.
229# ctf_insert creates the CTF section. It needs reserved padding in the
230# headers for the load command segment and the CTF section structures.
231#
232LDFLAGS_KERNEL_GEN = \
6d2010ae 233 -nostdlib \
0c530ab8 234 -fapple-kext \
0c530ab8 235 -Wl,-e,__start \
0c530ab8
A
236 -Wl,-sectalign,__TEXT,__text,0x1000 \
237 -Wl,-sectalign,__DATA,__common,0x1000 \
238 -Wl,-sectalign,__DATA,__bss,0x1000 \
b0d623f7
A
239 -Wl,-sectcreate,__PRELINK_TEXT,__text,/dev/null \
240 -Wl,-sectcreate,__PRELINK_STATE,__kernel,/dev/null \
241 -Wl,-sectcreate,__PRELINK_STATE,__kexts,/dev/null \
316670eb
A
242 -Wl,-sectcreate,__PRELINK_INFO,__info,/dev/null \
243 -Wl,-new_linker \
244 -Wl,-pagezero_size,0x0 \
245 -Wl,-version_load_command \
39236c6e
A
246 -Wl,-function_starts \
247 -Wl,-headerpad,152
b0d623f7 248
39236c6e
A
249LDFLAGS_KERNEL_RELEASE =
250LDFLAGS_KERNEL_DEVELOPMENT =
251LDFLAGS_KERNEL_DEBUG =
252LDFLAGS_KERNEL_PROFILE =
b0d623f7 253
316670eb
A
254# KASLR static slide config:
255ifndef SLIDE
256SLIDE=0x00
257endif
39236c6e
A
258KERNEL_MIN_ADDRESS = 0xffffff8000000000
259KERNEL_BASE_OFFSET = 0x100000
260KERNEL_STATIC_SLIDE = $(shell printf "0x%016x" \
261 $$[ $(SLIDE) << 21 ])
262KERNEL_STATIC_BASE = $(shell printf "0x%016x" \
263 $$[ $(KERNEL_MIN_ADDRESS) + $(KERNEL_BASE_OFFSET) ])
264KERNEL_HIB_SECTION_BASE = $(shell printf "0x%016x" \
265 $$[ $(KERNEL_STATIC_BASE) + $(KERNEL_STATIC_SLIDE) ])
266KERNEL_TEXT_BASE = $(shell printf "0x%016x" \
267 $$[ $(KERNEL_HIB_SECTION_BASE) + 0x100000 ])
268
269LDFLAGS_KERNEL_RELEASEX86_64 = \
316670eb
A
270 -Wl,-pie \
271 -Wl,-segaddr,__HIB,$(KERNEL_HIB_SECTION_BASE) \
272 -Wl,-image_base,$(KERNEL_TEXT_BASE) \
273 -Wl,-seg_page_size,__TEXT,0x200000 \
274 -Wl,-sectalign,__DATA,__const,0x1000 \
275 -Wl,-sectalign,__DATA,__sysctl_set,0x1000 \
276 -Wl,-sectalign,__HIB,__bootPT,0x1000 \
277 -Wl,-sectalign,__HIB,__desc,0x1000 \
278 -Wl,-sectalign,__HIB,__data,0x1000 \
279 -Wl,-sectalign,__HIB,__text,0x1000 \
280 -Wl,-sectalign,__HIB,__const,0x1000 \
281 -Wl,-sectalign,__HIB,__bss,0x1000 \
282 -Wl,-sectalign,__HIB,__common,0x1000 \
39236c6e 283 $(LDFLAGS_NOSTRIP_FLAG)
316670eb
A
284
285# Define KERNEL_BASE_OFFSET so known at compile time:
39236c6e 286CFLAGS_X86_64 += -DKERNEL_BASE_OFFSET=$(KERNEL_BASE_OFFSET)
2d21ac55 287
39236c6e
A
288LDFLAGS_KERNEL_DEBUGX86_64 = $(LDFLAGS_KERNEL_RELEASEX86_64)
289LDFLAGS_KERNEL_DEVELOPMENTX86_64 = $(LDFLAGS_KERNEL_RELEASEX86_64)
290LDFLAGS_KERNEL_PROFILEX86_64 = $(LDFLAGS_KERNEL_RELEASEX86_64)
d1ecb069 291
d1ecb069 292
39236c6e
A
293LDFLAGS_KERNEL = $(LDFLAGS_KERNEL_GEN) \
294 $($(addsuffix $(CURRENT_ARCH_CONFIG),ARCH_FLAGS_)) \
295 $($(addsuffix $(CURRENT_ARCH_CONFIG),LDFLAGS_KERNEL_)) \
296 $($(addsuffix $(CURRENT_KERNEL_CONFIG),LDFLAGS_KERNEL_)) \
297 $($(addsuffix $(CURRENT_ARCH_CONFIG), $(addsuffix $(CURRENT_KERNEL_CONFIG),LDFLAGS_KERNEL_))) \
316670eb 298 $(DEPLOYMENT_TARGET_FLAGS)
1c79356b
A
299
300#
301# Default runtime libraries to be linked with the kernel
302#
39236c6e 303LD_KERNEL_LIBS = -lcc_kext
1c79356b 304
39236c6e
A
305#
306# DTrace support
307#
308ifeq ($(CURRENT_KERNEL_CONFIG),RELEASE)
309ifneq ($(filter ARM%,$(CURRENT_ARCH_CONFIG)),)
310DO_CTFCONVERT = 0
311DO_CTFMERGE = 0
312DO_CTFMACHO = 0
313else
314DO_CTFCONVERT = $(SUPPORTS_CTFCONVERT)
315DO_CTFMERGE = 1
316DO_CTFMACHO = $(NEEDS_CTF_MACHOS)
317endif
318else
319DO_CTFCONVERT = $(SUPPORTS_CTFCONVERT)
320DO_CTFMERGE = 1
321DO_CTFMACHO = $(NEEDS_CTF_MACHOS)
322endif
b0d623f7 323
1c79356b
A
324#
325# Default INCFLAGS
326#
39236c6e
A
327INCFLAGS_IMPORT = $(patsubst %, -I$(OBJROOT)/EXPORT_HDRS/%, $(COMPONENT_IMPORT_LIST))
328INCFLAGS_EXTERN = -I$(SRCROOT)/EXTERNAL_HEADERS
329INCFLAGS_GEN = -I$(SRCROOT)/$(COMPONENT) -I$(OBJROOT)/EXPORT_HDRS/$(COMPONENT)
330INCFLAGS_LOCAL = -I.
1c79356b 331
39236c6e 332INCFLAGS = $(INCFLAGS_LOCAL) $(INCFLAGS_GEN) $(INCFLAGS_IMPORT) $(INCFLAGS_EXTERN) $(INCFLAGS_MAKEFILE)
1c79356b
A
333
334#
335# Default MIGFLAGS
336#
39236c6e
A
337MIGFLAGS = $(DEFINES) $(INCFLAGS) $($(addsuffix $(CURRENT_ARCH_CONFIG),CFLAGS_)) $($(addsuffix $(CURRENT_ARCH_CONFIG),ARCH_FLAGS_)) \
338 $(DEPLOYMENT_TARGET_FLAGS)
316670eb
A
339
340#
341# Support for LLVM Link Time Optimization (LTO)
342#
39236c6e
A
343# CFLAGS_NOLTO_FLAG is needed on a per-file basis (for files
344# that deal poorly with LTO, or files that must be machine
345# code *.o files for xnu to build (i.e, setsegname runs on
346# them).
347#
348# LDFLAGS_NOSTRIP_FLAG is used to support configurations that
349# do not utilize an export list. For these configs to build,
350# we need to prevent the LTO logic from dead stripping them.
316670eb
A
351
352ifeq ($(BUILD_LTO),1)
39236c6e
A
353CFLAGS_GEN += -flto
354CXXFLAGS_GEN += -flto
355LDFLAGS_KERNEL_GEN += -Wl,-mllvm,-disable-simplify-libcalls -Wl,-object_path_lto,$(TARGET)/lto.o # -Wl,-mllvm -Wl,-disable-fp-elim
356LDFLAGS_NOSTRIP_FLAG = -rdynamic
357CFLAGS_NOLTO_FLAG = -fno-lto
358SUPPORTS_CTFCONVERT = 0
359NEEDS_CTF_MACHOS = 1
316670eb 360else
39236c6e
A
361LDFLAGS_NOSTRIP_FLAG =
362CFLAGS_NOLTO_FLAG =
363SUPPORTS_CTFCONVERT = 1
364NEEDS_CTF_MACHOS = 0
316670eb 365endif
1c79356b
A
366
367#
368# Default VPATH
369#
39236c6e 370export VPATH = .:$(SOURCE)
1c79356b
A
371
372#
2d21ac55 373# Macros that control installation of kernel and its header files
1c79356b
A
374#
375# install flags for header files
376#
39236c6e
A
377INSTALL_FLAGS = -c -S -m 0444
378DATA_INSTALL_FLAGS = -c -S -m 0644
379EXEC_INSTALL_FLAGS = -c -S -m 0755
1c79356b
A
380
381#
382# Header file destinations
383#
6d2010ae
A
384ifeq ($(RC_ProjectName),xnu_headers_Sim)
385 HEADER_INSTALL_PREFIX = $(SDKROOT)
386else
387 HEADER_INSTALL_PREFIX =
388endif
389
390FRAMEDIR = $(HEADER_INSTALL_PREFIX)/System/Library/Frameworks
391
392SINCVERS = B
393SINCFRAME = $(FRAMEDIR)/System.framework
394SINCDIR = $(SINCFRAME)/Versions/$(SINCVERS)/Headers
395SPINCDIR = $(SINCFRAME)/Versions/$(SINCVERS)/PrivateHeaders
396SRESDIR = $(SINCFRAME)/Versions/$(SINCVERS)/Resources
397
1c79356b 398ifndef INCDIR
6d2010ae 399 INCDIR = $(HEADER_INSTALL_PREFIX)/usr/include
1c79356b
A
400endif
401ifndef LCLDIR
6d2010ae 402 LCLDIR = $(SPINCDIR)
1c79356b
A
403endif
404
405KINCVERS = A
406KINCFRAME = $(FRAMEDIR)/Kernel.framework
407KINCDIR = $(KINCFRAME)/Versions/$(KINCVERS)/Headers
0b4e3aa0 408KPINCDIR = $(KINCFRAME)/Versions/$(KINCVERS)/PrivateHeaders
91447636
A
409KRESDIR = $(KINCFRAME)/Versions/$(KINCVERS)/Resources
410
411XNU_PRIVATE_UNIFDEF = -UMACH_KERNEL_PRIVATE -UBSD_KERNEL_PRIVATE -UIOKIT_KERNEL_PRIVATE -ULIBKERN_KERNEL_PRIVATE -ULIBSA_KERNEL_PRIVATE -UPEXPERT_KERNEL_PRIVATE -UXNU_KERNEL_PRIVATE
412
6d2010ae 413
39236c6e
A
414PLATFORM_UNIFDEF = $(foreach x,$(SUPPORTED_PLATFORMS),$(if $(filter $(PLATFORM),$(x)),-DPLATFORM_$(x) $(foreach token,$(PLATFORM_UNIFDEF_BLACKLIST_TOKENS_$(x)),-U$(token)),-UPLATFORM_$(x)))
415
416SPINCFRAME_UNIFDEF = $(PLATFORM_UNIFDEF) $(XNU_PRIVATE_UNIFDEF) $(SEED_DEFINES) -UKERNEL_PRIVATE -UKERNEL -DPRIVATE -U_OPEN_SOURCE_ -U__OPEN_SOURCE__
417SINCFRAME_UNIFDEF = $(PLATFORM_UNIFDEF) $(XNU_PRIVATE_UNIFDEF) $(SEED_DEFINES) -UKERNEL_PRIVATE -UKERNEL -UPRIVATE -D_OPEN_SOURCE_ -D__OPEN_SOURCE__
418KPINCFRAME_UNIFDEF = $(PLATFORM_UNIFDEF) $(XNU_PRIVATE_UNIFDEF) $(SEED_DEFINES) -DKERNEL_PRIVATE -DPRIVATE -DKERNEL -U_OPEN_SOURCE_ -U__OPEN_SOURCE__
419KINCFRAME_UNIFDEF = $(PLATFORM_UNIFDEF) $(XNU_PRIVATE_UNIFDEF) $(SEED_DEFINES) -UKERNEL_PRIVATE -UPRIVATE -DKERNEL -D_OPEN_SOURCE_ -D__OPEN_SOURCE__
1c79356b 420
b0d623f7 421
1c79356b 422#
39236c6e 423# Compononent Header file destinations
1c79356b
A
424#
425EXPDIR = EXPORT_HDRS/$(COMPONENT)
426
427#
428# Strip Flags
429#
39236c6e
A
430STRIP_FLAGS_RELEASE = -S -x
431STRIP_FLAGS_DEVELOPMENT = -S -x
432STRIP_FLAGS_DEBUG = -S
433STRIP_FLAGS_PROFILE = -S -x
1c79356b 434
39236c6e 435STRIP_FLAGS = $($(addsuffix $(CURRENT_KERNEL_CONFIG),STRIP_FLAGS_))
1c79356b 436
2d21ac55
A
437#
438# dsymutil flags
439#
39236c6e 440DSYMUTIL_FLAGS_X86_64 = --arch=x86_64
2d21ac55 441
39236c6e 442DSYMUTIL_FLAGS = $($(addsuffix $(CURRENT_ARCH_CONFIG),DSYMUTIL_FLAGS_))
2d21ac55 443
9bccf70c
A
444#
445# Man Page destination
446#
39236c6e 447MANDIR = /usr/share/man
9bccf70c 448
b0d623f7
A
449#
450# DEBUG alias location
451#
39236c6e 452DEVELOPER_EXTRAS_DIR = /AppleInternal/CoreOS/xnu_debug
2d21ac55 453
1c79356b 454#
39236c6e 455# mach_kernel install location
1c79356b 456#
39236c6e 457INSTALL_KERNEL_DIR = /
1c79356b 458
39236c6e
A
459#
460# System.kext pseudo-kext install location
461#
462INSTALL_EXTENSIONS_DIR = /System/Library/Extensions
463
464#
465# KDK location for iOS
466#
467INSTALL_KERNEL_SYM_DIR = /System/Library/Extensions/KDK
468
469#
470# Misc. Etc.
471#
472INSTALL_SHARE_MISC_DIR = /usr/share/misc
473INSTALL_DTRACE_SCRIPTS_DIR = /usr/lib/dtrace
474
475#
476# Overrides for XBS build aliases
477#
478ifeq ($(RC_ProjectName),xnu_debug)
479INSTALL_KERNEL_DIR := $(DEVELOPER_EXTRAS_DIR)
480DELETE_KERNEL_FRAMEWORK_AND_MISC = 1
481INSTALL_XNU_DEBUG_FILES = 1
482endif
483ifeq ($(PLATFORM),iPhoneOS)
484INSTALL_PRIMARY_KERNEL_LIKE_NON_PRIMARY = 1
485INSTALL_KERNEL_SYM_TO_KDK = 1
486USE_BINARY_PLIST = 1
487else ifeq ($(PLATFORM),iPhoneSimulator)
488INSTALL_SYSTEM_FRAMEWORK_SYMLINKS = 1
489USE_BINARY_PLIST = 1
490endif
1c79356b 491
2d21ac55 492# vim: set ft=make: