scc

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

commit 6dba471bc4f9690baa3de91ea4398407afb22c72
parent 014c49820906e440c74827718f3866e88ffd8444
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Mon, 11 Dec 2017 14:45:26 +0000

Move FORALL to config.mk.def

It makes easier to reuse it in other Makefiles instead of
copying it everywhere.

Diffstat:
MMakefile | 12+++---------
Mconfig.mk.def | 10++++++++++
2 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,17 +1,11 @@ # scc - Suckless C Compiler + +include config.mk.def + .POSIX: DIRS = inc cc1 cc2 driver lib as ar nm objdump -FORALL = @set -e ;\ - pwd=$$PWD; \ - for i in $(DIRS); \ - do \ - cd $$i; \ - $(MAKE) $@; \ - cd $$pwd; \ - done - all: $(FORALL) diff --git a/config.mk.def b/config.mk.def @@ -47,4 +47,14 @@ SCC_LDFLAGS = -L$(LIBDIR)/ $(LDFLAGS) .c: $(CC) $(SCC_CFLAGS) $(SCC_LDFLAGS) -o $@ $< +# helper macro to run over all the directories +FORALL = @set -e ;\ + pwd=$$PWD; \ + for i in $(DIRS); \ + do \ + cd $$i; \ + $(MAKE) $@; \ + cd $$pwd; \ + done + # system specific flags