blob: 1e7d808ea8648f73ef8568948c9f76ddf70f3b5e [file] [log] [blame]
xf.libdd93d52023-05-12 07:10:14 -07001# Copyright (C) 1991-2016 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# <http://www.gnu.org/licenses/>.
17
18subdir := hurd
19
20include ../Makeconfig
21
22headers = hurd.h $(interface-headers) \
23 $(addprefix hurd/,fd.h id.h port.h signal.h sigpreempt.h ioctl.h\
24 userlink.h resource.h threadvar.h lookup.h)
25
26inline-headers = hurd.h $(addprefix hurd/,fd.h signal.h \
27 userlink.h threadvar.h port.h)
28
29# The RPC interfaces go in a separate library.
30interface-library := libhurduser
31user-interfaces := $(addprefix hurd/,\
32 auth startup \
33 process process_request \
34 msg msg_reply msg_request \
35 exec exec_startup crash interrupt \
36 fs fsys io term tioctl socket ifsock \
37 login password pfinet \
38 )
39server-interfaces := hurd/msg faultexc
40
41routines = hurdstartup hurdinit \
42 hurdid hurdpid hurdrlimit hurdprio hurdexec hurdselect \
43 hurdlookup lookup-retry lookup-at \
44 get-host set-host \
45 path-lookup \
46 setauth \
47 pid2task task2pid \
48 geteuids seteuids getumask fchroot \
49 hurdsock hurdauth \
50 hurdchdir hurdfchdir \
51 privports \
52 msgportdemux \
53 fopenport \
54 vpprintf \
55 ports-get ports-set hurdports hurdmsg \
56 errno-loc \
57 $(sig) $(dtable) $(inlines) port-cleanup report-wait xattr
58sig = hurdsig hurdfault siginfo hurd-raise preempt-sig \
59 trampoline longjmp-ts catch-exc exc2signal hurdkill sigunwind \
60 thread-self thread-cancel intr-msg catch-signal
61dtable = dtable port2fd new-fd alloc-fd intern-fd \
62 getdport openport \
63 fd-close fd-read fd-write hurdioctl ctty-input ctty-output
64inlines = $(inline-headers:%.h=%-inlines)
65
66# XXX this is a temporary hack; see hurdmalloc.h
67routines += hurdmalloc
68
69# Binary compatibility for libc.so.0.2[GLIBC_2.0].
70ifeq ($(build-shared),yes)
71routines += compat-20
72endif
73
74shared-only-routines = compat-20
75
76# For each of the $(inline-headers), generate a trivial source
77# file that will #include it to define its inline functions as real functions.
78$(inlines:%=$(objpfx)%.c): $(objpfx)%-inlines.c: %.h
79 (h="`echo $(subst /,_,$*) | tr '[a-z]' '[A-Z]'`"; \
80 echo "#define _$${h}_H_EXTERN_INLINE /* Define real function. */"; \
81 echo '#include "$<"') > $@-new
82 mv -f $@-new $@
83generated += $(inlines:=.c)
84
85include ../mach/Machrules
86include ../Rules
87
88# intr-rpc.defs defines the INTR_INTERFACE macro to make the generated RPC
89# stubs import <hurd/signal.h> and #define __mach_msg to
90# _hurd_intr_rpc_mach_msg.
91user-MIGFLAGS += -imacros intr-rpc.defs
92
93# The special exc server for sigthread faults uses a special prefix.
94MIGFLAGS-faultexc = -prefix _hurdsig_fault_
95
96# We need this static dependency to get faultexc.h generated the first time.
97$(objpfx)hurdfault.o $(objpfx)hurdfault.d: \
98 $(objpfx)faultexc_server.h $(objpfx)faultexc_server.c