1MAC = defined 2 3export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd 4export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def 5export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule 6export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir 7 8 9include $(MakeInc_cmd) 10include $(MakeInc_def) 11 12ALL_SUBDIRS = 13 14INSTINC_SUBDIRS = 15 16INSTINC_SUBDIRS_PPC = 17 18INSTINC_SUBDIRS_I386 = 19 20INSTINC_SUBDIRS_ARM = 21 22EXPINC_SUBDIRS = 23 24EXPINC_SUBDIRS_PPC = 25 26EXPINC_SUBDIRS_I386 = 27 28EXPINC_SUBDIRS_ARM = 29 30COMP_SUBDIRS = 31 32INST_SUBDIRS = 33 34 35INSTALL_DATA_LIST= \ 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 \ 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 \ 54 55INSTALL_DATA_DIR= \ 56 /System/Library/Extensions/ 57 58INSTMAN_SUBDIRS = 59 60# 61 62KEXT_CREATE_SYMBOL_SET = /usr/local/bin/kextsymboltool 63NEWVERS = $(SRCROOT)/config/newvers.pl 64 65ifneq ($(MACHINE_CONFIG), DEFAULT) 66OBJPATH = $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG)_$(MACHINE_CONFIG) 67else 68OBJPATH = $(OBJROOT)/$(KERNEL_CONFIG)_$(ARCH_CONFIG) 69endif 70 71SYMBOL_COMPONENT_LIST = \ 72 System6.0 \ 73 BSDKernel \ 74 IOKit \ 75 Libkern \ 76 Mach \ 77 Unsupported 78 79ifdef MAC 80SYMBOL_COMPONENT_LIST += MACFramework 81MACFRAMEWORKEXPORTS = \ 82 -export $(SRCROOT)/$(COMPONENT)/MACFramework.exports \ 83 -export $(SRCROOT)/$(COMPONENT)/MACFramework.$(ARCH_CONFIG_LC).exports 84endif 85 86SYMBOL_SET_BUILD = $(foreach set, $(SYMBOL_COMPONENT_LIST), $(OBJPATH)/$(set).symbolset) 87SYMBOL_SET_FAT = $(foreach set, $(SYMBOL_COMPONENT_LIST), $(OBJROOT)/$(set).symbolset) 88 89## .SUFFIXES: .symbolset .symbollist 90 91$(OBJPATH)/allsymbols: $(OBJPATH)/mach_kernel 92 $(_v)nm -gj $< > $@ 93 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 \ 98 -export $*.exports \ 99 -export $*.$(ARCH_CONFIG_LC).exports \ 100 -output $@; 101 102ifneq ($(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 $@; 105else 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 $@; 108endif 109 110build_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 \ 125 -output /dev/null; 126 127install_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; 130ifdef MAC 131 $(_v)install $(INSTALL_FLAGS) $(OBJROOT)/MACFramework.symbolset $(DSTROOT)/$(INSTALL_DATA_DIR)/System.kext/PlugIns/MACFramework.kext/MACFramework; 132endif 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 148 149do_build_all: build_symbol_sets 150 151do_build_install: install_symbol_sets 152 153include $(MakeInc_rule) 154include $(MakeInc_dir) 155