From ae97a89e1a1a9833080dccc81f6cd26784e1b964 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 11 Jan 2001 11:42:17 +0000 Subject: A large update from Manuel Novoa III . --- libc/sysdeps/linux/common/Makefile | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'libc/sysdeps/linux/common/Makefile') 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 -- cgit v1.2.3