summaryrefslogtreecommitdiff
path: root/libc/i386sys/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'libc/i386sys/Makefile')
-rw-r--r--libc/i386sys/Makefile52
1 files changed, 52 insertions, 0 deletions
diff --git a/libc/i386sys/Makefile b/libc/i386sys/Makefile
new file mode 100644
index 0000000..ef01ac9
--- /dev/null
+++ b/libc/i386sys/Makefile
@@ -0,0 +1,52 @@
+# Copyright (C) 1995,1996 Robert de Bath <rdebath@cix.compulink.co.uk>
+# This file is part of the Linux-8086 C library and is distributed
+# under the GNU Library General Public License.
+
+LSRC=syslibc.c
+LOBJ=__cstart3.o time.o abort.o wait.o waitpid.o wait3.o killpg.o setpgrp.o \
+ sleep.o usleep.o
+
+ESRC=exec.c
+EOBJ=execl.o execv.o execle.o execlp.o execvp.o
+
+DSRC=dirent.c
+DOBJ=opendir.o closedir.o readdir.o
+
+ifeq ($(LIB_CPU)-$(LIB_OS),i386-ELKS)
+OBJ=$(LOBJ3) $(LOBJ) $(EOBJ) $(DOBJ)
+SYSCALLS=syscalls
+
+CFLAGS=$(ARCH) $(CCFLAGS) $(DEFS)
+
+all: $(SYSCALLS) $(LIBC)($(OBJ))
+ @:
+
+syscalls: syscall.mak
+ $(MAKE) -f syscall.mak LIBC="$(LIBC)" CFLAGS="$(CFLAGS)"
+
+syscall.mak: mksyscall syscall.dat
+ sh mksyscall
+
+$(LIBC)($(LOBJ)): $(LSRC)
+ $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
+ $(AR) $(ARFLAGS) $@ $*.o
+ $(RM) $*.o
+
+$(LIBC)($(DOBJ)): $(DSRC)
+ $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
+ $(AR) $(ARFLAGS) $@ $*.o
+ $(RM) $*.o
+
+$(LIBC)($(EOBJ)): $(ESRC)
+ $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
+ $(AR) $(ARFLAGS) $@ $*.o
+ $(RM) $*.o
+else
+all:
+ @:
+endif
+
+clean:
+ rm -f *.o libc.a
+ rm -f syscall.c syscall.mak
+