diff options
Diffstat (limited to 'libc/syscall/Makefile')
-rw-r--r-- | libc/syscall/Makefile | 53 |
1 files changed, 38 insertions, 15 deletions
diff --git a/libc/syscall/Makefile b/libc/syscall/Makefile index fd2f1bc..06728da 100644 --- a/libc/syscall/Makefile +++ b/libc/syscall/Makefile @@ -6,34 +6,52 @@ TOP=.. include $(TOP)/Make.defs LSRC=syslibc.c -LOBJ=__cstartup.o time.o lseek.o getpid.o getppid.o \ - getuid.o geteuid.o getgid.o getegid.o \ - dup2.o dup.o abort.o wait.o waitpid.o sleep.o \ - killpg.o setpgrp.o getpgrp.o times.o usleep.o +LOBJ=time.o abort.o wait.o waitpid.o killpg.o setpgrp.o sleep.o \ + usleep.o + +LSRC3=syslib3.c +LOBJ3=__cstart3.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=execve.c -EOBJ=execve.o execl.o execv.o execle.o +E2OBJ=execl.o execv.o execle.o +EOBJ=execve.o $(E2OBJ) DSRC=dirent.c DOBJ=opendir.o closedir.o readdir.o -ifeq ($(PLATFORM),i86-DOS) -OBJ=setjmp.o -else -OBJ=$(LOBJ) $(DOBJ) $(EOBJ) signal.o setjmp.o execve.o +ifeq ($(LIB_CPU)-$(LIB_OS),i86-ELKS) +SYSCALLS=sh mksyscall +OBJ=$(LOBJ0) $(LOBJ) $(DOBJ) $(EOBJ) signal.o setjmp.o +DEP=mksyscall syscall.dat endif -all: mksyscall syscall.dat $(OBJ) - sh mksyscall +ifeq ($(LIB_CPU)-$(LIB_OS),i386-ELKS) +SYSCALLS=sh mksys386 +OBJ=setjmp.o $(LOBJ3) $(LOBJ) $(E2OBJ) $(DOBJ) +DEP=mksys386 sys386.dat +endif -clean: - rm -f *.o libc.a syscall.c syscall.mak call_tab.v defn_tab.v +ifeq ($(SYSCALLS),) +SYSCALLS=true +OBJ=setjmp.o +DEP= +endif + +all: $(DEP) $(OBJ) + $(SYSCALLS) -libc.a: mksyscall syscall.dat $(OBJ) - sh mksyscall libc.a +libc.a: $(DEP) $(OBJ) + $(SYSCALLS) libc.a ar r ../$(LIBC) $(OBJ) @touch libc.a +clean: + rm -f *.o libc.a syscall.c syscall.mak call_tab.v defn_tab.v + $(LOBJ): $(LSRC) $(CC) $(CFLAGS) -c -DL_$* -o $@ $(LSRC) @@ -43,3 +61,8 @@ $(DOBJ): $(DSRC) $(EOBJ): $(ESRC) $(CC) $(CFLAGS) -c -DL_$* -o $@ $(ESRC) +$(LOBJ0): $(LSRC0) + $(CC) $(CFLAGS) -c -DL_$* -o $@ $(LSRC0) + +$(LOBJ3): $(LSRC3) + $(CC) $(CFLAGS) -c -DL_$* -o $@ $(LSRC3) |