scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit 63f3628b766dd745aea8a1fe3900ce32a121c872
parent 69ceb543492e295ebb7ed33c82ec2626d6a55e99
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue,  4 Dec 2018 18:44:00 +0000

[libc] Avoid inclusion of scc headers

Diffstat:
Mscripts/rules.mk | 4+++-
Msrc/libc/Makefile | 3++-
Msrc/libc/arch/Makefile | 1+
Msrc/libc/arch/amd64/Makefile | 1+
Msrc/libc/arch/amd64/dragonfly/Makefile | 2+-
Msrc/libc/arch/amd64/linux/Makefile | 2+-
Msrc/libc/arch/amd64/netbsd/Makefile | 2+-
Msrc/libc/arch/amd64/openbsd/Makefile | 2+-
Msrc/libc/arch/arm32/Makefile | 1+
Msrc/libc/arch/arm32/linux/Makefile | 2+-
Msrc/libc/arch/arm64/Makefile | 1+
Msrc/libc/arch/arm64/linux/Makefile | 2+-
Dsrc/libc/arch/rules.mk | 6------
Msrc/libc/assert/Makefile | 3+--
Msrc/libc/ctype/Makefile | 3+--
Msrc/libc/locale/Makefile | 3+--
Asrc/libc/rules.mk | 7+++++++
Msrc/libc/stdio/Makefile | 3+--
Msrc/libc/stdlib/Makefile | 3+--
Msrc/libc/string/Makefile | 3+--
Msrc/libc/time/Makefile | 3+--
21 files changed, 29 insertions(+), 28 deletions(-)

