Update.
[glibc.git] / sysdeps / unix / sysv / linux / Makefile
blob99950086e7e936a9e8c00ae0892eb216fbb78608
1 ifeq ($(subdir),csu)
2 sysdep_routines += errno-loc
3 endif
5 ifeq ($(subdir),db2)
6 CPPFLAGS += -DHAVE_LLSEEK=1
7 endif
9 ifeq ($(subdir),malloc)
10 CFLAGS-malloc.c = -DMORECORE_CLEARS=2
11 endif
13 ifeq ($(subdir),misc)
14 sysdep_routines += sysctl clone llseek getresuid getresgid umount umount2 \
15 readahead
17 sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \
18 sys/klog.h sys/kdaemon.h \
19 sys/user.h sys/procfs.h sys/prctl.h \
20 sys/kd.h sys/soundcard.h sys/vt.h \
21 sys/quota.h sys/fsuid.h \
22 scsi/sg.h scsi/scsi.h scsi/scsi_ioctl.h sys/pci.h \
23 sys/ultrasound.h sys/sendfile.h sys/raw.h
25 install-others += $(inst_includedir)/bits/syscall.h
27 ifndef no_syscall_list_h
28 # Generate the list of SYS_* macros for the system calls (__NR_* macros).
29 $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/sys/syscall.h
30 rm -f $(@:.h=.d)-t
31 { \
32 echo '/* Generated at libc build time from kernel syscall list. */';\
33 echo ''; \
34 echo '#ifndef _SYSCALL_H'; \
35 echo '# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."'; \
36 echo '#endif'; \
37 echo ''; \
38 SUNPRO_DEPENDENCIES='$(@:.h=.d)-t $@' \
39 $(CC) -E -x c $(sysincludes) $< -D_LIBC -dM | \
40 sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p'; \
41 } > $(@:.d=.h).new
42 mv -f $(@:.d=.h).new $(@:.d=.h)
43 sed < $(@:.h=.d)-t > $(@:.h=.d)-t2 \
44 -e 's,$(subst .,\.,$@),$(patsubst $(objpfx)%,$$(objpfx)%,\
45 $(@:.d=.h) $(@:.h=.d)),'
46 rm -f $(@:.h=.d)-t
47 mv -f $(@:.h=.d)-t2 $(@:.h=.d)
48 endif
50 $(inst_includedir)/bits/syscall.h: $(objpfx)syscall-list.h $(+force)
51 $(make-target-directory)
52 if test -r $@ && cmp -s $< $@; \
53 then echo 'bits/syscall.h unchanged'; \
54 else $(INSTALL_DATA) $< $@; fi
56 ifndef no_deps
57 # Get the generated list of dependencies (probably /usr/include/asm/unistd.h).
58 -include $(objpfx)syscall-list.d
59 endif
60 generated += syscall-list.h syscall-list.d
61 endif
63 ifeq ($(subdir),time)
64 sysdep_headers += sys/timex.h
66 sysdep_routines += ntp_gettime
67 endif
69 ifeq ($(subdir),socket)
70 sysdep_headers += net/if_ppp.h net/ppp-comp.h \
71 net/ppp_defs.h net/if_arp.h net/route.h net/ethernet.h \
72 net/if_slip.h net/if_packet.h net/if_shaper.h
73 sysdep_routines += cmsg_nxthdr sa_len
74 endif
76 ifeq ($(subdir),sunrpc)
77 sysdep_headers += nfs/nfs.h
78 endif
80 ifeq ($(subdir),termios)
81 sysdep_headers += termio.h
82 endif
84 ifeq ($(subdir),stdio-common)
85 # Just disable the auto generation in sysdeps/generic
86 inhibit-siglist := yes
87 endif
89 ifeq ($(subdir),posix)
90 sysdep_headers += bits/pthreadtypes.h bits/initspin.h
91 endif
93 ifeq ($(subdir),inet)
94 sysdep_headers += netinet/if_fddi.h netinet/if_tr.h netinet/igmp.h \
95 netipx/ipx.h netash/ash.h netax25/ax25.h netatalk/at.h \
96 netrom/netrom.h netpacket/packet.h netrose/rose.h \
97 neteconet/ec.h
98 endif
100 # Don't compile the ctype glue code, since there is no old non-GNU C library.
101 inhibit-glue = yes
103 ifeq ($(subdir),dirent)
104 sysdep_routines += getdirentries getdirentries64
105 endif
107 ifeq ($(subdir),nis)
108 CFLAGS-ypclnt.c = -DUSE_BINDINGDIR=1
109 endif
111 ifeq ($(subdir),elf)
112 sysdep-rtld-routines += dl-brk dl-sbrk
113 endif