9os

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 6dd97e59e8e0ed2dfbc740262defaa4d6aebe28c
parent 793ffa27b0b352e4d081f6316c9f3eeec7a191db
Author: Roberto Vargas <roberto.vargas@arm.com>
Date:   Thu,  1 Nov 2018 11:46:43 +0000

[libc] Simplify Generation of syscalls

Diffstat:
Msrc/libc/arch/amd64/dragonfly/Makefile | 29+++++++++++++++++------------
Msrc/libc/arch/amd64/linux/Makefile | 31++++++++++++++++++-------------
Msrc/libc/arch/amd64/netbsd/Makefile | 29+++++++++++++++++------------
Msrc/libc/arch/amd64/netbsd/syscall.lst | 1+
Msrc/libc/arch/amd64/openbsd/Makefile | 29+++++++++++++++++------------
Msrc/libc/arch/arm64/linux/Makefile | 29+++++++++++++++++------------
6 files changed, 87 insertions(+), 61 deletions(-)

diff --git a/src/libc/arch/amd64/dragonfly/Makefile b/src/libc/arch/amd64/dragonfly/Makefile @@ -1,21 +1,26 @@ PROJECTDIR =../../../../.. include $(PROJECTDIR)/scripts/rules.mk -SRC = _Exit.s \ - _close.s \ - _getpid.s \ - _kill.s \ - _lseek.s \ - _open.s \ - _read.s \ - _write.s \ - _brk.s \ - _getheap.s \ +OBJS = _Exit.o \ + _close.o \ + _getpid.o \ + _kill.o \ + _lseek.o \ + _open.o \ + _read.o \ + _write.o \ + _brk.o \ + _getheap.o \ -all: $(SRC:.s=.o) +all: syscall + $(MAKE) objs -$(SRC): syscall.lst +objs: $(OBJS) + +syscall: syscall.lst ./gensys.sh syscall.lst + touch syscall clean: rm -f `awk '/[0-9]* _/ {print $$2".s"}' syscall.lst` + rm -f syscall diff --git a/src/libc/arch/amd64/linux/Makefile b/src/libc/arch/amd64/linux/Makefile @@ -1,22 +1,27 @@ PROJECTDIR =../../../../.. include $(PROJECTDIR)/scripts/rules.mk -SRC = _Exit.s \ - _close.s \ - _getpid.s \ - _kill.s \ - _lseek.s \ - _open.s \ - _sigaction.s \ - _read.s \ - _write.s \ - _brk.s \ - _getheap.s \ +OBJS = _Exit.o \ + _close.o \ + _getpid.o \ + _kill.o \ + _lseek.o \ + _open.o \ + _sigaction.o \ + _read.o \ + _write.o \ + _brk.o \ + _getheap.o \ -all: $(SRC:.s=.o) _cerrno.o +all: syscall + $(MAKE) objs -$(SRC): syscall.lst +objs: $(OBJS) + +syscall: syscall.lst ./gensys.sh syscall.lst + touch syscall clean: rm -f `awk '/[0-9]* _/ {print $$2".s"}' syscall.lst` + rm -f syscall diff --git a/src/libc/arch/amd64/netbsd/Makefile b/src/libc/arch/amd64/netbsd/Makefile @@ -1,21 +1,26 @@ PROJECTDIR =../../../../.. include $(PROJECTDIR)/scripts/rules.mk -SRC = _Exit.s \ - _close.s \ - _getpid.s \ - _kill.s \ - _lseek.s \ - _open.s \ - _read.s \ - _write.s \ - _brk.s \ - _getheap.s \ +OBJS = _Exit.o \ + _close.o \ + _getpid.o \ + _kill.o \ + _lseek.o \ + _open.o \ + _read.o \ + _write.o \ + _brk.o \ + _getheap.o \ -all: $(SRC:.s=.o) +all: syscall + $(MAKE) objs -$(SRC): syscall.lst +objs: $(OBJS) + +syscall: syscall.lst ./gensys.sh syscall.lst + touch syscall clean: rm -f `awk '/[0-9]* _/ {print $$2".s"}' syscall.lst` + rm -f syscall diff --git a/src/libc/arch/amd64/netbsd/syscall.lst b/src/libc/arch/amd64/netbsd/syscall.lst @@ -8,3 +8,4 @@ 20 _getpid 37 _kill 199 _lseek +418 _gettimeofday diff --git a/src/libc/arch/amd64/openbsd/Makefile b/src/libc/arch/amd64/openbsd/Makefile @@ -1,21 +1,26 @@ PROJECTDIR =../../../../.. include $(PROJECTDIR)/scripts/rules.mk -SRC = _Exit.s \ - _close.s \ - _getpid.s \ - _kill.s \ - _lseek.s \ - _open.s \ - _read.s \ - _write.s \ - _brk.s \ - _getheap.s \ +OBJS = _Exit.o \ + _close.o \ + _getpid.o \ + _kill.o \ + _lseek.o \ + _open.o \ + _read.o \ + _write.o \ + _brk.o \ + _getheap.o \ -all: $(SRC:.s=.o) +all: syscall + $(MAKE) objs -$(SRC): syscall.lst +objs: $(OBJS) + +syscall: syscall.lst ./gensys.sh syscall.lst + touch syscall clean: rm -f `awk '/[0-9]* _/ {print $$2".s"}' syscall.lst` + rm -f syscall diff --git a/src/libc/arch/arm64/linux/Makefile b/src/libc/arch/arm64/linux/Makefile @@ -1,21 +1,26 @@ PROJECTDIR =../../../../.. include $(PROJECTDIR)/scripts/rules.mk -SRC = _Exit.s \ - _close.s \ - _brk.s \ - _getpid.s \ - _kill.s \ - _lseek.s \ - _openat.s \ - _read.s \ - _write.s \ - _getheap.s \ +OBJS = _Exit.o \ + _close.o \ + _brk.o \ + _getpid.o \ + _kill.o \ + _lseek.o \ + _openat.o \ + _read.o \ + _write.o \ + _getheap.o \ -all: $(SRC:.s=.o) _open.o _cerrno.o +all: syscall + $(MAKE) objs -$(SRC): syscall.lst +objs: $(OBJS) + +syscall: syscall.lst ./gensys.sh syscall.lst + touch syscall clean: rm -f `awk '/[0-9]* _/ {print $$2".s"}' syscall.lst` + rm -f syscall