]>
Commit | Line | Data |
---|---|---|
2d21ac55 A |
1 | MAC = defined |
2 | ||
d7e50217 A |
3 | export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd |
4 | export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def | |
5 | export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule | |
6 | export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir | |
7 | ||
8 | ||
9 | include $(MakeInc_cmd) | |
10 | include $(MakeInc_def) | |
11 | ||
12 | ALL_SUBDIRS = | |
13 | ||
14 | INSTINC_SUBDIRS = | |
15 | ||
16 | INSTINC_SUBDIRS_PPC = | |
17 | ||
18 | INSTINC_SUBDIRS_I386 = | |
19 | ||
2d21ac55 A |
20 | INSTINC_SUBDIRS_ARM = |
21 | ||
d7e50217 A |
22 | EXPINC_SUBDIRS = |
23 | ||
24 | EXPINC_SUBDIRS_PPC = | |
25 | ||
26 | EXPINC_SUBDIRS_I386 = | |
27 | ||
2d21ac55 A |
28 | EXPINC_SUBDIRS_ARM = |
29 | ||
d7e50217 A |
30 | COMP_SUBDIRS = |
31 | ||
32 | INST_SUBDIRS = | |
33 | ||
55e303ae | 34 | |
d7e50217 | 35 | INSTALL_DATA_LIST= \ |
91447636 | 36 | IPFirewall.kext/Info.plist \ |
55e303ae A |
37 | System.kext/Info.plist \ |
38 | System.kext/PlugIns/Libkern.kext/Info.plist \ | |
39 | System.kext/PlugIns/Mach.kext/Info.plist \ | |
40 | System.kext/PlugIns/BSDKernel.kext/Info.plist \ | |
2d21ac55 | 41 | System.kext/PlugIns/MACFramework.kext/Info.plist \ |
55e303ae A |
42 | System.kext/PlugIns/IOKit.kext/Info.plist \ |
43 | System.kext/PlugIns/AppleNMI.kext/Info.plist \ | |
44 | System.kext/PlugIns/ApplePlatformFamily.kext/Info.plist \ | |
45 | System.kext/PlugIns/IONVRAMFamily.kext/Info.plist \ | |
46 | System.kext/PlugIns/IOSystemManagement.kext/Info.plist \ | |
91447636 | 47 | System.kext/PlugIns/Unsupported.kext/Info.plist \ |
55e303ae A |
48 | \ |
49 | System.kext/PlugIns/System6.0.kext/Info.plist \ | |
50 | System.kext/PlugIns/Libkern6.0.kext/Info.plist \ | |
51 | System.kext/PlugIns/Mach6.0.kext/Info.plist \ | |
52 | System.kext/PlugIns/BSDKernel6.0.kext/Info.plist \ | |
53 | System.kext/PlugIns/IOKit6.0.kext/Info.plist \ | |
d7e50217 A |
54 | |
55 | INSTALL_DATA_DIR= \ | |
56 | /System/Library/Extensions/ | |
57 | ||
58 | INSTMAN_SUBDIRS = | |
59 | ||
55e303ae A |
60 | # |
61 | ||
62 | KEXT_CREATE_SYMBOL_SET = /usr/local/bin/kextsymboltool | |
91447636 | 63 | NEWVERS = $(SRCROOT)/config/newvers.pl |
55e303ae | 64 | |
2d21ac55 A |
65 | ifneq ($(MACHINE_CONFIG), DEFAULT) |
66 | OBJPATH = $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)_$(MACHINE_CONFIG) | |
67 | else | |
68 | OBJPATH = $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG) | |
69 | endif | |
70 | ||
55e303ae A |
71 | SYMBOL_COMPONENT_LIST = \ |
72 | System6.0 \ | |
73 | BSDKernel \ | |
74 | IOKit \ | |
75 | Libkern \ | |
91447636 A |
76 | Mach \ |
77 | Unsupported | |
55e303ae | 78 | |
2d21ac55 A |
79 | ifdef MAC |
80 | SYMBOL_COMPONENT_LIST += MACFramework | |
81 | MACFRAMEWORKEXPORTS = \ | |
82 | -export $(SRCROOT)/$(COMPONENT)/MACFramework.exports \ | |
83 | -export $(SRCROOT)/$(COMPONENT)/MACFramework.$(ARCH_CONFIG_LC).exports | |
84 | endif | |
85 | ||
86 | SYMBOL_SET_BUILD = $(foreach set, $(SYMBOL_COMPONENT_LIST), $(OBJPATH)/$(set).symbolset) | |
55e303ae A |
87 | SYMBOL_SET_FAT = $(foreach set, $(SYMBOL_COMPONENT_LIST), $(OBJROOT)/$(set).symbolset) |
88 | ||
89 | ## .SUFFIXES: .symbolset .symbollist | |
90 | ||
2d21ac55 A |
91 | $(OBJPATH)/allsymbols: $(OBJPATH)/mach_kernel |
92 | $(_v)nm -gj $< > $@ | |
55e303ae | 93 | |
2d21ac55 A |
94 | $(SYMBOL_SET_BUILD): $(OBJPATH)/%.symbolset : %.exports %.$(ARCH_CONFIG_LC).exports $(OBJPATH)/allsymbols |
95 | $(_v)$(KEXT_CREATE_SYMBOL_SET) \ | |
96 | $($(addsuffix $(ARCH_CONFIG),ARCH_FLAGS_)) \ | |
97 | -import $(OBJPATH)/allsymbols \ | |
55e303ae A |
98 | -export $*.exports \ |
99 | -export $*.$(ARCH_CONFIG_LC).exports \ | |
100 | -output $@; | |
101 | ||
2d21ac55 A |
102 | ifneq ($(MACHINE_CONFIG), DEFAULT) |
103 | $(SYMBOL_SET_FAT): $(OBJROOT)/%.symbolset : $(foreach arch, $(INSTALL_ARCHS), $(OBJROOT)/$(KERNEL_CONFIG)_$(arch)_$(MACHINE_CONFIG)/%.symbolset) | |
104 | $(LIPO) $(foreach arch, $(INSTALL_ARCHS), $(OBJROOT)/$(KERNEL_CONFIG)_$(arch)_$(MACHINE_CONFIG)/$*.symbolset) -create -output $@; | |
105 | else | |
55e303ae | 106 | $(SYMBOL_SET_FAT): $(OBJROOT)/%.symbolset : $(foreach arch, $(INSTALL_ARCHS), $(OBJROOT)/$(KERNEL_CONFIG)_$(arch)/%.symbolset) |
2d21ac55 A |
107 | $(_v)$(LIPO) $(foreach arch, $(INSTALL_ARCHS), $(OBJROOT)/$(KERNEL_CONFIG)_$(arch)/$*.symbolset) -create -output $@; |
108 | endif | |
55e303ae A |
109 | |
110 | build_symbol_sets: $(SYMBOL_SET_BUILD) | |
2d21ac55 A |
111 | $(_v)$(KEXT_CREATE_SYMBOL_SET) \ |
112 | $($(addsuffix $(ARCH_CONFIG),ARCH_FLAGS_)) \ | |
113 | -import $(OBJPATH)/allsymbols \ | |
91447636 A |
114 | -export $(SRCROOT)/$(COMPONENT)/Libkern.exports \ |
115 | -export $(SRCROOT)/$(COMPONENT)/Libkern.$(ARCH_CONFIG_LC).exports \ | |
116 | -export $(SRCROOT)/$(COMPONENT)/Mach.exports \ | |
117 | -export $(SRCROOT)/$(COMPONENT)/Mach.$(ARCH_CONFIG_LC).exports \ | |
118 | -export $(SRCROOT)/$(COMPONENT)/IOKit.exports \ | |
119 | -export $(SRCROOT)/$(COMPONENT)/IOKit.$(ARCH_CONFIG_LC).exports \ | |
120 | -export $(SRCROOT)/$(COMPONENT)/BSDKernel.exports \ | |
121 | -export $(SRCROOT)/$(COMPONENT)/BSDKernel.$(ARCH_CONFIG_LC).exports \ | |
2d21ac55 | 122 | $(MACFRAMEWORKEXPORTS) \ |
91447636 A |
123 | -export $(SRCROOT)/$(COMPONENT)/Unsupported.exports \ |
124 | -export $(SRCROOT)/$(COMPONENT)/Unsupported.$(ARCH_CONFIG_LC).exports \ | |
125 | -output /dev/null; | |
126 | ||
127 | install_symbol_sets: $(SYMBOL_SET_FAT) $(SRCROOT)/config/MasterVersion | |
2d21ac55 A |
128 | $(_v)install $(INSTALL_FLAGS) $(OBJROOT)/System6.0.symbolset $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/PlugIns/System6.0.kext/kernel.6.0; |
129 | $(_v)install $(INSTALL_FLAGS) $(OBJROOT)/BSDKernel.symbolset $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/PlugIns/BSDKernel.kext/BSDKernel; | |
130 | ifdef MAC | |
131 | $(_v)install $(INSTALL_FLAGS) $(OBJROOT)/MACFramework.symbolset $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/PlugIns/MACFramework.kext/MACFramework; | |
132 | endif | |
133 | $(_v)install $(INSTALL_FLAGS) $(OBJROOT)/IOKit.symbolset $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/PlugIns/IOKit.kext/IOKit; | |
134 | $(_v)install $(INSTALL_FLAGS) $(OBJROOT)/Libkern.symbolset $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/PlugIns/Libkern.kext/Libkern; | |
135 | $(_v)install $(INSTALL_FLAGS) $(OBJROOT)/Mach.symbolset $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/PlugIns/Mach.kext/Mach; | |
136 | $(_v)install $(INSTALL_FLAGS) $(OBJROOT)/Unsupported.symbolset $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/PlugIns/Unsupported.kext/Unsupported; | |
137 | $(_v)$(NEWVERS) $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/Info.plist \ | |
91447636 A |
138 | $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/PlugIns/AppleNMI.kext/Info.plist \ |
139 | $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/PlugIns/ApplePlatformFamily.kext/Info.plist \ | |
140 | $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/PlugIns/BSDKernel.kext/Info.plist \ | |
2d21ac55 | 141 | $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/PlugIns/MACFramework.kext/Info.plist \ |
91447636 A |
142 | $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/PlugIns/IOKit.kext/Info.plist \ |
143 | $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/PlugIns/IONVRAMFamily.kext/Info.plist \ | |
144 | $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/PlugIns/IOSystemManagement.kext/Info.plist \ | |
145 | $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/PlugIns/Libkern.kext/Info.plist \ | |
146 | $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/PlugIns/Mach.kext/Info.plist \ | |
147 | $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/PlugIns/Unsupported.kext/Info.plist | |
55e303ae A |
148 | |
149 | do_build_all: build_symbol_sets | |
150 | ||
151 | do_build_install: install_symbol_sets | |
152 | ||
d7e50217 A |
153 | include $(MakeInc_rule) |
154 | include $(MakeInc_dir) |