diff options
Diffstat (limited to 'libc/syscall/Makefile')
-rw-r--r-- | libc/syscall/Makefile | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/libc/syscall/Makefile b/libc/syscall/Makefile new file mode 100644 index 0000000..fd1b187 --- /dev/null +++ b/libc/syscall/Makefile @@ -0,0 +1,64 @@ +# 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=time.o abort.o wait.o waitpid.o wait3.o killpg.o setpgrp.o sleep.o \ + usleep.o + +LSRC0=syslib0.c +LOBJ0=__cstartup.o lseek.o getpid.o getppid.o getuid.o geteuid.o getgid.o \ + getegid.o dup2.o dup.o getpgrp.o times.o + +ESRC=exec.c +EOBJ=execve.o 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),i86-ELKS) +OBJ=$(LOBJ0) $(LOBJ) $(DOBJ) $(EOBJ) signal.o setjmp.o +SYSCALLS=call_i86 +endif + +ifeq ($(SYSCALLS),) +OBJ=setjmp.o +endif + +CFLAGS=$(ARCH) $(CCFLAGS) $(DEFS) + +all: $(SYSCALLS) $(LIBC) + @: + +call_i86: syscall.mak + $(MAKE) -f syscall.mak LIBC="$(LIBC)" CFLAGS="$(CFLAGS)" + +syscall.mak: mksyscall syscall.dat + sh mksyscall + +$(LIBC): $(LIBC)($(OBJ)) + +$(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 + +$(LIBC)($(LOBJ0)): $(LSRC0) + $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o + $(AR) $(ARFLAGS) $@ $*.o + $(RM) $*.o + +clean: + rm -f *.o libc.a + rm -f syscall.c syscall.mak + rm -f call_tab.v defn_tab.v |