Hurd: Fix port deallocation on mknod error.
[glibc.git] / hurd / Makefile
blob321e04ef13878b06a640d932872df24dab58a890
1 # Copyright (C) 1991,92,93,94,95,96,97,98,99,2001,2002,2004,2006,2012
2 # Free Software Foundation, Inc.
3 # This file is part of the GNU C Library.
5 # The GNU C Library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License, or (at your option) any later version.
10 # The GNU C Library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with the GNU C Library; if not, see
17 # <http://www.gnu.org/licenses/>.
19 subdir := hurd
21 all:
23 # Some things below (but before including Rules) use configuration variables.
24 include ../Makeconfig
27 headers = hurd.h $(interface-headers) \
28 $(addprefix hurd/,fd.h id.h port.h signal.h sigpreempt.h ioctl.h\
29 userlink.h resource.h threadvar.h lookup.h)
31 inline-headers = hurd.h $(addprefix hurd/,fd.h signal.h \
32 userlink.h threadvar.h port.h)
34 # The RPC interfaces go in a separate library.
35 interface-library := libhurduser
36 user-interfaces := $(addprefix hurd/,\
37 auth startup \
38 process process_request \
39 msg msg_reply msg_request \
40 exec exec_startup crash interrupt \
41 fs fsys io term tioctl socket ifsock \
42 login password pfinet \
44 server-interfaces := hurd/msg faultexc
46 routines = hurdstartup hurdinit \
47 hurdid hurdpid hurdrlimit hurdprio hurdexec hurdselect \
48 hurdlookup lookup-retry lookup-at \
49 get-host set-host \
50 path-lookup \
51 setauth \
52 pid2task task2pid \
53 geteuids seteuids getumask fchroot \
54 hurdsock hurdauth \
55 hurdchdir hurdfchdir \
56 privports \
57 msgportdemux \
58 fopenport \
59 vpprintf \
60 ports-get ports-set hurdports hurdmsg \
61 errno-loc \
62 $(sig) $(dtable) $(inlines) port-cleanup report-wait xattr
63 sig = hurdsig hurdfault siginfo hurd-raise preempt-sig \
64 trampoline longjmp-ts catch-exc exc2signal hurdkill sigunwind \
65 thread-self thread-cancel intr-msg catch-signal
66 dtable = dtable port2fd new-fd alloc-fd intern-fd \
67 getdport openport \
68 fd-close fd-read fd-write hurdioctl ctty-input ctty-output
69 inlines = $(inline-headers:%.h=%-inlines)
71 # XXX this is a temporary hack; see hurdmalloc.h
72 routines += hurdmalloc
74 # Binary compatibility for libc.so.0.2[GLIBC_2.0].
75 ifeq ($(versioning),yes)
76 routines += compat-20
77 endif
79 shared-only-routines = compat-20
81 # For each of the $(inline-headers), generate a trivial source
82 # file that will #include it to define its inline functions as real functions.
83 $(inlines:%=$(objpfx)%.c): $(objpfx)%-inlines.c: %.h
84 (h="`echo $(subst /,_,$*) | tr '[a-z]' '[A-Z]'`"; \
85 echo "#define _$${h}_H_EXTERN_INLINE /* Define real function. */"; \
86 echo '#include "$<"') > $@-new
87 mv -f $@-new $@
88 generated += $(inlines:=.c)
90 include ../mach/Machrules
91 include ../Rules
93 # intr-rpc.defs defines the INTR_INTERFACE macro to make the generated RPC
94 # stubs import <hurd/signal.h> and #define __mach_msg to
95 # _hurd_intr_rpc_mach_msg.
96 user-MIGFLAGS += -imacros intr-rpc.defs
98 # The special exc server for sigthread faults uses a special prefix.
99 MIGFLAGS-faultexc = -prefix _hurdsig_fault_
101 # We need this static dependency to get faultexc.h generated the first time.
102 $(objpfx)hurdfault.o $(objpfx)hurdfault.d: \
103 $(objpfx)faultexc_server.h $(objpfx)faultexc_server.c