1 # Copyright (C) 1991-2013 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 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.
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.
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/>.
22 # Some things below (but before including Rules) use configuration variables.
26 headers
= hurd.h
$(interface-headers
) \
27 $(addprefix hurd
/,fd.h id.h port.h signal.h sigpreempt.h ioctl.h\
28 userlink.h resource.h threadvar.h lookup.h
)
30 inline-headers
= hurd.h
$(addprefix hurd
/,fd.h signal.h \
31 userlink.h threadvar.h port.h
)
33 # The RPC interfaces go in a separate library.
34 interface-library
:= libhurduser
35 user-interfaces
:= $(addprefix hurd
/,\
37 process process_request \
38 msg msg_reply msg_request \
39 exec exec_startup crash interrupt \
40 fs fsys io term tioctl socket ifsock \
41 login password pfinet \
43 server-interfaces
:= hurd
/msg faultexc
45 routines
= hurdstartup hurdinit \
46 hurdid hurdpid hurdrlimit hurdprio hurdexec hurdselect \
47 hurdlookup lookup-retry lookup-at \
52 geteuids seteuids getumask fchroot \
54 hurdchdir hurdfchdir \
59 ports-get ports-set hurdports hurdmsg \
61 $(sig
) $(dtable
) $(inlines
) port-cleanup report-wait xattr
62 sig
= hurdsig hurdfault siginfo hurd-raise preempt-sig \
63 trampoline longjmp-ts catch-exc exc2signal hurdkill sigunwind \
64 thread-self thread-cancel intr-msg catch-signal
65 dtable
= dtable port2fd new-fd alloc-fd intern-fd \
67 fd-close fd-read fd-write hurdioctl ctty-input ctty-output
68 inlines
= $(inline-headers
:%.h
=%-inlines
)
70 # XXX this is a temporary hack; see hurdmalloc.h
71 routines
+= hurdmalloc
73 # Binary compatibility for libc.so.0.2[GLIBC_2.0].
74 ifeq ($(versioning
),yes
)
78 shared-only-routines
= compat-20
80 # For each of the $(inline-headers), generate a trivial source
81 # file that will #include it to define its inline functions as real functions.
82 $(inlines
:%=$(objpfx
)%.c
): $(objpfx
)%-inlines.c
: %.h
83 (h
="`echo $(subst /,_,$*) | tr '[a-z]' '[A-Z]'`"; \
84 echo
"#define _$${h}_H_EXTERN_INLINE /* Define real function. */"; \
85 echo
'#include "$<"') > $@
-new
87 generated
+= $(inlines
:=.c
)
89 include ..
/mach
/Machrules
92 # intr-rpc.defs defines the INTR_INTERFACE macro to make the generated RPC
93 # stubs import <hurd/signal.h> and #define __mach_msg to
94 # _hurd_intr_rpc_mach_msg.
95 user-MIGFLAGS
+= -imacros intr-rpc.defs
97 # The special exc server for sigthread faults uses a special prefix.
98 MIGFLAGS-faultexc
= -prefix _hurdsig_fault_
100 # We need this static dependency to get faultexc.h generated the first time.
101 $(objpfx
)hurdfault.o
$(objpfx
)hurdfault.d
: \
102 $(objpfx
)faultexc_server.h
$(objpfx
)faultexc_server.c