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
10 include $(MakeInc_def)
18 INSTINC_SUBDIRS_I386 =
36 IPFirewall.kext/Info.plist \
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 \
41 System.kext/PlugIns/MACFramework.kext/Info.plist \
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 \
47 System.kext/PlugIns/Unsupported.kext/Info.plist \
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 \
56 /System/Library/Extensions/
62 KEXT_CREATE_SYMBOL_SET = /usr/local/bin/kextsymboltool
63 NEWVERS = $(SRCROOT)/config/newvers.pl
65 ifneq ($(MACHINE_CONFIG), DEFAULT)
66 OBJPATH = $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)_$(MACHINE_CONFIG)
68 OBJPATH = $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)
71 SYMBOL_COMPONENT_LIST = \
80 SYMBOL_COMPONENT_LIST += MACFramework
81 MACFRAMEWORKEXPORTS = \
82 -export $(SRCROOT)/$(COMPONENT)/MACFramework.exports \
83 -export $(SRCROOT)/$(COMPONENT)/MACFramework.$(ARCH_CONFIG_LC).exports
86 SYMBOL_SET_BUILD = $(foreach set, $(SYMBOL_COMPONENT_LIST), $(OBJPATH)/$(set).symbolset)
87 SYMBOL_SET_FAT = $(foreach set, $(SYMBOL_COMPONENT_LIST), $(OBJROOT)/$(set).symbolset)
89 ## .SUFFIXES: .symbolset .symbollist
91 $(OBJPATH)/allsymbols: $(OBJPATH)/mach_kernel
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_ALL_)) \
97 -import $(OBJPATH)/allsymbols \
99 -export $*.$(ARCH_CONFIG_LC).exports \
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 $@;
106 $(SYMBOL_SET_FAT): $(OBJROOT)/%.symbolset : $(foreach arch, $(INSTALL_ARCHS), $(OBJROOT)/$(KERNEL_CONFIG)_$(arch)/%.symbolset)
107 $(_v)$(LIPO) $(foreach arch, $(INSTALL_ARCHS), $(OBJROOT)/$(KERNEL_CONFIG)_$(arch)/$*.symbolset) -create -output $@;
110 build_symbol_sets: $(SYMBOL_SET_BUILD)
111 $(_v)$(KEXT_CREATE_SYMBOL_SET) \
112 $($(addsuffix $(ARCH_CONFIG),ARCH_FLAGS_ALL_)) \
113 -import $(OBJPATH)/allsymbols \
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 \
122 $(MACFRAMEWORKEXPORTS) \
123 -export $(SRCROOT)/$(COMPONENT)/Unsupported.exports \
124 -export $(SRCROOT)/$(COMPONENT)/Unsupported.$(ARCH_CONFIG_LC).exports \
127 install_symbol_sets: $(SYMBOL_SET_FAT) $(SRCROOT)/config/MasterVersion
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;
131 $(_v)install $(INSTALL_FLAGS) $(OBJROOT)/MACFramework.symbolset $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/PlugIns/MACFramework.kext/MACFramework;
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 \
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 \
141 $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/PlugIns/MACFramework.kext/Info.plist \
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
149 do_build_all: build_symbol_sets
151 do_build_install: install_symbol_sets
153 include $(MakeInc_rule)
154 include $(MakeInc_dir)