]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/unix/sysv/linux/Makefile
Update.
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / Makefile
CommitLineData
8d57beea 1ifeq ($(subdir),csu)
39778c6c 2CFLAGS-init-first.c = -fkeep-inline-functions
c6645251
UD
3
4sysdep_routines += errno-loc
39778c6c
UD
5endif
6
92f1da4d
UD
7ifeq ($(subdir),db2)
8CPPFLAGS += -DHAVE_LLSEEK=1
9endif
10
8d57beea 11ifeq ($(subdir),misc)
da2d1bc5 12sysdep_routines += sysctl clone llseek getresuid getresgid
84724245 13
84384f5b 14sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h sys/mtio.h \
04be94a8 15 sys/io.h sys/klog.h sys/kdaemon.h \
cc3fa755 16 sys/user.h sys/sysmacros.h sys/procfs.h sys/prctl.h \
1fb05e3d 17 sys/debugreg.h sys/kd.h sys/soundcard.h sys/vt.h \
a5a0310d 18 sys/quota.h sys/fsuid.h bits/mman.h \
cbdee279 19 scsi/sg.h sys/pci.h sys/ultrasound.h
f127cd28 20
cd6ede75
UD
21install-others += $(inst_includedir)/bits/syscall.h
22
f127cd28 23# Generate the list of SYS_* macros for the system calls (__NR_* macros).
df4ef2ab 24$(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/sys/syscall.h
f127cd28
RM
25 rm -f $(@:.h=.d)
26 echo > $(@:.d=.h).new \
27 '/* Generated at libc build time from kernel syscall list. */'
28 SUNPRO_DEPENDENCIES='$(@:.h=.d) $(patsubst $(objpfx)%,$$(objpfx)%,\
d705269e 29 $(@:.d=.h) $(@:.h=.d))' \
f127cd28
RM
30 $(CC) -E -x c $< -D_LIBC -dM | \
31 sed -n >> $(@:.d=.h).new \
32 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p'
33 mv -f $(@:.d=.h).new $(@:.d=.h)
cd6ede75
UD
34
35$(inst_includedir)/bits/syscall.h: $(objpfx)syscall-list.h
36 $(make-target-directory)
37 if test -r $@ && cmp -s $< $@; \
38 then echo 'bits/syscall.h unchanged'; \
39 else $(INSTALL_DATA) $< $@; fi
40
d705269e 41ifndef no_deps
f127cd28
RM
42# Get the generated list of dependencies (probably /usr/include/asm/unistd.h).
43-include $(objpfx)syscall-list.d
d705269e 44endif
f127cd28 45generated += syscall-list.h syscall-list.d
d2f5be2a
UD
46endif
47
8d57beea 48ifeq ($(subdir),time)
dfe1754a 49sysdep_headers += sys/timex.h
d2f5be2a
UD
50endif
51
8d57beea 52ifeq ($(subdir),socket)
5107cf1d 53sysdep_headers += net/if.h net/if_ppp.h net/ppp-comp.h \
d705269e 54 net/ppp_defs.h net/if_arp.h net/route.h net/ethernet.h \
6973fc01 55 net/if_slip.h net/if_packet.h
c0e45674 56sysdep_routines += cmsg_nxthdr
8f5ca04b
RM
57endif
58
8d57beea 59ifeq ($(subdir),sunrpc)
dfe1754a 60sysdep_headers += nfs/nfs.h
57aefafe
RM
61endif
62
8d57beea 63ifeq ($(subdir),termios)
5107cf1d 64sysdep_headers += termio.h
80791291
RM
65endif
66
8d57beea 67ifeq ($(subdir),stdio-common)
46ec036d
UD
68# Just disable the auto generation in sysdeps/generic
69inhibit-siglist := yes
bd355af0
UD
70
71ifeq ($(versioning),yes)
b9b49b44 72sysdep_routines += oldsiglist
bd355af0
UD
73endif
74
75shared-only-routines += oldsiglist
46ec036d
UD
76endif
77
8d57beea 78ifeq ($(subdir),inet)
26dee9c4 79sysdep_headers += netinet/in_systm.h netinet/udp.h \
1fb05e3d 80 netinet/if_fddi.h netinet/if_tr.h netinet/igmp.h \
714a562f 81 netinet/ip_fw.h netinet/ip_icmp.h netipx/ipx.h \
6591c335
UD
82 sys/socketvar.h netax25/ax25.h netrom/netrom.h \
83 netrose/rose.h
a401eea9
UD
84endif
85
af6f3906
UD
86ifeq ($(subdir),posix)
87sysdep_routines += s_pread64 s_pwrite64
88endif
89
93995795
RM
90# Don't compile the ctype glue code, since there is no old non-GNU C library.
91inhibit-glue = yes
d705269e
UD
92
93# Tell sysdeps/posix/Makefile that we create stdio_lim.h differently.
94inhibit-stdio_lim = yes
95
36775c3b 96$(common-objpfx)bits/stdio_%.h $(common-objpfx)bits/stdio_%.d: \
d705269e
UD
97 $(..)sysdeps/unix/sysv/linux/stdio_%.h.in
98 rm -f $(@:.h=.d) $(@:.d=.h)-t
99 echo '#include <linux/limits.h>' | \
100 SUNPRO_DEPENDENCIES='$(@:.h=.d) \
101 $(patsubst $(common-objpfx)%,$$(common-objpfx)%,\
102 $(@:.d=.h) $(@:.h=.d))' \
103 $(CC) -E -dM - > $(@:.d=.h)-t
104 fopen_max=`sed -n 's/^#define OPEN_MAX //p' $(@:.d=.h)-t`; \
105 filename_max=`sed -n 's/^#define PATH_MAX //p' $(@:.d=.h)-t`; \
106 if test -n "$$fopen_max" && test -n "$$filename_max"; then \
107 sed -e "s/DEFAULT_FOPEN_MAX/$$fopen_max/" \
108 -e "s/DEFAULT_FILENAME_MAX/$$filename_max/" $< \
109 > $(@:.d=.h).new && \
110 mv -f $(@:.d=.h).new $(@:.d=.h); \
111 else exit 1; fi
112# Remove this last so that it can be examined if something went wrong.
113 rm -f $(@:.d=.h)-t
114ifndef no_deps
115# Get the list of dependencies (probably /usr/include/linux/limits.h).
36775c3b 116-include $(common-objpfx)bits/stdio_lim.d
d705269e 117endif
cbdee279
UD
118
119ifeq ($(subdir),signal)
120sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \
bd355af0 121 rt_sigqueueinfo rt_sigaction rt_sigpending
cbdee279
UD
122endif
123
9756dfe1
UD
124ifeq ($(subdir),dirent)
125sysdep_routines += getdents64
126endif
127
9931ba24
UD
128ifeq ($(subdir),nis)
129CFLAGS-ypclnt.c = -DUSE_BINDINGDIR=1
130endif
131
36775c3b 132common-generated += bits/stdio_lim.h bits/stdio_lim.d