ref: fc1c8d49847235fe32bc3541d6a489c45462fffd
parent: ff12c749839ae641f04410734d31b7aaa7589141
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sun Aug 19 14:48:04 EDT 2018
[lib/crt] Compile crt.o in all again This is a temporaty solution because it uses the system assembler to be able to assemble the crt, which means that only the crt compatible with the system can be compiled.
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -4,7 +4,7 @@
include $(PROJECTDIR)/rules.mk
-DIRS = scc coff32
+DIRS = scc coff32 crt
all: $(DIRS)
--- a/lib/crt/Makefile
+++ b/lib/crt/Makefile
@@ -1,16 +1,33 @@
.POSIX:
PROJECTDIR = ../..
-
include $(PROJECTDIR)/rules.mk
-all:
+#TARGETS = $(LIBDIR)/amd64-sysv-linux/crt.o \
+# $(LIBDIR)/amd64-sysv-openbsd/crt.o \
+# $(LIBDIR)/i386-sysv-linux/crt.o \
+# $(LIBDIR)/i386-sysv-openbsd/crt.o \
+# $(LIBDIR)/z80-scc-none/z80-scc-none/crt.o
-dep:
- ./gendep.sh $(TARGETS)
+TARGETS = $(LIBDIR)/amd64-sysv-linux/crt.o
-clean:
- rm -f ./*/crt.o
+all: $(TARGETS)
-distclean: clean
- rm -f makefile
+$(LIBDIR)/amd64-sysv-linux/crt.o: amd64-sysv-linux/crt.o
+ cp amd64-sysv-linux/crt.o $@
+
+$(LIBDIR)/amd64-sysv-openbsd/crt.o: amd64-sysv-openbsd/crt.o
+ cp amd64-sysv-openbsd/crt.o $@
+
+$(LIBDIR)/i386-sysv-linux/crt.o: i386-sysv-linux/crt.o
+ cp i386-sysv-linux/crt.o $@
+
+$(LIBDIR)/i386-sysv-openbsd/crt.o: i386-sysv-openbsd/crt.o
+ cp i386-sysv-openbsd/crt.o $@
+
+$(LIBDIR)/z80-scc-none/crt.o: z80-scc-none/crt.o
+ cp z80-scc-none/crt.o $@
+
+clean:
+ rm -f */*.o
+ rm -f $(TARGETS)
--- a/lib/crt/gendep.sh
+++ /dev/null
@@ -1,25 +1,0 @@
-#!/bin/sh
-
-set -e
-
-rm -f makefile $$.tmp
-trap "rm -f $$.mk $$.tmp" 0 2 3
-
-re='\([^-]*\)-\([^-]*\)-\([^-]*\)-\([^-]*\)'
-
-echo $@ |
-tr ' ' '\n' |
-sed "s/$re/\1-\2-\3/" |
-sort -u |
-(cat Makefile
-echo
-while read i
-do
- cat <<EOF >> $$.tmp
- mkdir -p ../../rootdir/lib/scc/crt/$i
- cp $i/crt.o ../../rootdir/lib/scc/crt/$i/
-EOF
- echo all: $i/crt.o
-done
-echo all:
-cat $$.tmp) > $$.mk && mv $$.mk makefile
--- /dev/null
+++ b/rootdir/lib/amd64-sysv-linux/README
@@ -1,0 +1,1 @@
+This is a placeholder for VCS
--- /dev/null
+++ b/rootdir/lib/amd64-sysv-openbsd/README
@@ -1,0 +1,1 @@
+This is a placeholder for VCS
--- /dev/null
+++ b/rootdir/lib/i386-sysv-linux/README
@@ -1,0 +1,1 @@
+This is a placeholder for VCS
--- /dev/null
+++ b/rootdir/lib/i386-sysv-openbsd/README
@@ -1,0 +1,1 @@
+This is a placeholder for VCS
--- /dev/null
+++ b/rootdir/lib/z80-scc-none/README
@@ -1,0 +1,1 @@
+This is a placeholder for VCS
--- a/rules.mk
+++ b/rules.mk
@@ -2,7 +2,7 @@
BINDIR = $(PROJECTDIR)/rootdir/bin
INCDIR = $(PROJECTDIR)/inc
-LIBDIR = $(PROJECTDIR)/lib
+LIBDIR = $(PROJECTDIR)/rootdir/lib
LIBEXEC = $(PROJECTDIR)/rootdir/libexec/scc
LIBSCC = $(PROJECTDIR)/lib/scc
LIBCOFF32 = $(PROJECTDIR)/lib/coff32