ref: 8927186e41ee97ea7d82e448bbdbd02f67b4b6dc
parent: f135e0f1a43183e0c25e9ed8dbbe294474c0fc2a
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Wed Sep 18 02:59:34 EDT 2019
[as] Move target makefiles to target directories It keeps cleaner the directory structure.
--- a/src/cmd/as/Makefile
+++ b/src/cmd/as/Makefile
@@ -29,10 +29,10 @@
clean:
rm -f target/*/*.o target/*/*tbl.c
-include target/powerpc64.mk
-include target/powerpc.mk
-include target/amd64.mk
-include target/i386.mk
-include target/i286.mk
-include target/z80.mk
+include target/powerpc/powerpc64.mk
+include target/powerpc/powerpc.mk
+include target/x86/amd64.mk
+include target/x86/i386.mk
+include target/x86/i286.mk
+include target/x80/z80.mk
include deps.mk
--- a/src/cmd/as/target/amd64.mk
+++ /dev/null
@@ -1,10 +1,0 @@
-AMD64_OBJ = $(OBJS) \
- target/x86/amd64tbl.o \
- target/x86/amd64.o \
- target/x86/ins.o \
-
-target/x86/amd64tbl.c: target/x86/x86.dat target/x86/rules.dat
- ./mktbl -f x86 -c amd64
-
-$(LIBEXEC)/as-amd64: $(AMD64_OBJ)
- $(CC) $(SCC_LDFLAGS) $(AMD64_OBJ) -lscc -o $@
--- a/src/cmd/as/target/i286.mk
+++ /dev/null
@@ -1,10 +1,0 @@
-I286_OBJ = $(OBJS) \
- target/x86/i286tbl.o \
- target/x86/i286.o \
- target/x86/ins.o \
-
-target/x86/i286tbl.c: target/x86/x86.dat target/x86/rules.dat
- ./mktbl -f x86 -c i286
-
-$(LIBEXEC)/as-i286: $(I286_OBJ)
- $(CC) $(SCC_LDFLAGS) $(I286_OBJ) -lscc -o $@
--- a/src/cmd/as/target/i386.mk
+++ /dev/null
@@ -1,10 +1,0 @@
-I386_OBJ = $(OBJS) \
- target/x86/i386tbl.o \
- target/x86/i386.o \
- target/x86/ins.o \
-
-target/x86/i386tbl.c: target/x86/x86.dat target/x86/rules.dat
- ./mktbl -f x86 -c i386
-
-$(LIBEXEC)/as-i386: $(I386_OBJ)
- $(CC) $(SCC_LDFLAGS) $(I386_OBJ) -lscc -o $@
--- a/src/cmd/as/target/powerpc.mk
+++ /dev/null
@@ -1,12 +1,0 @@
-POWERPC = target/powerpc
-POWERPC_OBJ =\
- $(OBJS)\
- $(POWERPC)/powerpctbl.o\
- $(POWERPC)/powerpc.o\
- $(POWERPC)/ins.o\
-
-$(POWERPC)/powerpctbl.c: $(POWERPC)/powerpc.dat $(POWERPC)/rules.dat
- ./mktbl -f powerpc -c powerpc
-
-$(LIBEXEC)/as-powerpc: $(POWERPC_OBJ)
- $(CC) $(SCC_LDFLAGS) $(POWERPC_OBJ) -lscc -o $@
--- /dev/null
+++ b/src/cmd/as/target/powerpc/powerpc.mk
@@ -1,0 +1,12 @@
+POWERPC = target/powerpc
+POWERPC_OBJ =\
+ $(OBJS)\
+ $(POWERPC)/powerpctbl.o\
+ $(POWERPC)/powerpc.o\
+ $(POWERPC)/ins.o\
+
+$(POWERPC)/powerpctbl.c: $(POWERPC)/powerpc.dat $(POWERPC)/rules.dat
+ ./mktbl -f powerpc -c powerpc
+
+$(LIBEXEC)/as-powerpc: $(POWERPC_OBJ)
+ $(CC) $(SCC_LDFLAGS) $(POWERPC_OBJ) -lscc -o $@
--- /dev/null
+++ b/src/cmd/as/target/powerpc/powerpc64.mk
@@ -1,0 +1,12 @@
+POWERPC = target/powerpc
+POWERPC64_OBJ =\
+ $(OBJS)\
+ $(POWERPC)/powerpc64tbl.o\
+ $(POWERPC)/powerpc64.o\
+ $(POWERPC)/ins.o\
+
+$(POWERPC)/powerpc64tbl.c: $(POWERPC)/powerpc.dat $(POWERPC)/rules.dat
+ ./mktbl -f powerpc -c powerpc64
+
+$(LIBEXEC)/as-powerpc64: $(POWERPC64_OBJ)
+ $(CC) $(SCC_LDFLAGS) $(POWERPC64_OBJ) -lscc -o $@
--- a/src/cmd/as/target/powerpc64.mk
+++ /dev/null
@@ -1,12 +1,0 @@
-POWERPC = target/powerpc
-POWERPC64_OBJ =\
- $(OBJS)\
- $(POWERPC)/powerpc64tbl.o\
- $(POWERPC)/powerpc64.o\
- $(POWERPC)/ins.o\
-
-$(POWERPC)/powerpc64tbl.c: $(POWERPC)/powerpc.dat $(POWERPC)/rules.dat
- ./mktbl -f powerpc -c powerpc64
-
-$(LIBEXEC)/as-powerpc64: $(POWERPC64_OBJ)
- $(CC) $(SCC_LDFLAGS) $(POWERPC64_OBJ) -lscc -o $@
--- /dev/null
+++ b/src/cmd/as/target/x80/z80.mk
@@ -1,0 +1,11 @@
+Z80_OBJ =\
+ $(OBJS)\
+ target/x80/z80tbl.o\
+ target/x80/z80.o\
+ target/x80/ins.o\
+
+target/x80/z80tbl.c: target/x80/x80.dat target/x80/rules.dat
+ ./mktbl -f x80 -c z80
+
+$(LIBEXEC)/as-z80: $(OBJ) $(Z80_OBJ)
+ $(CC) $(SCC_LDFLAGS) $(Z80_OBJ) -lscc -o $@
--- /dev/null
+++ b/src/cmd/as/target/x86/amd64.mk
@@ -1,0 +1,11 @@
+AMD64_OBJ =\
+ $(OBJS)\
+ target/x86/amd64tbl.o\
+ target/x86/amd64.o\
+ target/x86/ins.o\
+
+target/x86/amd64tbl.c: target/x86/x86.dat target/x86/rules.dat
+ ./mktbl -f x86 -c amd64
+
+$(LIBEXEC)/as-amd64: $(AMD64_OBJ)
+ $(CC) $(SCC_LDFLAGS) $(AMD64_OBJ) -lscc -o $@
--- /dev/null
+++ b/src/cmd/as/target/x86/i286.mk
@@ -1,0 +1,11 @@
+I286_OBJ =\
+ $(OBJS)\
+ target/x86/i286tbl.o\
+ target/x86/i286.o\
+ target/x86/ins.o\
+
+target/x86/i286tbl.c: target/x86/x86.dat target/x86/rules.dat
+ ./mktbl -f x86 -c i286
+
+$(LIBEXEC)/as-i286: $(I286_OBJ)
+ $(CC) $(SCC_LDFLAGS) $(I286_OBJ) -lscc -o $@
--- /dev/null
+++ b/src/cmd/as/target/x86/i386.mk
@@ -1,0 +1,11 @@
+I386_OBJ =\
+ $(OBJS)\
+ target/x86/i386tbl.o\
+ target/x86/i386.o\
+ target/x86/ins.o\
+
+target/x86/i386tbl.c: target/x86/x86.dat target/x86/rules.dat
+ ./mktbl -f x86 -c i386
+
+$(LIBEXEC)/as-i386: $(I386_OBJ)
+ $(CC) $(SCC_LDFLAGS) $(I386_OBJ) -lscc -o $@
--- a/src/cmd/as/target/z80.mk
+++ /dev/null
@@ -1,10 +1,0 @@
-Z80_OBJ = $(OBJS) \
- target/x80/z80tbl.o \
- target/x80/z80.o \
- target/x80/ins.o \
-
-target/x80/z80tbl.c: target/x80/x80.dat target/x80/rules.dat
- ./mktbl -f x80 -c z80
-
-$(LIBEXEC)/as-z80: $(OBJ) $(Z80_OBJ)
- $(CC) $(SCC_LDFLAGS) $(Z80_OBJ) -lscc -o $@