shithub: scc

Download patch

ref: 51080ade62c1b8dbc93b8fa5e39c9db5233ef48d
parent: c9b19f29afc4780a22db73dc53c1b1fa63caef66
author: Quentin Rameau <quinq@fifth.space>
date: Thu Mar 2 08:24:40 EST 2017

Makefile: add a libc target

--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@
 
 include config.mk
 
-DIRS  = lib cc1 cc2 driver/$(DRIVER)
+DIRS  = lib cc1 cc2 driver/$(DRIVER) libc/src
 
 all: scc-driver
 	for i in $(ARCHS); \
@@ -24,6 +24,11 @@
 	done
 	ln -f cc1/cc1-$@ bin/
 	ln -f cc2/cc2-$@ bin/
+
+libc/src/libc.a:
+
+libc: libc/src/libc.a
+	cd libc/src && $(MAKE) -e CC=scc
 
 tests: all
 	cd tests/execute && $(MAKE) -e tests
--- a/libc/src/Makefile
+++ b/libc/src/Makefile
@@ -1,6 +1,8 @@
 # See LICENSE file for copyright and license details.
 .POSIX:
 
+include ../../config.mk
+
 LIBCOBJ = assert.o strcpy.o strcmp.o strlen.o strchr.o \
           strrchr.o strcat.o strncmp.o strncpy.o strncat.o strcoll.o \
           strxfrm.o strstr.o strspn.o strcspn.o strpbrk.o strtok.o \