summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/Makefile
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-01-11 11:42:17 +0000
committerEric Andersen <andersen@codepoet.org>2001-01-11 11:42:17 +0000
commitae97a89e1a1a9833080dccc81f6cd26784e1b964 (patch)
tree6ff1ddc7e3980591c7fd0bbd5d9b8ac82da12886 /libc/sysdeps/linux/common/Makefile
parentabdc3e4d06db2b9d93c509774fc7c4fde918ec8e (diff)
A large update from Manuel Novoa III <mnovoa3@bellsouth.net>.
Diffstat (limited to 'libc/sysdeps/linux/common/Makefile')
-rw-r--r--libc/sysdeps/linux/common/Makefile26
1 files changed, 21 insertions, 5 deletions
diff --git a/libc/sysdeps/linux/common/Makefile b/libc/sysdeps/linux/common/Makefile
index 73190ac9c..3a66e4c2e 100644
--- a/libc/sysdeps/linux/common/Makefile
+++ b/libc/sysdeps/linux/common/Makefile
@@ -25,7 +25,6 @@ TOPDIR=../../../
include $(TOPDIR)Rules.mak
LIBC=$(TOPDIR)libc.a
-
CSRC =closedir.c dirfd.c getdents.c getdnnm.c gethstnm.c getpagesize.c \
isatty.c kernel_version.c mkfifo.c opendir.c readdir.c rewinddir.c \
seekdir.c setegid.c seteuid.c setpgrp.c statfix.c tell.c telldir.c \
@@ -40,7 +39,16 @@ MOBJ=$(shell ./list_syscalls.sh)
OBJ=$(COBJS) $(NIOBJS) $(MOBJ)
-all: $(OBJ) $(LIBC)
+UNIFIED_SYSCALL_HEADER = /dev/null
+STR_SYSCALLS =
+ifeq ($(UNIFIED_SYSCALL),true)
+ ifeq ($(TARGET_ARCH), i386)
+ UNIFIED_SYSCALL_HEADER = unified_syscall_i386.h
+ STR_SYSCALLS = str_syscalls
+ endif
+endif
+
+all: $(STR_SYSCALLS) unified_syscall.h $(OBJ) $(LIBC)
$(LIBC): ar-target
@@ -51,14 +59,22 @@ $(MOBJ): $(MSRC)
$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
$(STRIPTOOL) -x -R .note -R .comment $*.o
-$(COBJS):
- $(CC) $(CFLAGS) $< -c $*.c -o $*.o
+$(COBJS): %.o : %.c
+ $(CC) $(CFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(NIOBJS):
$(CC) $(CFLAGS) $< -c $*.c -o $*.o -fno-inline
$(STRIPTOOL) -x -R .note -R .comment $*.o
+str_syscalls:
+ ./str_syscalls.sh > str_syscalls.c
+ gcc str_syscalls.c -o str_syscalls
+ ./str_syscalls > str_syscalls.h
+
+unified_syscall.h:
+ cat $(UNIFIED_SYSCALL_HEADER) > unified_syscall.h
+
clean:
- rm -f *.[oa] *~ core
+ rm -f *.[oa] *~ core unified_syscall.h str_syscalls.[ch] str_syscalls