Update.
[glibc.git] / sysdeps / unix / sysv / linux / Makefile
blob4e698ce1d860f4aed186e52432b4b923493ef50b
1 ifeq ($(subdir),csu)
2 CFLAGS-init-first.c = -fkeep-inline-functions
4 sysdep_routines += errno-loc
5 endif
7 ifeq ($(subdir),misc)
8 sysdep_routines += sysctl clone llseek
10 sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h sys/mtio.h \
11 sys/module.h sys/io.h sys/klog.h sys/kdaemon.h \
12 sys/user.h syscall-list.h sys/sysmacros.h sys/procfs.h \
13 sys/debugreg.h sys/kd.h sys/soundcard.h sys/vt.h \
14 sys/quota.h
16 # Generate the list of SYS_* macros for the system calls (__NR_* macros).
17 $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/sys/syscall.h
18 rm -f $(@:.h=.d)
19 echo > $(@:.d=.h).new \
20 '/* Generated at libc build time from kernel syscall list. */'
21 SUNPRO_DEPENDENCIES='$(@:.h=.d) $(patsubst $(objpfx)%,$$(objpfx)%,\
22 $(@:.h=.d))' \
23 $(CC) -E -x c $< -D_LIBC -dM | \
24 sed -n >> $(@:.d=.h).new \
25 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p'
26 mv -f $(@:.d=.h).new $(@:.d=.h)
27 # Get the generated list of dependencies (probably /usr/include/asm/unistd.h).
28 -include $(objpfx)syscall-list.d
29 generated += syscall-list.h syscall-list.d
30 endif
32 ifeq ($(subdir),time)
33 sysdep_headers += sys/timex.h
34 endif
36 ifeq ($(subdir),socket)
37 sysdep_headers += sys/socketcall.h net/if.h net/if_ppp.h net/ppp-comp.h \
38 net/ppp_defs.h net/if_arp.h net/route.h net/ethernet.h
39 sysdep_routines += cmsg_nxthdr
40 endif
42 ifeq ($(subdir),sunrpc)
43 sysdep_headers += nfs/nfs.h
44 endif
46 ifeq ($(subdir),termios)
47 sysdep_headers += termio.h sys/kernel_termios.h
48 endif
50 ifeq ($(subdir),stdio-common)
51 # Just disable the auto generation in sysdeps/generic
52 inhibit-siglist := yes
53 endif
55 ifeq ($(subdir),inet)
56 sysdep_headers += netinet/in_systm.h netinet/udp.h \
57 netinet/if_fddi.h netinet/if_tr.h netinet/igmp.h \
58 netinet/ip_fw.h netinet/ip_icmp.h sys/socketvar.h
59 endif
61 # Don't compile the ctype glue code, since there is no old non-GNU C library.
62 inhibit-glue = yes