1 # Copyright (C) 1991, 1992 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
4 # The GNU C Library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Library General Public License
6 # as published by the Free Software Foundation; either version 2 of
7 # the License, or (at your option) any later version.
9 # The GNU C Library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Library General Public License for more details.
14 # You should have received a copy of the GNU Library General Public
15 # License along with the GNU C Library; see the file COPYING.LIB. If
16 # not, write to the Free Software Foundation, Inc., 675 Mass Ave,
17 # Cambridge, MA 02139, USA.
21 distribute = Machrules interface.awk # $(interfaces:%=%.defs)
23 headers = mach_init.h \
25 host_info.h kern_return.h \
26 mach_param.h mach_types.h \
28 message.h mig_errors.h msg_type.h \
29 policy.h port.h processor_info.h \
30 std_types.h task_info.h task_special_ports.h \
31 thread_info.h thread_special_ports.h \
32 thread_status.h thread_switch.h time_value.h \
33 vm_attributes.h vm_inherit.h vm_prot.h \
37 user-interfaces := mach_interface mach_port \
38 mach_host mach_debug \
39 device device_request device_reply \
40 default_pager_object \
43 server-interfaces := __exc
46 user-interfaces = foobar
47 server-interfaces = foobar __foobar
51 routines = $(interface-routines)
52 headers = $(interface-headers)
54 routines := mach_init mach_init_syms \
55 mig_strncpy mig_support msg \
56 mach_traps mach_syscalls mach_shortcuts \
57 mach_msg_destroy mach_msg_server mach_msg_server_timeout \
58 __mach_msg_destroy __mach_msg_server \
66 include mach-shortcuts
67 mach-shortcuts: mach_shortcuts.h
68 (echo 'mach-shortcuts := ' \\ ; \
69 sed -n 's/SHORTCUT[^(]*(\([^,]*\),.*$$/ \1 '\\\\'/p' < $<) > $@
71 # Make the MiG stubs for $(mach-shortcuts) be mig_foo.
73 migdefines := $(migdefines) \
74 $(foreach call,$(mach-shortcuts),-D$(call)=mig_$(call))
78 # There is already a mach.h, so mach.defs generates mach_interface.h.
79 mach_interface.defs: mach.defs
80 ln -s $< $@ || cp $< $@
81 # There is already a memory_object.h,
82 # so memory_object.defs generates memory_object_user.h.
83 memory_object_user.defs: memory_object.defs
84 ln -s $< $@ || cp $< $@