scc

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

commit 2f015a12ce5987228380452a9361a4a2c5bc5901
parent b315a6a7661862ebdc5d73dadd8eeaa71da26850
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue, 13 Mar 2018 09:56:07 +0100

[ld] Add skeleton for ld

Diffstat:
MMakefile | 2+-
Ald/Makefile | 28++++++++++++++++++++++++++++
Ald/main.c | 12++++++++++++
3 files changed, 41 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile @@ -5,7 +5,7 @@ PROJECTDIR = . include rules.mk -DIRS = inc cc1 cc2 driver lib as ar nm objdump +DIRS = inc cc1 cc2 driver lib as ar nm objdump ld all: $(FORALL) diff --git a/ld/Makefile b/ld/Makefile @@ -0,0 +1,28 @@ +.POSIX: + +PROJECTDIR = .. +LIBDIR = $(PROJECTDIR)/lib/scc +include $(PROJECTDIR)/rules.mk +include $(LIBDIR)/libdep.mk + +OBJ = main.o + +all: ld + mkdir -p $(PROJECTDIR) + cp ld $(PROJECTDIR)/rootdir/bin + +ld: $(OBJ) + $(CC) $(SCC_LDFLAGS) $(OBJ) -lscc -o $@ + +$(LIBDIR)/libscc.a: $(LIB-OBJ) + +cd $(LIBDIR) && $(MAKE) + +dep: + $(PROJECTDIR)/mkdep.sh + +clean: + rm -f ld *.o + +distclean: clean + +#deps diff --git a/ld/main.c b/ld/main.c @@ -0,0 +1,12 @@ +static char sccsid[] = "@(#) ./ld/main.c"; + +#include <stdio.h> + +#include "../inc/arg.h" +#include "../inc/scc.h" + +int +main(int argc, char *argv[]) +{ + return 0; +}