diff --git a/scripts/rules.mk b/scripts/rules.mk @@ -9,9 +9,11 @@ BINDIR = $(PROJECTDIR)/bin LIBEXEC = $(PROJECTDIR)/libexec/scc CRTDIR = $(PROJECTDIR)/lib/scc +INCLUDE = -I$(INCDIR)/scc \ + SCC_CFLAGS = $(MORECFLAGS) \ $(SYSCFLAGS) \ - -I$(INCDIR)/scc \ + $(INCLUDE) \ -g \ $(CFLAGS) diff --git a/src/libc/Makefile b/src/libc/Makefile @@ -1,8 +1,9 @@ .POSIX: + PROJECTDIR =../.. include $(PROJECTDIR)/scripts/rules.mk +include rules.mk -MORECFLAGS = -I$(INCDIR) -I$(INCDIR)/bits/$(SYS) -I$(INCDIR)/bits/$(ARCH) TARGET = $(CRTDIR)/$(ARCH)-$(SYS)/libc.a DIRS = arch\ assert\ diff --git a/src/libc/arch/Makefile b/src/libc/arch/Makefile @@ -1,6 +1,7 @@ .POSIX: PROJECTDIR =../../.. include $(PROJECTDIR)/scripts/rules.mk +include ../rules.mk DIRS = amd64 arm32 arm64 diff --git a/src/libc/arch/amd64/Makefile b/src/libc/arch/amd64/Makefile @@ -1,6 +1,7 @@ .POSIX: PROJECTDIR =../../../.. include $(PROJECTDIR)/scripts/rules.mk +include ../../rules.mk OBJS = longjmp.o setjmp.o DIRS = netbsd openbsd dragonfly linux diff --git a/src/libc/arch/amd64/dragonfly/Makefile b/src/libc/arch/amd64/dragonfly/Makefile @@ -1,7 +1,7 @@ .POSIX: PROJECTDIR =../../../../.. include $(PROJECTDIR)/scripts/rules.mk -include ../../rules.mk +include ../../../rules.mk OBJS = _Exit.o \ _close.o \ diff --git a/src/libc/arch/amd64/linux/Makefile b/src/libc/arch/amd64/linux/Makefile @@ -1,7 +1,7 @@ .POSIX: PROJECTDIR =../../../../.. include $(PROJECTDIR)/scripts/rules.mk -include ../../rules.mk +include ../../../rules.mk OBJS = _Exit.o \ _close.o \ diff --git a/src/libc/arch/amd64/netbsd/Makefile b/src/libc/arch/amd64/netbsd/Makefile @@ -1,7 +1,7 @@ .POSIX: PROJECTDIR =../../../../.. include $(PROJECTDIR)/scripts/rules.mk -include ../../rules.mk +include ../../../rules.mk OBJS = _Exit.o \ _close.o \ diff --git a/src/libc/arch/amd64/openbsd/Makefile b/src/libc/arch/amd64/openbsd/Makefile @@ -1,7 +1,7 @@ .POSIX: PROJECTDIR =../../../../.. include $(PROJECTDIR)/scripts/rules.mk -include ../../rules.mk +include ../../../rules.mk OBJS = _Exit.o \ _close.o \ diff --git a/src/libc/arch/arm32/Makefile b/src/libc/arch/arm32/Makefile @@ -1,6 +1,7 @@ .POSIX: PROJECTDIR =../../../.. include $(PROJECTDIR)/scripts/rules.mk +include ../../rules.mk OBJS = longjmp.o setjmp.o DIRS = linux diff --git a/src/libc/arch/arm32/linux/Makefile b/src/libc/arch/arm32/linux/Makefile @@ -1,7 +1,7 @@ .POSIX: PROJECTDIR =../../../../.. include $(PROJECTDIR)/scripts/rules.mk -include ../../rules.mk +include ../../../rules.mk OBJS = _Exit.o \ _close.o \ diff --git a/src/libc/arch/arm64/Makefile b/src/libc/arch/arm64/Makefile @@ -1,6 +1,7 @@ .POSIX: PROJECTDIR =../../../.. include $(PROJECTDIR)/scripts/rules.mk +include ../../rules.mk OBJS = longjmp.o setjmp.o DIRS = linux diff --git a/src/libc/arch/arm64/linux/Makefile b/src/libc/arch/arm64/linux/Makefile @@ -1,7 +1,7 @@ .POSIX: PROJECTDIR =../../../../.. include $(PROJECTDIR)/scripts/rules.mk -include ../../rules.mk +include ../../../rules.mk OBJS = _Exit.o \ _close.o \ diff --git a/src/libc/arch/rules.mk b/src/libc/arch/rules.mk @@ -1,6 +0,0 @@ -MORECFLAGS = -w -I$(INCDIR) -I$(INCDIR)/bits/$(SYS) -I$(INCDIR)/bits/$(ARCH) - -SYSERRNO = $(INCDIR)/bits/$(SYS)/sys/errno.h - -_sys_errlist.c: $(SYSERRNO) - ../../mkerrstr $(SYSERRNO) diff --git a/src/libc/assert/Makefile b/src/libc/assert/Makefile @@ -1,8 +1,7 @@ .POSIX: PROJECTDIR =../../.. include $(PROJECTDIR)/scripts/rules.mk - -MORECFLAGS = -w -I$(INCDIR) -I$(INCDIR)/bits/$(SYS) -I$(INCDIR)/bits/$(ARCH) +include ../rules.mk OBJS = __assert.o\ assert.o\ diff --git a/src/libc/ctype/Makefile b/src/libc/ctype/Makefile @@ -1,8 +1,7 @@ .POSIX: PROJECTDIR =../../.. include $(PROJECTDIR)/scripts/rules.mk - -MORECFLAGS = -w -I$(INCDIR) -I$(INCDIR)/bits/$(SYS) -I$(INCDIR)/bits/$(ARCH) +include ../rules.mk OBJS = ctype.o\ isalnum.o\ diff --git a/src/libc/locale/Makefile b/src/libc/locale/Makefile @@ -1,8 +1,7 @@ .POSIX: PROJECTDIR =../../.. include $(PROJECTDIR)/scripts/rules.mk - -MORECFLAGS = -w -I$(INCDIR) -I$(INCDIR)/bits/$(SYS) -I$(INCDIR)/bits/$(ARCH) +include ../rules.mk OBJS = localeconv.o\ setlocale.o\ diff --git a/src/libc/rules.mk b/src/libc/rules.mk @@ -0,0 +1,7 @@ +INCLUDE = -I$(INCDIR) -I$(INCDIR)/bits/$(SYS) -I$(INCDIR)/bits/$(ARCH) +MORECFLAGS = -w + +SYSERRNO = $(INCDIR)/bits/$(SYS)/sys/errno.h + +_sys_errlist.c: $(SYSERRNO) + ../../mkerrstr $(SYSERRNO) diff --git a/src/libc/stdio/Makefile b/src/libc/stdio/Makefile @@ -1,8 +1,7 @@ .POSIX: PROJECTDIR =../../.. include $(PROJECTDIR)/scripts/rules.mk - -MORECFLAGS = -w -I$(INCDIR) -I$(INCDIR)/bits/$(SYS) -I$(INCDIR)/bits/$(ARCH) +include ../rules.mk OBJS = __getc.o\ __putc.o\ diff --git a/src/libc/stdlib/Makefile b/src/libc/stdlib/Makefile @@ -1,8 +1,7 @@ .POSIX: PROJECTDIR =../../.. include $(PROJECTDIR)/scripts/rules.mk - -MORECFLAGS = -w -I$(INCDIR) -I$(INCDIR)/bits/$(SYS) -I$(INCDIR)/bits/$(ARCH) +include ../rules.mk OBJS = abort.o\ abs.o\ diff --git a/src/libc/string/Makefile b/src/libc/string/Makefile @@ -1,8 +1,7 @@ .POSIX: PROJECTDIR =../../.. include $(PROJECTDIR)/scripts/rules.mk - -MORECFLAGS = -w -I$(INCDIR) -I$(INCDIR)/bits/$(SYS) -I$(INCDIR)/bits/$(ARCH) +include ../rules.mk OBJS = memchr.o\ memcmp.o\ diff --git a/src/libc/time/Makefile b/src/libc/time/Makefile @@ -1,8 +1,7 @@ .POSIX: PROJECTDIR =../../.. include $(PROJECTDIR)/scripts/rules.mk - -MORECFLAGS = -w -I$(INCDIR) -I$(INCDIR)/bits/$(SYS) -I$(INCDIR)/bits/$(ARCH) +include ../rules.mk OBJS = _daysyear.o\ asctime.o\