update from main archive 970201
[glibc.git] / sysdeps / unix / sysv / linux / Makefile
blobe02ee8cfe471be4f26d7bda5fcdbbcd5d1ab3693
1 ifeq ($(subdir),csu)
2 CFLAGS-init-first.c = -fkeep-inline-functions
4 sysdep_routines += errno-loc
5 endif
7 ifeq ($(subdir),misc)
8 sysdep_routines += sysctl clone llseek
10 sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h sys/mtio.h \
11 sys/module.h sys/io.h sys/klog.h sys/kdaemon.h \
12 sys/user.h syscall-list.h sys/sysmacros.h sys/procfs.h \
13 sys/debugreg.h sys/kd.h sys/soundcard.h sys/vt.h
15 # Generate the list of SYS_* macros for the system calls (__NR_* macros).
16 $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/sys/syscall.h
17 rm -f $(@:.h=.d)
18 echo > $(@:.d=.h).new \
19 '/* Generated at libc build time from kernel syscall list. */'
20 SUNPRO_DEPENDENCIES='$(@:.h=.d) $(patsubst $(objpfx)%,$$(objpfx)%,\
21 $(@:.h=.d))' \
22 $(CC) -E -x c $< -D_LIBC -dM | \
23 sed -n >> $(@:.d=.h).new \
24 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p'
25 mv -f $(@:.d=.h).new $(@:.d=.h)
26 # Get the generated list of dependencies (probably /usr/include/asm/unistd.h).
27 -include $(objpfx)syscall-list.d
28 generated += syscall-list.h syscall-list.d
29 endif
31 ifeq ($(subdir),time)
32 sysdep_headers += sys/timex.h
33 endif
35 ifeq ($(subdir),socket)
36 sysdep_headers += sys/socketcall.h net/if.h net/if_ppp.h net/ppp-comp.h \
37 net/ppp_defs.h net/if_arp.h net/route.h
38 sysdep_routines += cmsg_nxthdr
39 endif
41 ifeq ($(subdir),sunrpc)
42 sysdep_headers += nfs/nfs.h
43 endif
45 ifeq ($(subdir),termios)
46 sysdep_headers += termio.h sys/kernel_termios.h
47 endif
49 ifeq ($(subdir),stdio-common)
50 # Just disable the auto generation in sysdeps/generic
51 inhibit-siglist := yes
52 endif
54 ifeq ($(subdir),inet)
55 sysdep_headers += netinet/in_systm.h sys/socketvar.h
56 endif
58 # Don't compile the ctype glue code, since there is no old non-GNU C library.
59 inhibit-glue = yes