summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/common/Makefile')
-rw-r--r--libc/sysdeps/linux/common/Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/common/Makefile b/libc/sysdeps/linux/common/Makefile
index 06f4651b9..dd891d176 100644
--- a/libc/sysdeps/linux/common/Makefile
+++ b/libc/sysdeps/linux/common/Makefile
@@ -28,7 +28,10 @@ LIBC=$(TOPDIR)libc.a
#The file makefile.objs defines $(COBJS)
include makefile.objs
-OBJ=$(COBJS)
+MSRC=syscalls.c
+MOBJ=$(shell ./list_syscalls.sh)
+
+OBJ=$(COBJS) $(MOBJ)
all: $(OBJ) $(LIBC)
@@ -37,6 +40,10 @@ $(LIBC): ar-target
ar-target: $(OBJ)
$(AR) $(ARFLAGS) $(LIBC) $(OBJ)
+$(MOBJ): $(MSRC)
+ $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
+ $(STRIPTOOL) -x -R .note -R .comment $*.o
+
$(COBJS):
$(CC) $(CFLAGS) $< -c $*.c -o $*.o
$(STRIPTOOL) -x -R .note -R .comment $*.o