]>
Commit | Line | Data |
---|---|---|
1 | # Copyright (C) 1991-2024 Free Software Foundation, Inc. | |
2 | # This file is part of the GNU C Library. | |
3 | ||
4 | # The GNU C Library is free software; you can redistribute it and/or | |
5 | # modify it under the terms of the GNU Lesser General Public | |
6 | # License as published by the Free Software Foundation; either | |
7 | # version 2.1 of the License, or (at your option) any later version. | |
8 | ||
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 | # Lesser General Public License for more details. | |
13 | ||
14 | # You should have received a copy of the GNU Lesser General Public | |
15 | # License along with the GNU C Library; if not, see | |
16 | # <https://www.gnu.org/licenses/>. | |
17 | ||
18 | subdir := hurd | |
19 | ||
20 | include ../Makeconfig | |
21 | ||
22 | headers = \ | |
23 | $(interface-headers) \ | |
24 | hurd.h \ | |
25 | hurd/fd.h \ | |
26 | hurd/id.h \ | |
27 | hurd/ioctl.h \ | |
28 | hurd/lookup.h \ | |
29 | hurd/port.h \ | |
30 | hurd/resource.h \ | |
31 | hurd/signal.h \ | |
32 | hurd/sigpreempt.h \ | |
33 | hurd/userlink.h \ | |
34 | # headers | |
35 | ||
36 | inline-headers = \ | |
37 | hurd.h \ | |
38 | hurd/fd.h \ | |
39 | hurd/port.h \ | |
40 | hurd/signal.h \ | |
41 | hurd/userlink.h \ | |
42 | # inline-headers | |
43 | ||
44 | # The RPC interfaces go in a separate library. | |
45 | interface-library := libhurduser | |
46 | user-interfaces := \ | |
47 | hurd/auth \ | |
48 | hurd/crash \ | |
49 | hurd/exec \ | |
50 | hurd/exec_startup \ | |
51 | hurd/fs \ | |
52 | hurd/fsys \ | |
53 | hurd/ifsock \ | |
54 | hurd/interrupt \ | |
55 | hurd/io \ | |
56 | hurd/io_reply \ | |
57 | hurd/io_request \ | |
58 | hurd/login \ | |
59 | hurd/msg \ | |
60 | hurd/msg_reply \ | |
61 | hurd/msg_request \ | |
62 | hurd/password \ | |
63 | hurd/pci \ | |
64 | hurd/pfinet \ | |
65 | hurd/process \ | |
66 | hurd/process_request \ | |
67 | hurd/socket \ | |
68 | hurd/startup \ | |
69 | hurd/term \ | |
70 | hurd/tioctl \ | |
71 | # user-interfaces | |
72 | ||
73 | server-interfaces := \ | |
74 | faultexc \ | |
75 | hurd/msg \ | |
76 | # server-interfaces | |
77 | ||
78 | routines = \ | |
79 | $(dtable) \ | |
80 | $(inlines) \ | |
81 | $(sig) \ | |
82 | errno-loc \ | |
83 | fchroot \ | |
84 | fd-cleanup \ | |
85 | fopenport \ | |
86 | get-host \ | |
87 | geteuids \ | |
88 | getumask \ | |
89 | hurdauth \ | |
90 | hurdchdir \ | |
91 | hurdexec \ | |
92 | hurdfchdir \ | |
93 | hurdid \ | |
94 | hurdinit \ | |
95 | hurdlock \ | |
96 | hurdlookup \ | |
97 | hurdmsg \ | |
98 | hurdpid \ | |
99 | hurdports \ | |
100 | hurdprio \ | |
101 | hurdrlimit \ | |
102 | hurdselect \ | |
103 | hurdsock \ | |
104 | hurdstartup \ | |
105 | lookup-at \ | |
106 | lookup-retry \ | |
107 | msgportdemux \ | |
108 | path-lookup \ | |
109 | pid2task \ | |
110 | port-cleanup \ | |
111 | ports-get \ | |
112 | ports-set \ | |
113 | privports \ | |
114 | report-wait \ | |
115 | set-host \ | |
116 | setauth \ | |
117 | seteuids \ | |
118 | task2pid \ | |
119 | vpprintf \ | |
120 | xattr \ | |
121 | # routines | |
122 | sig = \ | |
123 | catch-exc \ | |
124 | catch-signal \ | |
125 | exc2signal \ | |
126 | hurd-raise \ | |
127 | hurdfault \ | |
128 | hurdkill \ | |
129 | hurdsig \ | |
130 | intr-msg \ | |
131 | longjmp-ts \ | |
132 | preempt-sig \ | |
133 | siginfo \ | |
134 | sigunwind \ | |
135 | thread-cancel \ | |
136 | thread-self \ | |
137 | trampoline \ | |
138 | # sig | |
139 | dtable = \ | |
140 | alloc-fd \ | |
141 | ctty-input \ | |
142 | ctty-output \ | |
143 | dtable \ | |
144 | fd-close \ | |
145 | fd-read \ | |
146 | fd-write \ | |
147 | getdport \ | |
148 | hurdioctl \ | |
149 | intern-fd \ | |
150 | new-fd \ | |
151 | openport \ | |
152 | port2fd \ | |
153 | # dtable | |
154 | inlines = $(inline-headers:%.h=%-inlines) | |
155 | ||
156 | # XXX this is a temporary hack; see hurdmalloc.h | |
157 | routines += hurdmalloc | |
158 | ||
159 | # Binary compatibility for libc.so.0.2[GLIBC_2.0]. | |
160 | ifeq ($(build-shared),yes) | |
161 | routines += compat-20 | |
162 | endif | |
163 | ||
164 | shared-only-routines = compat-20 | |
165 | ||
166 | # For each of the $(inline-headers), generate a trivial source | |
167 | # file that will #include it to define its inline functions as real functions. | |
168 | $(inlines:%=$(objpfx)%.c): $(objpfx)%-inlines.c: %.h | |
169 | (h="`echo $(subst /,_,$*) | tr '[a-z]' '[A-Z]'`"; \ | |
170 | echo "#define _$${h}_H_EXTERN_INLINE /* Define real function. */"; \ | |
171 | echo "#define _$${h}_H_HIDDEN_DEF /* Declare hidden definition. */"; \ | |
172 | echo '#include "$<"') > $@-new | |
173 | mv -f $@-new $@ | |
174 | generated += $(inlines:=.c) | |
175 | ||
176 | # Avoid ssp before TLS is initialized. | |
177 | CFLAGS-hurdstartup.o = $(no-stack-protector) | |
178 | CFLAGS-RPC_exec_startup_get_info.o = $(no-stack-protector) | |
179 | ||
180 | # Make it simpler to unwind over INTR_MSG_TRAP | |
181 | CFLAGS-intr-msg.o = -fno-omit-frame-pointer | |
182 | CFLAGS-intr-msg.os = -fno-omit-frame-pointer | |
183 | \f | |
184 | # Make generated headers compatible with all support standards | |
185 | migheaderpipe := | sed -e 's/\<ino64_t\>/__ino64_t/' -e 's/\<loff_t\>/__loff_t/' | |
186 | include ../mach/Machrules | |
187 | libhurduser-routines += RPC_gsync_wait_intr | |
188 | include ../Rules | |
189 | \f | |
190 | # intr-rpc.defs defines the INTR_INTERFACE macro to make the generated RPC | |
191 | # stubs import <hurd/signal.h> and #define __mach_msg to | |
192 | # _hurd_intr_rpc_mach_msg. | |
193 | user-MIGFLAGS += -imacros intr-rpc.defs | |
194 | ||
195 | # The special exc server for sigthread faults uses a special prefix. | |
196 | MIGFLAGS-faultexc = -prefix _hurdsig_fault_ | |
197 | ||
198 | # We need this static dependency to get faultexc.h generated the first time. | |
199 | $(objpfx)hurdfault.o $(objpfx)hurdfault.d: \ | |
200 | $(objpfx)faultexc_server.h $(objpfx)faultexc_server.c |