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