]>
Commit | Line | Data |
---|---|---|
8d57beea | 1 | ifeq ($(subdir),csu) |
39778c6c | 2 | CFLAGS-init-first.c = -fkeep-inline-functions |
c6645251 UD |
3 | |
4 | sysdep_routines += errno-loc | |
39778c6c UD |
5 | endif |
6 | ||
92f1da4d UD |
7 | ifeq ($(subdir),db2) |
8 | CPPFLAGS += -DHAVE_LLSEEK=1 | |
9 | endif | |
10 | ||
8d57beea | 11 | ifeq ($(subdir),misc) |
da2d1bc5 | 12 | sysdep_routines += sysctl clone llseek getresuid getresgid |
84724245 | 13 | |
84384f5b | 14 | sysdep_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 \ |
bc526b60 | 19 | scsi/sg.h scsi/scsi.h sys/pci.h sys/ultrasound.h |
f127cd28 | 20 | |
cd6ede75 UD |
21 | install-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 | 25 | rm -f $(@:.h=.d) |
9afc8a59 UD |
26 | { \ |
27 | echo '/* Generated at libc build time from kernel syscall list. */';\ | |
28 | echo ''; \ | |
29 | echo '#ifndef _SYSCALL_H'; \ | |
30 | echo '# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."'; \ | |
31 | echo '#endif'; \ | |
32 | echo ''; \ | |
33 | SUNPRO_DEPENDENCIES='$(@:.h=.d) $(patsubst $(objpfx)%,$$(objpfx)%,\ | |
34 | $(@:.d=.h) $(@:.h=.d))' \ | |
35 | $(CC) -E -x c $< -D_LIBC -dM | \ | |
36 | sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p'; \ | |
37 | } > $(@:.d=.h).new | |
f127cd28 | 38 | mv -f $(@:.d=.h).new $(@:.d=.h) |
cd6ede75 | 39 | |
73237de3 | 40 | $(inst_includedir)/bits/syscall.h: $(objpfx)syscall-list.h $(+force) |
cd6ede75 UD |
41 | $(make-target-directory) |
42 | if test -r $@ && cmp -s $< $@; \ | |
43 | then echo 'bits/syscall.h unchanged'; \ | |
44 | else $(INSTALL_DATA) $< $@; fi | |
45 | ||
d705269e | 46 | ifndef no_deps |
f127cd28 RM |
47 | # Get the generated list of dependencies (probably /usr/include/asm/unistd.h). |
48 | -include $(objpfx)syscall-list.d | |
d705269e | 49 | endif |
f127cd28 | 50 | generated += syscall-list.h syscall-list.d |
d2f5be2a UD |
51 | endif |
52 | ||
8d57beea | 53 | ifeq ($(subdir),time) |
dfe1754a | 54 | sysdep_headers += sys/timex.h |
d2f5be2a UD |
55 | endif |
56 | ||
8d57beea | 57 | ifeq ($(subdir),socket) |
5107cf1d | 58 | sysdep_headers += net/if.h net/if_ppp.h net/ppp-comp.h \ |
d705269e | 59 | net/ppp_defs.h net/if_arp.h net/route.h net/ethernet.h \ |
6973fc01 | 60 | net/if_slip.h net/if_packet.h |
4bca4c17 | 61 | sysdep_routines += cmsg_nxthdr sa_len |
8f5ca04b RM |
62 | endif |
63 | ||
8d57beea | 64 | ifeq ($(subdir),sunrpc) |
dfe1754a | 65 | sysdep_headers += nfs/nfs.h |
57aefafe RM |
66 | endif |
67 | ||
8d57beea | 68 | ifeq ($(subdir),termios) |
5107cf1d | 69 | sysdep_headers += termio.h |
80791291 RM |
70 | endif |
71 | ||
8d57beea | 72 | ifeq ($(subdir),stdio-common) |
46ec036d UD |
73 | # Just disable the auto generation in sysdeps/generic |
74 | inhibit-siglist := yes | |
75 | endif | |
76 | ||
8d57beea | 77 | ifeq ($(subdir),inet) |
26dee9c4 | 78 | sysdep_headers += netinet/in_systm.h netinet/udp.h \ |
1fb05e3d | 79 | netinet/if_fddi.h netinet/if_tr.h netinet/igmp.h \ |
714a562f | 80 | netinet/ip_fw.h netinet/ip_icmp.h netipx/ipx.h \ |
6591c335 | 81 | sys/socketvar.h netax25/ax25.h netrom/netrom.h \ |
31161268 | 82 | netrose/rose.h netpacket/packet.h netash/ash.h |
a401eea9 UD |
83 | endif |
84 | ||
af6f3906 UD |
85 | ifeq ($(subdir),posix) |
86 | sysdep_routines += s_pread64 s_pwrite64 | |
87 | endif | |
88 | ||
93995795 RM |
89 | # Don't compile the ctype glue code, since there is no old non-GNU C library. |
90 | inhibit-glue = yes | |
d705269e UD |
91 | |
92 | # Tell sysdeps/posix/Makefile that we create stdio_lim.h differently. | |
93 | inhibit-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 | |
113 | ifndef no_deps | |
114 | # Get the list of dependencies (probably /usr/include/linux/limits.h). | |
36775c3b | 115 | -include $(common-objpfx)bits/stdio_lim.d |
d705269e | 116 | endif |
cbdee279 UD |
117 | |
118 | ifeq ($(subdir),signal) | |
119 | sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \ | |
bd355af0 | 120 | rt_sigqueueinfo rt_sigaction rt_sigpending |
cbdee279 UD |
121 | endif |
122 | ||
9756dfe1 UD |
123 | ifeq ($(subdir),dirent) |
124 | sysdep_routines += getdents64 | |
125 | endif | |
126 | ||
9931ba24 UD |
127 | ifeq ($(subdir),nis) |
128 | CFLAGS-ypclnt.c = -DUSE_BINDINGDIR=1 | |
129 | endif | |
130 | ||
36775c3b | 131 | common-generated += bits/stdio_lim.h bits/stdio_lim.d |