406c338025d9c932b17e72c66e2ac6251dd15ace
[platform/upstream/glibc.git] / sysdeps / unix / sysv / linux / Makefile
1 ifeq ($(subdir), math)
2 sysdep_routines += setfpucw
3 extra-objs += ieee-fpucw.o
4 headers += fpu_control.h
5 install-lib += libieee.a
6 non-lib.a += libieee.a
7
8 $(objpfx)libieee.a: $(objpfx)ieee-fpucw.o
9         rm -f $@
10         ln $< $@
11 endif
12
13 ifeq ($(subdir), io)
14 sysdep_routines += fxstat lxstat xstat
15 endif
16
17 ifeq ($(subdir), misc)
18 sysdep_routines += mount umount xmknod s_ptrace s_sysctl sysctl llseek \
19 setfsgid setfsuid sysinfo uselib s_reboot
20 headers += sys/mount.h sys/sysinfo.h sys/acct.h sys/sysctl.h
21
22 install-others += $(includedir)/sys/syscall.h
23
24 $(includedir)/sys/syscall.h::
25         @rm -f $(objpfx)syscall.h $(objpfx)syscall.sed
26         @(os=`uname -sr`; \
27           echo -e '1i\\\n#ifndef _SYS_SYSCALL_H\\'; \
28           echo -e '#define _SYS_SYSCALL_H\t1\\\n\\'; \
29           echo -e -n '/* This file is automatically generated as part of '; \
30           echo -e 'GNU libc-$(version)\\'; \
31           echo -e "   on a system running $$os.  */\\"; echo; \
32           echo -e -n 's/#define __NR_\\([A-Za-z0-9_]*\\)[ \t]*__NR_\\(.*\\)/';\
33           echo -e '#define SYS_\\1 SYS_\\2/p'; \
34           echo -e -n 's/#define __NR_\\([A-Za-z0-9_]*\\)[ \t]*\\(.*\\)/';\
35           echo -e '#define SYS_\\1 \\2/p'; \
36           echo -e '$$i\\\n\\\n#endif\t/* sys/syscall.h */\nd') \
37             >  $(objpfx)syscall.sed
38         set -- `echo '#include <asm/unistd.h>'|$(CC) -M -E -`; \
39         sed -f $(objpfx)syscall.sed $$2 > $(objpfx)syscall.h
40         $(INSTALL_DATA) $(objpfx)syscall.h $@
41         rm -f $(objpfx)syscall.h $(objpfx)syscall.sed
42 endif
43
44 ifeq ($(subdir), time)
45 sysdep_routines += adjtimex
46 headers += sys/timex.h
47 endif
48
49 ifeq ($(subdir), socket)
50 headers += sys/socketcall.h net/if.h
51 endif
52
53 ifeq ($(subdir), sunrpc)
54 headers += nfs/nfs.h
55 endif
56
57 ifeq ($(subdir), termios)
58 headers += termio.h
59 endif
60
61 rtld-installed-name = ld-gnu.so.1
62
63 # Don't compile the ctype glue code, since there is no old non-GNU C library.
64 inhibit-glue = yes