]> Nishi Git Mirror - tewi.git/commitdiff
a
authorNishi <nishi@nishi.boats>
Sun, 3 Nov 2024 05:19:42 +0000 (05:19 +0000)
committerNishi <nishi@nishi.boats>
Sun, 3 Nov 2024 05:19:42 +0000 (05:19 +0000)
git-svn-id: file:///raid/svn-personal/tewi/trunk@400 8739d7e6-ffea-ec47-b151-bdff447c6205

Platform/vc4mips.mk [new file with mode: 0644]
Server/config.c
vc4mips.sh [new file with mode: 0755]

diff --git a/Platform/vc4mips.mk b/Platform/vc4mips.mk
new file mode 100644 (file)
index 0000000..f40e14e
--- /dev/null
@@ -0,0 +1,16 @@
+# $Id$
+
+PREFIX = C:/Tewi
+
+PLATFORM_IDENT = WINDOWS
+CC = ../vc4mips.sh
+AR = lib
+AR_FLAGS = /nologo /out:
+CFLAGS = -g -std=c99 -DPREFIX=\"$(PREFIX)\" -I ../Common -fPIC
+LDFLAGS =
+LIBS = -ladvapi32 -llibcmt
+EXEC = .exe
+STATIC = lib
+LIBSUF = .dll
+OBJ = obj
+PREOBJS = vc6.res
index dea42446078d0bbe2f3e55f8708a6300515ff053..8fef798bffd9538373cb494c37bd4af0d4a93c0c 100644 (file)
 #include <string.h>
 #include <sys/stat.h>
 
+#ifdef NEED_DIRECT
+#include <direct.h>
+#endif
+
 #if !defined(_MSC_VER) && !defined(__BORLANDC__)
 #include <unistd.h>
 #endif
diff --git a/vc4mips.sh b/vc4mips.sh
new file mode 100755 (executable)
index 0000000..83af006
--- /dev/null
@@ -0,0 +1,64 @@
+#!/bin/sh
+# $Id$
+# Wrapper for CL. VC6 sucks.
+
+outfile="a.out"
+dowhat=""
+options="/I../VC6Compat /D_NTSDK /Ddouble=long /DNEED_DIRECT"
+obj=0
+win=0
+source=""
+libraries=""
+link=""
+
+for i in "$@"; do
+       if [ "$i" = "-o" ]; then
+               dowhat="output"
+       elif [ "$i" = "-I" ]; then
+               dowhat="include"
+       elif [ "$i" = "-c" ]; then
+               options="$options /c"
+               obj=1
+       elif [ "$i" = "-fPIC" ]; then
+               :
+       elif [ "$i" = "-g" ]; then
+               :
+       elif [ "$i" = "-std=c99" ]; then
+               :
+       elif [ "$i" = "-shared" ]; then
+               options="$options /LD"
+       elif [ "$i" = "-mwindows" ]; then
+               win=1
+       elif [ "`echo "$i" | grep -Eo "^-D"`" = "-D" ]; then
+               options="$options /`echo "$i" | sed "s/^-//g"`"
+       elif [ "`echo "$i" | grep -Eo "^-l"`" = "-l" ]; then
+               if [ "$i" = "-luser32" ]; then
+                       libraries="$libraries gdi32.lib"
+               fi
+               libraries="$libraries `echo "$i" | sed "s/^-l//g"`.lib"
+       elif [ "$dowhat" = "output" ]; then
+               dowhat=""
+               outfile="$i"
+       elif [ "$dowhat" = "include" ]; then
+               dowhat=""
+               options="$options /I$i"
+       elif [ ! "`echo "$i" | grep -Eo "^."`" = "-" ]; then
+               source="$source $i"
+       fi
+done
+if [ "$obj" = "1" ]; then
+       options="$options /Fo$outfile"
+else
+       options="$options /Fe$outfile"
+fi
+if [ ! "$libraries" = "" ]; then
+       link="/link /nodefaultlib:libc $libraries"
+fi
+if [ "$obj" = "0" ]; then
+       if [ "$win" = "1" ]; then
+               link="$link /SUBSYSTEM:windows"
+       fi
+fi
+construct="clmips /nologo $options $source $link"
+echo "Run: $construct"
+$construct