scc

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

commit a325ec3ead8b73bc6a72d685a38a83d21b8bc1d8
parent 472db47491cbcf7f61791775e7d81af0d023d0f8
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Mon, 11 Feb 2019 09:24:37 +0000

[ld] Move ld out of a directory

Diffstat:
Msrc/cmd/Makefile | 5++++-
Msrc/cmd/deps.mk | 8++++----
Rsrc/cmd/ld/main.c -> src/cmd/ld.c | 0
Dsrc/cmd/ld/Makefile | 19-------------------
Dsrc/cmd/ld/deps.mk | 5-----
5 files changed, 8 insertions(+), 29 deletions(-)

diff --git a/src/cmd/Makefile b/src/cmd/Makefile @@ -12,7 +12,7 @@ TARGET = $(BINDIR)/nm \ $(BINDIR)/objcopy \ $(BINDIR)/addr2line \ -DIRS = as ld scc +DIRS = as scc LIBMACH = $(LIBDIR)/libmach.a LIBSCC = $(LIBDIR)/libscc.a @@ -34,6 +34,9 @@ $(BINDIR)/size: size.o $(LIBMACH) $(LIBSCC) $(BINDIR)/ranlib: ranlib.o $(DRIVER).o $(LIBMACH) $(LIBSCC) $(CC) $(SCC_LDFLAGS) ranlib.o $(DRIVER).o -lmach -lscc -o $@ +$(BINDIR)/ld: ld.o $(LIBMACH) $(LIBSCC) + $(CC) $(SCC_LDFLAGS) ld.o -lmach -lscc -o $@ + $(BINDIR)/objdump: objdump.o $(LIBMACH) $(CC) $(SCC_LDFLAGS) objdump.o -lmach -o $@ diff --git a/src/cmd/deps.mk b/src/cmd/deps.mk @@ -45,10 +45,10 @@ ./as/target/x86/ins.o: $(INCDIR)/scc/scc/scc.h ./as/target/x86/ins.o: ./as/target/x86/../../as.h ./as/target/x86/ins.o: ./as/target/x86/proc.h -./ld/main.o: $(INCDIR)/scc/scc/ar.h -./ld/main.o: $(INCDIR)/scc/scc/mach.h -./ld/main.o: $(INCDIR)/scc/scc/scc.h -./ld/main.o: $(INCDIR)/scc/scc/syslibs.h +./ld.o: $(INCDIR)/scc/scc/ar.h +./ld.o: $(INCDIR)/scc/scc/mach.h +./ld.o: $(INCDIR)/scc/scc/scc.h +./ld.o: $(INCDIR)/scc/scc/syslibs.h ./nm.o: $(INCDIR)/scc/scc/arg.h ./nm.o: $(INCDIR)/scc/scc/mach.h ./objdump.o: $(INCDIR)/scc/scc/arg.h diff --git a/src/cmd/ld/main.c b/src/cmd/ld.c diff --git a/src/cmd/ld/Makefile b/src/cmd/ld/Makefile @@ -1,19 +0,0 @@ -.POSIX: - -PROJECTDIR = ../../.. -include $(PROJECTDIR)/scripts/rules.mk - -OBJS = main.o \ - -TARGET = $(BINDIR)/ld - -all: $(TARGET) - -$(TARGET): $(LIBDIR)/libscc.a $(LIBDIR)/libscc.a - -$(TARGET): $(OBJS) - $(CC) $(SCC_LDFLAGS) $(OBJS) -lmach -lscc -o $@ - -dep: inc-dep - -include deps.mk diff --git a/src/cmd/ld/deps.mk b/src/cmd/ld/deps.mk @@ -1,5 +0,0 @@ -#deps -./main.o: $(INCDIR)/scc/scc/ar.h -./main.o: $(INCDIR)/scc/scc/mach.h -./main.o: $(INCDIR)/scc/scc/scc.h -./main.o: $(INCDIR)/scc/scc/syslibs.h