commit 5b88d5faa321fd71a734d5c957c162aad46d7daf
parent dae1b4a5808e4853b8907af3bfd0de54a56693ea
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Thu, 21 Sep 2017 09:03:24 +0100
Move library geneartion rule to libdep.mk
In this way this rule is known by all the interested makefiles.
To avoid having the library rule as default a single all: is
added.
Diffstat:
4 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/as/Makefile b/as/Makefile
@@ -15,9 +15,6 @@ $(OBJ): $(HDR)
as: $(OBJ)
$(CC) $(SCC_LDFLAGS) $(OBJ) -lscc -o $@
-$(LIBDIR)/libscc.a: $(LIB-OBJ)
- cd $(LIBDIR) && $(MAKE)
-
dep: ../config.mk Makefile
./gendep.sh $(TARGETS)
touch dep
diff --git a/cc1/Makefile b/cc1/Makefile
@@ -18,9 +18,6 @@ all:
mkdir -p ../rootdir/libexec/scc/
cp cc1-* ../rootdir/libexec/scc/
-$(LIBDIR)/libscc.a: $(LIB-OBJ)
- cd $(LIBDIR) && $(MAKE)
-
dep: ../config.mk Makefile
./gendep.sh $(TARGETS)
touch dep
diff --git a/cc2/Makefile b/cc2/Makefile
@@ -20,9 +20,6 @@ dep: ../config.mk Makefile
MKQBE=${MKQBE} ./gendep.sh $(TARGETS)
touch dep
-$(LIBDIR)/libscc.a: $(LIB-OBJ)
- cd $(LIBDIR) && $(MAKE)
-
main.o: error.h
error.h: cc2.h
diff --git a/lib/scc/libdep.mk b/lib/scc/libdep.mk
@@ -6,3 +6,8 @@ LIB-OBJ = $(LIBDIR)/debug.o \
$(LIBDIR)/xrealloc.o \
$(LIBDIR)/xstrdup.o \
$(LIBDIR)/alloc.o \
+
+all:
+
+$(LIBDIR)/libscc.a: $(LIB-OBJ)
+ cd $(LIBDIR) && $(MAKE)