]>
Commit | Line | Data |
---|---|---|
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 | include $(MakeInc_cmd) | |
7 | include $(MakeInc_def) | |
8 | ||
9 | INSTINC_SUBDIRS = \ | |
10 | _types | |
11 | ||
12 | EXPINC_SUBDIRS = \ | |
13 | _types | |
14 | ||
15 | # Installs header file for user level - | |
16 | # $(DSTROOT)/System/Library/Frameworks/System.framework/PrivateHeaders | |
17 | # $(DSTROOT)/usr/include/ | |
18 | DATAFILES = \ | |
19 | appleapiopts.h acct.h aio.h attr.h \ | |
20 | buf.h cdefs.h clonefile.h conf.h \ | |
21 | dir.h dirent.h disk.h dkstat.h dtrace.h dtrace_glue.h dtrace_impl.h \ | |
22 | errno.h ev.h event.h fasttrap.h fasttrap_isa.h fcntl.h file.h filedesc.h filio.h fsgetpath.h gmon.h \ | |
23 | ioccom.h ioctl.h \ | |
24 | ioctl_compat.h ipc.h kernel.h kernel_types.h kern_event.h lctx.h loadable_fs.h lock.h lockf.h \ | |
25 | kauth.h kdebug.h kdebug_signpost.h kern_control.h lockstat.h malloc.h \ | |
26 | mbuf.h mman.h mount.h msg.h msgbuf.h netport.h param.h paths.h pipe.h poll.h \ | |
27 | proc.h proc_info.h ptrace.h queue.h quota.h reboot.h resource.h resourcevar.h \ | |
28 | sbuf.h posix_sem.h posix_shm.h random.h sdt.h\ | |
29 | select.h sem.h semaphore.h shm.h signal.h signalvar.h snapshot.h socket.h socketvar.h sockio.h stat.h stdio.h \ | |
30 | sysctl.h syslimits.h syslog.h sys_domain.h termios.h time.h \ | |
31 | timeb.h times.h tprintf.h trace.h tty.h ttychars.h ttycom.h \ | |
32 | ttydefaults.h ttydev.h types.h ubc.h ucontext.h ucred.h uio.h un.h unistd.h unpcb.h \ | |
33 | user.h utfconv.h utsname.h vadvise.h vcmd.h \ | |
34 | vm.h vmmeter.h vmparam.h vnioctl.h vnode.h vnode_if.h vstat.h wait.h xattr.h \ | |
35 | _select.h _structs.h _types.h _endian.h domain.h protosw.h \ | |
36 | spawn.h timex.h commpage.h | |
37 | ||
38 | # Installs header file for Apple internal use in user level - | |
39 | # $(DSTROOT)/System/Library/Frameworks/System.framework/PrivateHeaders | |
40 | PRIVATE_DATAFILES = \ | |
41 | attr.h \ | |
42 | cdefs.h \ | |
43 | clonefile.h \ | |
44 | coalition.h \ | |
45 | codesign.h \ | |
46 | content_protection.h \ | |
47 | csr.h \ | |
48 | decmpfs.h \ | |
49 | disk.h \ | |
50 | disklabel.h \ | |
51 | domain.h \ | |
52 | event.h \ | |
53 | fcntl.h \ | |
54 | fileport.h \ | |
55 | fsctl.h \ | |
56 | fsevents.h \ | |
57 | fsgetpath.h \ | |
58 | fslog.h \ | |
59 | guarded.h \ | |
60 | imgsrc.h \ | |
61 | ipcs.h \ | |
62 | kas_info.h \ | |
63 | kdebug.h \ | |
64 | kern_control.h \ | |
65 | kern_event.h \ | |
66 | kern_memorystatus.h \ | |
67 | kern_overrides.h \ | |
68 | mbuf.h \ | |
69 | mman.h \ | |
70 | monotonic.h \ | |
71 | persona.h \ | |
72 | priv.h \ | |
73 | proc.h \ | |
74 | proc_info.h \ | |
75 | proc_uuid_policy.h \ | |
76 | process_policy.h \ | |
77 | reason.h \ | |
78 | resource.h \ | |
79 | sfi.h \ | |
80 | shm_internal.h \ | |
81 | snapshot.h \ | |
82 | socket.h \ | |
83 | socketvar.h \ | |
84 | sockio.h \ | |
85 | spawn.h \ | |
86 | spawn_internal.h \ | |
87 | stackshot.h \ | |
88 | sys_domain.h \ | |
89 | tree.h \ | |
90 | ulock.h \ | |
91 | unpcb.h \ | |
92 | ux_exception.h \ | |
93 | work_interval.h \ | |
94 | process_policy.h \ | |
95 | proc_uuid_policy.h \ | |
96 | priv.h \ | |
97 | pgo.h \ | |
98 | memory_maintenance.h \ | |
99 | commpage.h | |
100 | ||
101 | # Installs header file for kernel extensions - | |
102 | # $(DSTROOT)/System/Library/Frameworks/Kernel.framework/Headers | |
103 | # $(DSTROOT)/System/Library/Frameworks/Kernel.framework/PrivateHeaders | |
104 | KERNELFILES = \ | |
105 | appleapiopts.h attr.h \ | |
106 | buf.h cdefs.h conf.h \ | |
107 | dir.h dirent.h disk.h disklabel.h dkstat.h \ | |
108 | errno.h ev.h event.h fcntl.h file.h filio.h \ | |
109 | ioccom.h ioctl.h ipc.h \ | |
110 | ioctl_compat.h kernel.h kernel_types.h kern_event.h lock.h lockf.h \ | |
111 | kauth.h kdebug.h md5.h kern_control.h imgact.h malloc.h namei.h \ | |
112 | mman.h mbuf.h mount.h netport.h param.h paths.h \ | |
113 | proc.h queue.h random.h resource.h \ | |
114 | sbuf.h posix_sem.h posix_shm.h sem.h shm.h \ | |
115 | select.h signal.h socket.h socketvar.h sockio.h stat.h stdio.h \ | |
116 | sysctl.h syslimits.h syslog.h systm.h sys_domain.h time.h \ | |
117 | types.h ubc.h ucontext.h ucred.h uio.h un.h unistd.h unpcb.h \ | |
118 | utfconv.h vm.h vmparam.h vnode.h vnode_if.h xattr.h \ | |
119 | _select.h _structs.h _types.h _endian.h protosw.h domain.h \ | |
120 | kpi_mbuf.h kpi_socket.h kpi_socketfilter.h \ | |
121 | ttycom.h termios.h msg.h \ | |
122 | wait.h \ | |
123 | spawn.h timex.h commpage.h | |
124 | # The last line was added to export needed headers for the MAC calls | |
125 | # whose source is outside of the xnu/bsd tree. | |
126 | ||
127 | # Installs header file for Apple internal use for kernel extensions - | |
128 | # $(DSTROOT)/System/Library/Frameworks/Kernel.framework/PrivateHeaders | |
129 | PRIVATE_KERNELFILES = \ | |
130 | codesign.h \ | |
131 | cprotect.h \ | |
132 | content_protection.h \ | |
133 | csr.h \ | |
134 | decmpfs.h \ | |
135 | disktab.h \ | |
136 | eventhandler.h \ | |
137 | fbt.h \ | |
138 | fileport.h \ | |
139 | fsctl.h \ | |
140 | fslog.h \ | |
141 | kasl.h \ | |
142 | kern_memorystatus.h \ | |
143 | kpi_private.h \ | |
144 | ktrace.h \ | |
145 | mach_swapon.h \ | |
146 | monotonic.h \ | |
147 | msgbuf.h \ | |
148 | eventvar.h \ | |
149 | persona.h \ | |
150 | proc_info.h \ | |
151 | pthread_shims.h \ | |
152 | quota.h \ | |
153 | reboot.h \ | |
154 | sem_internal.h \ | |
155 | shm_internal.h \ | |
156 | signalvar.h \ | |
157 | stackshot.h \ | |
158 | tty.h ttychars.h \ | |
159 | ttydefaults.h ttydev.h \ | |
160 | user.h \ | |
161 | vfs_context.h \ | |
162 | vmmeter.h \ | |
163 | reason.h \ | |
164 | spawn_internal.h \ | |
165 | priv.h \ | |
166 | pgo.h \ | |
167 | memory_maintenance.h \ | |
168 | doc_tombstone.h \ | |
169 | fsevents.h \ | |
170 | work_interval.h \ | |
171 | ||
172 | XNU_ONLY_EXPORTS = \ | |
173 | bsdtask_info.h \ | |
174 | file_internal.h \ | |
175 | filedesc.h \ | |
176 | guarded.h \ | |
177 | linker_set.h \ | |
178 | mount_internal.h \ | |
179 | munge.h \ | |
180 | pipe.h \ | |
181 | proc_internal.h \ | |
182 | pthread_internal.h \ | |
183 | resourcevar.h \ | |
184 | semaphore.h \ | |
185 | tree.h \ | |
186 | uio_internal.h \ | |
187 | ulock.h \ | |
188 | ux_exception.h \ | |
189 | vnode_internal.h | |
190 | ||
191 | # /usr/include | |
192 | INSTALL_MI_LIST = ${DATAFILES} | |
193 | ||
194 | INSTALL_MI_GEN_LIST = syscall.h _posix_availability.h _symbol_aliasing.h | |
195 | ||
196 | INSTALL_MI_DIR = sys | |
197 | ||
198 | EXPORT_MI_LIST = ${KERNELFILES} ${PRIVATE_KERNELFILES} ${XNU_ONLY_EXPORTS} | |
199 | ||
200 | EXPORT_MI_GEN_LIST = syscall.h sysproto.h kdebugevents.h | |
201 | ||
202 | EXPORT_MI_DIR = sys | |
203 | ||
204 | # /System/Library/Frameworks/System.framework/PrivateHeaders | |
205 | INSTALL_MI_LCL_LIST = ${PRIVATE_DATAFILES} | |
206 | ||
207 | # /System/Library/Frameworks/Kernel.framework/PrivateHeaders | |
208 | INSTALL_KF_MI_LCL_LIST = ${KERNELFILES} ${PRIVATE_KERNELFILES} | |
209 | ||
210 | INSTALL_KF_MI_LCL_GEN_LIST = sysproto.h | |
211 | ||
212 | # /System/Library/Frameworks/Kernel.framework/Headers | |
213 | INSTALL_KF_MI_LIST = ${KERNELFILES} | |
214 | ||
215 | INSTALL_KF_MI_GEN_LIST = | |
216 | ||
217 | MAKESYSCALLS = $(SRCROOT)/bsd/kern/makesyscalls.sh | |
218 | MAKEKDEBUGEVENTS = $(SRCROOT)/bsd/kern/makekdebugevents.py | |
219 | ||
220 | $(OBJROOT)/cscope.genhdrs: | |
221 | $(_v)mkdir -p $(OBJROOT)/cscope.genhdrs | |
222 | ||
223 | $(OBJROOT)/syscall.codes: $(SRCROOT)/bsd/kern/syscalls.master $(MAKESYSCALLS) | |
224 | @echo "[$(CMD_MC)] $(ColorH)GENERATING$(Color0) $(ColorLF)$@$(Color0) from $(ColorF)$<$(Color0)"; | |
225 | $(_v)$(MAKESYSCALLS) $< trace > $@ | |
226 | ||
227 | $(OBJROOT)/trace.codes: $(SRCROOT)/bsd/kern/trace_codes $(OBJROOT)/syscall.codes | |
228 | $(_v)sort -g $(SRCROOT)/bsd/kern/trace_codes $(OBJROOT)/syscall.codes >$@ | |
229 | ||
230 | syscall.h: $(SRCROOT)/bsd/kern/syscalls.master $(MAKESYSCALLS) $(OBJROOT)/cscope.genhdrs | |
231 | @echo "[$(CMD_MC)] $(ColorH)GENERATING$(Color0) $(ColorLF)bsd/sys/$@$(Color0) from $(ColorF)$<$(Color0)"; | |
232 | @echo "$(OBJPATH)/bsd/sys/$@" > $(OBJROOT)/cscope.genhdrs/$@.path | |
233 | $(_v)$(MAKESYSCALLS) $< header > /dev/null | |
234 | ||
235 | sysproto.h: $(SRCROOT)/bsd/kern/syscalls.master $(MAKESYSCALLS) $(OBJROOT)/cscope.genhdrs | |
236 | @echo "[$(CMD_MC)] $(ColorH)GENERATING$(Color0) $(ColorLF)bsd/sys/$@$(Color0) from $(ColorF)$<$(Color0)"; | |
237 | @echo "$(OBJPATH)/bsd/sys/$@" > $(OBJROOT)/cscope.genhdrs/$@.path | |
238 | $(_v)$(MAKESYSCALLS) $< proto > /dev/null | |
239 | ||
240 | kdebugevents.h: $(OBJROOT)/trace.codes $(MAKEKDEBUGEVENTS) $(OBJROOT)/cscope.genhdrs | |
241 | @echo "[$(CMD_MC)] $(ColorH)GENERATING$(Color0) $(ColorLF)bsd/sys/$@$(Color0) from $(ColorF)$<$(Color0)"; | |
242 | @echo "$(OBJPATH)/bsd/sys/$@" > $(OBJROOT)/cscope.genhdrs/$@.path | |
243 | $(_v)$(MAKEKDEBUGEVENTS) $< > "$(OBJPATH)/bsd/sys/$@" | |
244 | ||
245 | MAKE_POSIX_AVAILABILITY = $(SRCROOT)/bsd/sys/make_posix_availability.sh | |
246 | _posix_availability.h: $(MAKE_POSIX_AVAILABILITY) | |
247 | @echo "[$(CMD_MC)] $(ColorH)GENERATING$(Color0) $(ColorLF)bsd/sys/$@$(Color0)"; | |
248 | $(_v)$(MAKE_POSIX_AVAILABILITY) "$@" | |
249 | ||
250 | MAKE_SYMBOL_ALIASING = $(SRCROOT)/bsd/sys/make_symbol_aliasing.sh | |
251 | _symbol_aliasing.h: $(MAKE_SYMBOL_ALIASING) | |
252 | @echo "[$(CMD_MC)] $(ColorH)GENERATING$(Color0) $(ColorLF)bsd/sys/$@$(Color0)"; | |
253 | $(_v)$(MAKE_SYMBOL_ALIASING) "$(SDKROOT)" "$@" | |
254 | ||
255 | TRACE_CODES_DEST = \ | |
256 | $(DSTROOT)/$(INSTALL_SHARE_MISC_DIR)/trace.codes | |
257 | ||
258 | $(TRACE_CODES_DEST): $(OBJROOT)/trace.codes | |
259 | $(_v)$(MKDIR) $(DSTROOT)/$(INSTALL_SHARE_MISC_DIR) | |
260 | @echo INSTALL $(@F) | |
261 | $(_v)$(INSTALL) $(INSTALL_FLAGS) $(OBJROOT)/trace.codes $@ | |
262 | ||
263 | do_textfiles_install:: $(TRACE_CODES_DEST) | |
264 | ||
265 | include $(MakeInc_rule) | |
266 | include $(MakeInc_dir) |