ref: ebe88f34cb1823dd2d8f0f7428ce69c7a983397a
parent: 23215e14d0a15c8274c62bffa326f768bebe54e9
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Aug 8 04:04:41 EDT 2015
fix library mkfiles for objtype=spim
--- a/.hgignore
+++ b/.hgignore
@@ -1,11 +1,11 @@
syntax: regexp
-^(386|68000|68020|alpha|amd64|arm|mips|power|power64|sparc|sparc64)/(bin|lib)(/|$)
-^(acme|sys/src)/(.*/)?[125678vqki]\..*$
-^(acme|sys/src)/.*\.[ao]?[125678vqki]?$
+^(386|68000|68020|alpha|amd64|arm|mips|power|power64|sparc|sparc64|spim)/(bin|lib)(/|$)
+^(acme|sys/src)/(.*/)?[0125678vqki]\..*$
+^(acme|sys/src)/.*\.[ao]?[0125678vqki]?$
^(dev|fd|net.*|srv|shr|env|root|proc|boot|mnt|n|bin|usr|cfg|cron|mail|tmp)(/|$)
^386/(9(pc|boot).*|pbs|mbr|init)
^amd64/(9pc64|init)
-^acme/bin/(386|68000|68020|alpha|amd64|arm|power|power64|sparc|sparc64)(/|$)
+^acme/bin/(386|68000|68020|alpha|amd64|arm|mips|power|power64|sparc|sparc64|spim)(/|$)
^adm/(cache|keys|netkeys|secstore|users|whois|timezone/local)(/|$)
^lib/(ndb|audio|firmware)(/|$)
^lib/rfc/(drafts|index|rfc.*)(/|$)
--- /dev/null
+++ b/sys/src/libc/spim/mkfile
@@ -1,0 +1,41 @@
+objtype=spim
+</$objtype/mkfile
+
+LIB=/$objtype/lib/libc.a
+SFILES=\
+ argv0.s\
+ atom.s\
+ getcallerpc.s\
+ getfcr.s\
+ main9.s\
+ main9p.s\
+ memccpy.s\
+ memchr.s\
+ memcmp.s\
+ memmove.s\
+ memset.s\
+ setjmp.s\
+ strchr.s\
+ strcmp.s\
+ strcpy.s\
+ tas.s\
+ vlop.s\
+
+CFILES=\
+ cycles.c\
+ lock.c\
+ notejmp.c\
+ sqrt.c\
+ vlrt.c\
+
+HFILES=/sys/include/libc.h
+
+OFILES=${CFILES:%.c=%.$O} ${SFILES:%.s=%.$O}
+
+%.$O: ../mips/%.c
+ $CC -I../mips $CFLAGS ../mips/$stem.c
+
+%.$O: ../mips/%.s
+ $AS -I../mips $AFLAGS ../mips/$stem.s
+
+</sys/src/cmd/mksyslib
--- /dev/null
+++ b/sys/src/libmp/spim/mkfile
@@ -1,0 +1,19 @@
+objtype=spim
+</mips/mkfile
+
+LIB=/$objtype/lib/libmp.a
+SFILES=\
+ mpvecadd.s\
+ mpvecsub.s\
+ mpvecdigmuladd.s\
+ mpvecdigmulsub.s\
+# mpdigdiv.s\
+
+HFILES=/$objtype/include/u.h /sys/include/mp.h ../port/dat.h
+
+OFILES=${SFILES:%.s=%.$O}
+
+%.$O: ../mips/%.s
+ $AS -I../mips $AFLAGS ../mips/$stem.s
+
+</sys/src/cmd/mksyslib
--- a/sys/src/libsec/mkfile
+++ b/sys/src/libsec/mkfile
@@ -34,7 +34,7 @@
everything:V:
rm -f */*.[012456789kqv]
- for(objtype in 386)@{
+ for(objtype in $CPUS)@{
echo $objtype
mk $MKFLAGS install
}
--- /dev/null
+++ b/sys/src/libsec/spim/mkfile
@@ -1,0 +1,18 @@
+objtype=spim
+</$objtype/mkfile
+
+LIB=/$objtype/lib/libsec.a
+FILES=\
+ md5block\
+ sha1block\
+
+HFILES=/sys/include/libsec.h
+
+SFILES=${FILES:%=%.s}
+
+OFILES=${FILES:%=%.$O}
+
+%.$O: ../mips/%.s
+ $AS -I../mips $AFLAGS ../mips/$stem.s
+
+</sys/src/cmd/mksyslib
--- a/sys/src/libthread/mkfile
+++ b/sys/src/libthread/mkfile
@@ -72,6 +72,9 @@
$CFILES\
$SFILES\
+spim.$O: mips.c
+ $CC $CFLAGS -o $target mips.c
+
all:V: $LIB sched.acid channel.acid
</sys/src/cmd/mksyslib
--- a/sys/src/mkfile.proto
+++ b/sys/src/mkfile.proto
@@ -2,8 +2,8 @@
# common mkfile parameters shared by all architectures
#
-OS=5678qv
-CPUS=arm alpha 386 power mips
+OS=05678qv
+CPUS=spim arm amd64 alpha 386 power mips
CFLAGS=-FTVw
LEX=lex
YACC=yacc