summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/Makefile
blob: 8c9fcfe934a59371e2497e3f288cfe77eea8d82d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
ifeq ($(subdir), math)
sysdep_routines += setfpucw
extra-objs += ieee-fpucw.o
headers += fpu_control.h
install-lib += libieee.a
non-lib.a += libieee.a

$(objpfx)libieee.a: $(objpfx)ieee-fpucw.o
	rm -f $@
	ln $< $@
endif

ifeq ($(subdir), io)
sysdep_routines += fxstat lxstat xstat
endif

ifeq ($(subdir), misc)
sysdep_routines += mount umount xmknod s_ptrace s_sysctl sysctl llseek \
setfsgid setfsuid sysinfo uselib s_reboot
headers += sys/mount.h sys/sysinfo.h sys/acct.h sys/sysctl.h

install-others += $(includedir)/sys/syscall.h

$(includedir)/sys/syscall.h::
	@rm -f $(objpfx)syscall.h $(objpfx)syscall.sed
	@(os=`uname -sr`; \
	  echo -e '1i\\\n#ifndef _SYS_SYSCALL_H\\'; \
	  echo -e '#define _SYS_SYSCALL_H\t1\\\n\\'; \
	  echo -e -n '/* This file is automatically generated as part of '; \
	  echo -e 'GNU libc-$(version)\\'; \
	  echo -e "   on a system running $$os.  */\\"; echo; \
	  echo -e -n 's/#define __NR_\\([A-Za-z0-9_]*\\)[ \t]*__NR_\\(.*\\)/';\
	  echo -e '#define SYS_\\1 SYS_\\2/p'; \
	  echo -e -n 's/#define __NR_\\([A-Za-z0-9_]*\\)[ \t]*\\(.*\\)/';\
	  echo -e '#define SYS_\\1 \\2/p'; \
	  echo -e '$$i\\\n\\\n#endif\t/* sys/syscall.h */\nd') \
	    >  $(objpfx)syscall.sed
	set -- `echo '#include <asm/unistd.h>'|$(CC) -M -E -`; \
	sed -f $(objpfx)syscall.sed $$2 > $(objpfx)syscall.h
	$(INSTALL_DATA) $(objpfx)syscall.h $@
	rm -f $(objpfx)syscall.h $(objpfx)syscall.sed
endif

ifeq ($(subdir), time)
sysdep_routines += adjtimex
headers += sys/timex.h
endif

ifeq ($(subdir), socket)
headers += sys/socketcall.h net/if.h
endif

ifeq ($(subdir), sunrpc)
headers += nfs/nfs.h
endif

rtld-installed-name = ld-gnu.so.1

# Don't compile the ctype glue code, since there is no old non-GNU C library.
inhibit-glue = yes