]> git.saurik.com Git - apple/xnu.git/blame - config/Makefile
xnu-517.tar.gz
[apple/xnu.git] / config / Makefile
CommitLineData
d7e50217
A
1export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
2export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
3export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
4export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir
5
6
7include $(MakeInc_cmd)
8include $(MakeInc_def)
9
10ALL_SUBDIRS =
11
12INSTINC_SUBDIRS =
13
14INSTINC_SUBDIRS_PPC =
15
16INSTINC_SUBDIRS_I386 =
17
18EXPINC_SUBDIRS =
19
20EXPINC_SUBDIRS_PPC =
21
22EXPINC_SUBDIRS_I386 =
23
24COMP_SUBDIRS =
25
26INST_SUBDIRS =
27
55e303ae 28
d7e50217 29INSTALL_DATA_LIST= \
55e303ae
A
30 System.kext/Info.plist \
31 System.kext/PlugIns/Libkern.kext/Info.plist \
32 System.kext/PlugIns/Mach.kext/Info.plist \
33 System.kext/PlugIns/BSDKernel.kext/Info.plist \
34 System.kext/PlugIns/IOKit.kext/Info.plist \
35 System.kext/PlugIns/AppleNMI.kext/Info.plist \
36 System.kext/PlugIns/ApplePlatformFamily.kext/Info.plist \
37 System.kext/PlugIns/IONVRAMFamily.kext/Info.plist \
38 System.kext/PlugIns/IOSystemManagement.kext/Info.plist \
39 \
40 System.kext/PlugIns/System6.0.kext/Info.plist \
41 System.kext/PlugIns/Libkern6.0.kext/Info.plist \
42 System.kext/PlugIns/Mach6.0.kext/Info.plist \
43 System.kext/PlugIns/BSDKernel6.0.kext/Info.plist \
44 System.kext/PlugIns/IOKit6.0.kext/Info.plist \
45
d7e50217
A
46
47INSTALL_DATA_DIR= \
48 /System/Library/Extensions/
49
50INSTMAN_SUBDIRS =
51
55e303ae
A
52#
53
54KEXT_CREATE_SYMBOL_SET = /usr/local/bin/kextsymboltool
55
56SYMBOL_COMPONENT_LIST = \
57 System6.0 \
58 BSDKernel \
59 IOKit \
60 Libkern \
61 Mach
62
63SYMBOL_SET_BUILD = $(foreach set, $(SYMBOL_COMPONENT_LIST), $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/$(set).symbolset)
64SYMBOL_SET_FAT = $(foreach set, $(SYMBOL_COMPONENT_LIST), $(OBJROOT)/$(set).symbolset)
65
66## .SUFFIXES: .symbolset .symbollist
67
68$(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/allsymbols: $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/mach_kernel
69 nm -gj $< > $@
70
71$(SYMBOL_SET_BUILD): $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/%.symbolset : %.exports %.$(ARCH_CONFIG_LC).exports $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/allsymbols
72 $(KEXT_CREATE_SYMBOL_SET) \
73 -arch $(ARCH_CONFIG_LC) \
74 -import $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)/allsymbols \
75 -export $*.exports \
76 -export $*.$(ARCH_CONFIG_LC).exports \
77 -output $@;
78
79$(SYMBOL_SET_FAT): $(OBJROOT)/%.symbolset : $(foreach arch, $(INSTALL_ARCHS), $(OBJROOT)/$(KERNEL_CONFIG)_$(arch)/%.symbolset)
80 $(LIPO) $(foreach arch, $(INSTALL_ARCHS), $(OBJROOT)/$(KERNEL_CONFIG)_$(arch)/$*.symbolset) -create -output $@;
81
82
83build_symbol_sets: $(SYMBOL_SET_BUILD)
84
85install_symbol_sets: $(SYMBOL_SET_FAT)
86 install $(INSTALL_FLAGS) $(OBJROOT)/System6.0.symbolset $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/PlugIns/System6.0.kext/kernel.6.0;
87 install $(INSTALL_FLAGS) $(OBJROOT)/BSDKernel.symbolset $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/PlugIns/BSDKernel.kext/BSDKernel;
88 install $(INSTALL_FLAGS) $(OBJROOT)/IOKit.symbolset $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/PlugIns/IOKit.kext/IOKit;
89 install $(INSTALL_FLAGS) $(OBJROOT)/Libkern.symbolset $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/PlugIns/Libkern.kext/Libkern;
90 install $(INSTALL_FLAGS) $(OBJROOT)/Mach.symbolset $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/PlugIns/Mach.kext/Mach;
91
92do_build_all: build_symbol_sets
93
94do_build_install: install_symbol_sets
95
d7e50217
A
96include $(MakeInc_rule)
97include $(MakeInc_dir)