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