scc

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

commit 235b5368a2c5ad4d58fb02dc9efa0a8d59fb3830
parent a0c41efbdb9763d954d3733021ef356c35c05ed6
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sun, 19 Jul 2015 19:32:50 +0200

Update to suckless Makefile style

Diffstat:
MMakefile | 18++++++++++++++----
Aconfig.mk | 15+++++++++++++++
2 files changed, 29 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,10 +1,20 @@ +# scc - Sucless C Compiler -DIRS = lib cc1 cc2 +include config.mk + +SUBDIRS = \ + lib \ + cc1 \ + cc2 all clean: - for i in $(DIRS) ;\ + @echo scc build options: + @echo "CFLAGS = ${CFLAGS}" + @echo "LDFLAGS = ${LDFLAGS}" + @echo "CC = ${CC}" + @for i in ${SUBDIRS};\ do \ - (cd $$i && $(MAKE) $@) ;\ - done + (cd $$i; ${MAKE} $(MAKEFLAGS) $@ || exit); \ + done; .POSIX: diff --git a/config.mk b/config.mk @@ -0,0 +1,15 @@ +# Customize to fit your system + +# paths +PREFIX = /usr/local/ +MANPREFIX = ${PREFIX}/share/man + +VERSION = 0.1 + +# Flags +#CFLAGS = -std=c99 +#LDFLAGS = + +# Tools +#CC = cc +#AR =