]>
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 vsock.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 log_data.h | |
37 | ||
38 | # Installs header file for DriverKit drivers - | |
39 | # $(DSTROOT)/System/DriverKit/System/usr/include/ | |
40 | DRIVERKIT_DATAFILES = \ | |
41 | cdefs.h _types.h _endian.h | |
42 | ||
43 | # Installs header file for Apple internal use in user level - | |
44 | # $(DSTROOT)/System/Library/Frameworks/System.framework/PrivateHeaders | |
45 | PRIVATE_DATAFILES = \ | |
46 | attr.h \ | |
47 | cdefs.h \ | |
48 | clonefile.h \ | |
49 | coalition.h \ | |
50 | codesign.h \ | |
51 | content_protection.h \ | |
52 | csr.h \ | |
53 | decmpfs.h \ | |
54 | disk.h \ | |
55 | disklabel.h \ | |
56 | domain.h \ | |
57 | event.h \ | |
58 | fcntl.h \ | |
59 | fileport.h \ | |
60 | fsctl.h \ | |
61 | fsevents.h \ | |
62 | fsgetpath.h \ | |
63 | fslog.h \ | |
64 | guarded.h \ | |
65 | imgsrc.h \ | |
66 | ipcs.h \ | |
67 | kas_info.h \ | |
68 | kdebug.h \ | |
69 | kern_control.h \ | |
70 | kern_event.h \ | |
71 | kern_memorystatus.h \ | |
72 | kern_memorystatus_freeze.h \ | |
73 | kern_memorystatus_notify.h \ | |
74 | kern_overrides.h \ | |
75 | kern_sysctl.h \ | |
76 | mbuf.h \ | |
77 | mman.h \ | |
78 | monotonic.h \ | |
79 | persona.h \ | |
80 | priv.h \ | |
81 | proc.h \ | |
82 | proc_info.h \ | |
83 | proc_uuid_policy.h \ | |
84 | process_policy.h \ | |
85 | reason.h \ | |
86 | resource.h \ | |
87 | sfi.h \ | |
88 | shm_internal.h \ | |
89 | snapshot.h \ | |
90 | socket.h \ | |
91 | socketvar.h \ | |
92 | sockio.h \ | |
93 | spawn.h \ | |
94 | spawn_internal.h \ | |
95 | stackshot.h \ | |
96 | sys_domain.h \ | |
97 | tree.h \ | |
98 | ulock.h \ | |
99 | unpcb.h \ | |
100 | ux_exception.h \ | |
101 | vsock.h \ | |
102 | work_interval.h \ | |
103 | process_policy.h \ | |
104 | proc_uuid_policy.h \ | |
105 | priv.h \ | |
106 | pgo.h \ | |
107 | memory_maintenance.h \ | |
108 | commpage.h | |
109 | ||
110 | # Installs header file for Apple internal use by DriverKit drivers - | |
111 | # $(DSTROOT)/System/DriverKit/System/usr/local/include/ | |
112 | DRIVERKIT_PRIVATE_DATAFILES = \ | |
113 | appleapiopts.h kdebug.h | |
114 | ||
115 | # Installs header file for kernel extensions - | |
116 | # $(DSTROOT)/System/Library/Frameworks/Kernel.framework/Headers | |
117 | # $(DSTROOT)/System/Library/Frameworks/Kernel.framework/PrivateHeaders | |
118 | KERNELFILES = \ | |
119 | appleapiopts.h attr.h \ | |
120 | buf.h cdefs.h conf.h \ | |
121 | dir.h dirent.h disk.h disklabel.h dkstat.h \ | |
122 | errno.h ev.h event.h fcntl.h file.h filio.h \ | |
123 | ioccom.h ioctl.h ipc.h \ | |
124 | ioctl_compat.h kernel.h kernel_types.h kern_event.h lock.h lockf.h \ | |
125 | kauth.h kdebug.h kdebug_kernel.h md5.h kern_control.h imgact.h malloc.h \ | |
126 | namei.h mman.h mbuf.h mount.h netport.h param.h paths.h \ | |
127 | proc.h queue.h random.h resource.h \ | |
128 | sbuf.h posix_sem.h posix_shm.h sem.h shm.h \ | |
129 | select.h signal.h socket.h socketvar.h sockio.h stat.h stdio.h \ | |
130 | sysctl.h syslimits.h syslog.h systm.h sys_domain.h time.h \ | |
131 | types.h ubc.h ucontext.h ucred.h uio.h un.h unistd.h unpcb.h \ | |
132 | utfconv.h unicode.h vm.h vmparam.h vnode.h vnode_if.h vsock.h xattr.h \ | |
133 | _select.h _structs.h _types.h _endian.h protosw.h domain.h \ | |
134 | kpi_mbuf.h kpi_socket.h kpi_socketfilter.h \ | |
135 | ttycom.h termios.h msg.h \ | |
136 | wait.h \ | |
137 | spawn.h timex.h commpage.h | |
138 | # The last line was added to export needed headers for the MAC calls | |
139 | # whose source is outside of the xnu/bsd tree. | |
140 | ||
141 | # Installs header file for Apple internal use for kernel extensions - | |
142 | # $(DSTROOT)/System/Library/Frameworks/Kernel.framework/PrivateHeaders | |
143 | PRIVATE_KERNELFILES = \ | |
144 | codesign.h \ | |
145 | cprotect.h \ | |
146 | content_protection.h \ | |
147 | csr.h \ | |
148 | decmpfs.h \ | |
149 | disktab.h \ | |
150 | eventhandler.h \ | |
151 | fbt.h \ | |
152 | fileport.h \ | |
153 | fsctl.h \ | |
154 | fslog.h \ | |
155 | kasl.h \ | |
156 | kern_memorystatus.h \ | |
157 | kern_memorystatus_freeze.h \ | |
158 | kern_memorystatus_notify.h \ | |
159 | kpi_private.h \ | |
160 | ktrace.h \ | |
161 | linker_set.h \ | |
162 | mach_swapon.h \ | |
163 | monotonic.h \ | |
164 | msgbuf.h \ | |
165 | eventvar.h \ | |
166 | persona.h \ | |
167 | proc_info.h \ | |
168 | pthread_shims.h \ | |
169 | quota.h \ | |
170 | reboot.h \ | |
171 | sem_internal.h \ | |
172 | shm_internal.h \ | |
173 | signalvar.h \ | |
174 | stackshot.h \ | |
175 | tty.h ttychars.h \ | |
176 | ttydefaults.h ttydev.h \ | |
177 | user.h \ | |
178 | vfs_context.h \ | |
179 | vmmeter.h \ | |
180 | reason.h \ | |
181 | spawn_internal.h \ | |
182 | priv.h \ | |
183 | pgo.h \ | |
184 | memory_maintenance.h \ | |
185 | doc_tombstone.h \ | |
186 | fsevents.h \ | |
187 | work_interval.h \ | |
188 | kern_sysctl.h \ | |
189 | vsock_transport.h \ | |
190 | ||
191 | XNU_ONLY_EXPORTS = \ | |
192 | bsdtask_info.h \ | |
193 | file_internal.h \ | |
194 | filedesc.h \ | |
195 | guarded.h \ | |
196 | mount_internal.h \ | |
197 | munge.h \ | |
198 | pipe.h \ | |
199 | proc_internal.h \ | |
200 | proc_require.h \ | |
201 | pthread_internal.h \ | |
202 | resourcevar.h \ | |
203 | semaphore.h \ | |
204 | tree.h \ | |
205 | uio_internal.h \ | |
206 | ulock.h \ | |
207 | ux_exception.h \ | |
208 | vnode_internal.h \ | |
209 | vsock_domain.h | |
210 | ||
211 | MODULEMAP_INCDIR_FILES = \ | |
212 | sys__types.modulemap \ | |
213 | sys_types.modulemap \ | |
214 | sys_cdefs.modulemap | |
215 | ||
216 | # /usr/include | |
217 | INSTALL_MI_LIST = ${DATAFILES} | |
218 | ||
219 | INSTALL_DRIVERKIT_MI_LIST = ${DRIVERKIT_DATAFILES} | |
220 | ||
221 | INSTALL_MODULEMAP_INCDIR_MI_LIST = ${MODULEMAP_INCDIR_FILES} | |
222 | ||
223 | INSTALL_MI_GEN_LIST = syscall.h _posix_availability.h _symbol_aliasing.h | |
224 | ||
225 | INSTALL_DRIVERKIT_MI_GEN_LIST = _posix_availability.h _symbol_aliasing.h | |
226 | ||
227 | INSTALL_MI_DIR = sys | |
228 | ||
229 | EXPORT_MI_LIST = ${KERNELFILES} ${PRIVATE_KERNELFILES} ${XNU_ONLY_EXPORTS} | |
230 | ||
231 | EXPORT_MI_GEN_LIST = syscall.h sysproto.h | |
232 | ||
233 | EXPORT_MI_DIR = sys | |
234 | ||
235 | # /System/Library/Frameworks/System.framework/PrivateHeaders | |
236 | INSTALL_MI_LCL_LIST = ${PRIVATE_DATAFILES} | |
237 | ||
238 | INSTALL_DRIVERKIT_MI_LCL_LIST = ${DRIVERKIT_PRIVATE_DATAFILES} | |
239 | ||
240 | # /System/Library/Frameworks/Kernel.framework/PrivateHeaders | |
241 | INSTALL_KF_MI_LCL_LIST = ${KERNELFILES} ${PRIVATE_KERNELFILES} | |
242 | ||
243 | INSTALL_KF_MI_LCL_GEN_LIST = sysproto.h | |
244 | ||
245 | # /System/Library/Frameworks/Kernel.framework/Headers | |
246 | INSTALL_KF_MI_LIST = ${KERNELFILES} | |
247 | ||
248 | INSTALL_KF_MI_GEN_LIST = | |
249 | ||
250 | MAKESYSCALLS = $(SRCROOT)/bsd/kern/makesyscalls.sh | |
251 | ||
252 | $(OBJROOT)/cscope.genhdrs: | |
253 | $(_v)mkdir -p $(OBJROOT)/cscope.genhdrs | |
254 | ||
255 | $(OBJROOT)/syscall.codes: $(TARGET)/bsd.syscalls.master | |
256 | @$(LOG_GENERATE) "$(ColorLF)$@$(Color0) from $(ColorF)$(<F)$(Color0)" | |
257 | $(_v)$(MAKESYSCALLS) $< trace > $@ | |
258 | ||
259 | $(OBJROOT)/trace.codes: $(SRCROOT)/bsd/kern/trace_codes $(OBJROOT)/syscall.codes | |
260 | $(_v)sort -g $(SRCROOT)/bsd/kern/trace_codes $(OBJROOT)/syscall.codes >$@ | |
261 | ||
262 | syscall.h: $(TARGET)/bsd.syscalls.master $(OBJROOT)/cscope.genhdrs | |
263 | @$(LOG_GENERATE) "$(ColorLF)bsd/sys/$@$(Color0) from $(ColorF)$(<F)$(Color0)" | |
264 | @echo "$(OBJPATH)/bsd/sys/$@" > $(OBJROOT)/cscope.genhdrs/$@.path | |
265 | $(_v)$(MAKESYSCALLS) $< header > /dev/null | |
266 | ||
267 | sysproto.h: $(TARGET)/bsd.syscalls.master $(OBJROOT)/cscope.genhdrs | |
268 | @$(LOG_GENERATE) "bsd/sys/$@$(Color0) from $(ColorF)$(<F)$(Color0)" | |
269 | @echo "$(OBJPATH)/bsd/sys/$@" > $(OBJROOT)/cscope.genhdrs/$@.path | |
270 | $(_v)$(MAKESYSCALLS) $< proto > /dev/null | |
271 | ||
272 | MAKE_POSIX_AVAILABILITY = $(SRCROOT)/bsd/sys/make_posix_availability.sh | |
273 | _posix_availability.h: $(MAKE_POSIX_AVAILABILITY) | |
274 | @$(LOG_GENERATE) "bsd/sys/$@$(Color0)" | |
275 | $(_v)$(MAKE_POSIX_AVAILABILITY) "$@" | |
276 | ||
277 | MAKE_SYMBOL_ALIASING = $(SRCROOT)/bsd/sys/make_symbol_aliasing.sh | |
278 | _symbol_aliasing.h: $(MAKE_SYMBOL_ALIASING) | |
279 | @$(LOG_GENERATE) "bsd/sys/$@$(Color0)" | |
280 | $(_v)$(MAKE_SYMBOL_ALIASING) "$(SDKROOT)" "$@" | |
281 | ||
282 | # generated headers needed early (used by iig during installhdrs of iokit/DriverKit) | |
283 | SETUP_GEN_LIST = _posix_availability.h _symbol_aliasing.h | |
284 | ||
285 | do_build_setup:: $(SETUP_GEN_LIST) | |
286 | ||
287 | TRACE_CODES_DEST = \ | |
288 | $(DSTROOT)/$(INSTALL_SHARE_MISC_DIR)/trace.codes | |
289 | ||
290 | $(TRACE_CODES_DEST): $(OBJROOT)/trace.codes | |
291 | $(_v)$(MKDIR) $(DSTROOT)/$(INSTALL_SHARE_MISC_DIR) | |
292 | @$(LOG) INSTALL "$(@F)" | |
293 | $(_v)$(INSTALL) $(INSTALL_FLAGS) $(OBJROOT)/trace.codes $@ | |
294 | ||
295 | do_textfiles_install_mi:: $(TRACE_CODES_DEST) | |
296 | ||
297 | include $(MakeInc_rule) | |
298 | include $(MakeInc_dir) |