scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit b3ed5e2d7a4ce08dd973fcce73d93c0a4c41257b
parent f162377b18b3dfc9a4522fe03230eb89b581d344
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 29 Sep 2017 16:39:49 +0100

[ar] Use common Makefile structure

Diffstat:
ar/Makefile | 16++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/ar/Makefile b/ar/Makefile @@ -1,13 +1,21 @@ .POSIX: +LIBDIR = ../lib/scc include ../config.mk +include $(LIBDIR)/libdep.mk -OBJ = ar.o $(DRIVER/stat.c -MOREFLAGS=-I$(DRIVER) +OBJ = main.o $(DRIVER)/stat.c +MOREFLAGS = -I$(DRIVER) -all: ar +all: ar-$(DRIVER) -ar.o: $(DRIVER)/stat.h +ar-$(DRIVER): $(OBJ) $(LIBDIR)/libscc.a + $(CC) $(SCC_LDFLAGS) $(OBJ) -lscc -o $@ + +$(LIBDIR)/libscc.a: $(LIB-OBJ) + cd $(LIBDIR) && $(MAKE) + +main.o: $(DRIVER)/stat.h dep: clean: