]> 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)
c6645251 12sysdep_routines += sysctl clone llseek
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)
72aux += oldsiglist
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
UD
81 netinet/ip_fw.h netinet/ip_icmp.h netipx/ipx.h \
82 sys/socketvar.h
a401eea9
UD
83endif
84
af6f3906
UD
85ifeq ($(subdir),posix)
86sysdep_routines += s_pread64 s_pwrite64
87endif
88
93995795
RM
89# Don't compile the ctype glue code, since there is no old non-GNU C library.
90inhibit-glue = yes
d705269e
UD
91
92# Tell sysdeps/posix/Makefile that we create stdio_lim.h differently.
93inhibit-stdio_lim = yes
94
36775c3b 95$(common-objpfx)bits/stdio_%.h $(common-objpfx)bits/stdio_%.d: \
d705269e
UD
96 $(..)sysdeps/unix/sysv/linux/stdio_%.h.in
97 rm -f $(@:.h=.d) $(@:.d=.h)-t
98 echo '#include <linux/limits.h>' | \
99 SUNPRO_DEPENDENCIES='$(@:.h=.d) \
100 $(patsubst $(common-objpfx)%,$$(common-objpfx)%,\
101 $(@:.d=.h) $(@:.h=.d))' \
102 $(CC) -E -dM - > $(@:.d=.h)-t
103 fopen_max=`sed -n 's/^#define OPEN_MAX //p' $(@:.d=.h)-t`; \
104 filename_max=`sed -n 's/^#define PATH_MAX //p' $(@:.d=.h)-t`; \
105 if test -n "$$fopen_max" && test -n "$$filename_max"; then \
106 sed -e "s/DEFAULT_FOPEN_MAX/$$fopen_max/" \
107 -e "s/DEFAULT_FILENAME_MAX/$$filename_max/" $< \
108 > $(@:.d=.h).new && \
109 mv -f $(@:.d=.h).new $(@:.d=.h); \
110 else exit 1; fi
111# Remove this last so that it can be examined if something went wrong.
112 rm -f $(@:.d=.h)-t
113ifndef no_deps
114# Get the list of dependencies (probably /usr/include/linux/limits.h).
36775c3b 115-include $(common-objpfx)bits/stdio_lim.d
d705269e 116endif
cbdee279
UD
117
118ifeq ($(subdir),signal)
119sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \
bd355af0 120 rt_sigqueueinfo rt_sigaction rt_sigpending
cbdee279
UD
121endif
122
36775c3b 123common-generated += bits/stdio_lim.h bits/stdio_lim.d