[Vm-dev] [commit][3593]
Add new plugin makefiles for the revised win32 makefiles that follow the Mac
pattern .
commits at squeakvm.org
commits at squeakvm.org
Sat Feb 13 23:09:53 UTC 2016
Revision: 3593
Author: eliot
Date: 2016-02-13 15:09:50 -0800 (Sat, 13 Feb 2016)
Log Message:
-----------
Add new plugin makefiles for the revised win32 makefiles that follow the Mac pattern.
Modified Paths:
--------------
trunk/platforms/win32/plugins/MIDIPlugin/sqWin32MIDI.c
Added Paths:
-----------
trunk/platforms/win32/plugins/BitBltPlugin/Makefile.plugin
trunk/platforms/win32/plugins/BochsIA32Plugin/Makefile.plugin
trunk/platforms/win32/plugins/FT2Plugin/Makefile.plugin
trunk/platforms/win32/plugins/FloatMathPlugin/Makefile.plugin
trunk/platforms/win32/plugins/IA32ABI/Makefile.plugin
trunk/platforms/win32/plugins/Mpeg3Plugin/Makefile.plugin
trunk/platforms/win32/plugins/SqueakFFIPrims/Makefile.plugin
trunk/platforms/win32/plugins/SqueakSSL/Makefile.plugin
trunk/platforms/win32/plugins/Win32OSProcessPlugin/Makefile.plugin
Added: trunk/platforms/win32/plugins/BitBltPlugin/Makefile.plugin
===================================================================
--- trunk/platforms/win32/plugins/BitBltPlugin/Makefile.plugin (rev 0)
+++ trunk/platforms/win32/plugins/BitBltPlugin/Makefile.plugin 2016-02-13 23:09:50 UTC (rev 3593)
@@ -0,0 +1,10 @@
+# Override to avoid files in platforms/Cross/plugins/BitBltPlugin.
+# Fails if one redefines VPATH and then includes ../common/Makefile.plugin. Grrr...
+
+WIN32DIR:= $(PLATDIR)/win32/plugins/$(LIBNAME)
+MAKERDIR:= $(PLUGINSRCDIR)/plugins/$(LIBNAME)
+OBJDIR:= $(BASEDIR)/$(BUILD)/$(LIBNAME)
+
+%:
+ $(MAKE) -f ../common/Makefile.plugin VPATH="$(MAKERDIR) $(WIN32DIR) $(OBJDIR)" \
+ CROSSSRC="" $@
Added: trunk/platforms/win32/plugins/BochsIA32Plugin/Makefile.plugin
===================================================================
--- trunk/platforms/win32/plugins/BochsIA32Plugin/Makefile.plugin (rev 0)
+++ trunk/platforms/win32/plugins/BochsIA32Plugin/Makefile.plugin 2016-02-13 23:09:50 UTC (rev 3593)
@@ -0,0 +1,24 @@
+DLLTOOLEXTRA := $(PLATDIR)/../processors/IA32/winbochs/cpu/libcpu.a \
+ $(PLATDIR)/../processors/IA32/winbochs/fpu/libfpu.a \
+ $(PLATDIR)/../processors/IA32/winbochs/disasm/libdisasm.a
+DLLWRAPEXTRA := $(DLLTOOLEXTRA)
+
+LINK_WITH_GPP := yes
+EXTRALIBS:= -L$(PLATDIR)/../processors/IA32/winbochs/cpu \
+ -L$(PLATDIR)/../processors/IA32/winbochs/fpu \
+ -L$(PLATDIR)/../processors/IA32/winbochs/disasm \
+ -lcpu -lfpu -ldisasm
+
+include ../common/Makefile.plugin
+
+CXXINCLUDES:= -I$(PLATDIR)/../processors/IA32/winbochs \
+ -I$(PLATDIR)/../processors/IA32/bochs \
+ -I$(PLATDIR)/../processors/IA32/bochs/instrument/stubs
+
+CXXFLAGS:= -m32 -mno-cygwin -DWIN32 -msse2 -ggdb2 -mwindows -mthreads -mwin32 \
+ -mno-rtd -mms-bitfields -mno-accumulate-outgoing-args
+
+.cpp.o:
+ $(CXX) -c $(CXXFLAGS) $(CXXINCLUDES) $<
+
+CXX:=g++
Added: trunk/platforms/win32/plugins/FT2Plugin/Makefile.plugin
===================================================================
--- trunk/platforms/win32/plugins/FT2Plugin/Makefile.plugin (rev 0)
+++ trunk/platforms/win32/plugins/FT2Plugin/Makefile.plugin 2016-02-13 23:09:50 UTC (rev 3593)
@@ -0,0 +1,10 @@
+include ../common/Makefile.plugin
+
+# This seems broken, but in the generated FT2Plugin.c there is an
+# include<tttables.h> which should be include<freetype/tttables.h>
+# so we simply add it to the include path. Eeek.
+INCLUDES+= -I$(WIN32DIR)/freetype
+
+# Add the freetype libs to the build
+EXTRALIBS=$(WIN32DIR)/freetype.a
+
Added: trunk/platforms/win32/plugins/FloatMathPlugin/Makefile.plugin
===================================================================
--- trunk/platforms/win32/plugins/FloatMathPlugin/Makefile.plugin (rev 0)
+++ trunk/platforms/win32/plugins/FloatMathPlugin/Makefile.plugin 2016-02-13 23:09:50 UTC (rev 3593)
@@ -0,0 +1,11 @@
+include ../common/Makefile.plugin
+
+# Special OFLAGS for some files
+k_tan.o: k_tan.c
+ $(MAKE) -f ../common/Makefile.plugin OFLAGS="-O0" $*.o
+
+acos.o: acos.c
+ $(MAKE) -f ../common/Makefile.plugin OFLAGS="-O0" $*.o
+
+tanh.o: tanh.c
+ $(MAKE) -f ../common/Makefile.plugin OFLAGS="-O0" $*.o
Added: trunk/platforms/win32/plugins/IA32ABI/Makefile.plugin
===================================================================
--- trunk/platforms/win32/plugins/IA32ABI/Makefile.plugin (rev 0)
+++ trunk/platforms/win32/plugins/IA32ABI/Makefile.plugin 2016-02-13 23:09:50 UTC (rev 3593)
@@ -0,0 +1,3 @@
+LIBOBJ:= ia32abicc.o IA32ABI.o
+
+include ../common/Makefile.plugin
Modified: trunk/platforms/win32/plugins/MIDIPlugin/sqWin32MIDI.c
===================================================================
--- trunk/platforms/win32/plugins/MIDIPlugin/sqWin32MIDI.c 2016-02-13 18:10:32 UTC (rev 3592)
+++ trunk/platforms/win32/plugins/MIDIPlugin/sqWin32MIDI.c 2016-02-13 23:09:50 UTC (rev 3593)
@@ -723,7 +723,7 @@
/* Copy the name of the given MIDI port into the string at the given
address. Copy at most length characters, and return the number of
characters copied. Fail if there is no port of the given number.*/
-int sqMIDIGetPortName(int portNum, int namePtr, int length) {
+int sqMIDIGetPortName(int portNum, char * namePtr, int length) {
TCHAR *portName;
int count, i;
MIDIOUTCAPS outCaps;
@@ -744,7 +744,7 @@
count = lstrlen(portName);
if (count > length) count = length;
for(i=0;i<count;i++)
- ((char*)namePtr)[i] = (char) portName[i];
+ namePtr[i] = (char) portName[i];
return count;
}
@@ -933,7 +933,7 @@
available. Fail if the buffer is shorter than five bytes,
since there must be enough room for the timestamp plus at
least one data byte. */
-int sqMIDIPortReadInto(int portNum, int count, int bufferPtr) {
+int sqMIDIPortReadInto(int portNum, int count, char * bufferPtr) {
int bytesRead, stamped;
DWORD index, i, data, len, stamp;
unsigned char *dstPtr;
@@ -1011,7 +1011,7 @@
zero, then send the data immediately. Implementations that do
not support a timestamped output queue, such as this one, always
send the data immediately; see sqMIDIHasBuffer. */
-int sqMIDIPortWriteFromAt(int portNum, int count, int bufferPtr, int time) {
+int sqMIDIPortWriteFromAt(int portNum, int count, char * bufferPtr, int time) {
unsigned char *srcPtr = (char*) bufferPtr;
unsigned char cmd;
sqMidiPort *port;
Added: trunk/platforms/win32/plugins/Mpeg3Plugin/Makefile.plugin
===================================================================
--- trunk/platforms/win32/plugins/Mpeg3Plugin/Makefile.plugin (rev 0)
+++ trunk/platforms/win32/plugins/Mpeg3Plugin/Makefile.plugin 2016-02-13 23:09:50 UTC (rev 3593)
@@ -0,0 +1,30 @@
+include ../common/Makefile.plugin
+
+# additional CFLAGS
+CFLAGS += -DNOPTHREADS
+
+# additional directories and files
+MP3DIR= $(CROSSDIR)/libmpeg
+MP3SRC= $(notdir $(wildcard $(MP3DIR)/*.c))
+MP3SRC:= $(filter-out dump.c dump2.c mpeg3toc.c mpeg3cat.c testaudio.c udump.c test.c, $(MP3SRC))
+MP3OBJ:= $(MP3SRC:.c=.o)
+
+AUDDIR= $(MP3DIR)/audio
+AUDSRC= $(notdir $(wildcard $(AUDDIR)/*.c))
+AUDOBJ:= $(AUDSRC:.c=.o)
+
+VIDDIR= $(MP3DIR)/video
+VIDSRC= $(notdir $(wildcard $(VIDDIR)/*.c))
+VIDSRC:= $(filter-out worksheet.c, $(VIDSRC))
+VIDOBJ:= $(VIDSRC:.c=.o)
+
+# add the libmpeg files
+LIBSRC += $(MP3SRC) $(AUDSRC) $(VIDSRC)
+LIBOBJ += $(addprefix $(OBJDIR)/,$(MP3OBJ) $(AUDOBJ) $(VIDOBJ))
+
+# add the directories
+VPATH += $(MP3DIR) $(VIDDIR) $(AUDDIR)
+INCLUDES += -I$(MP3DIR) -I$(VIDDIR) -I$(AUDDIR)
+
+$(PLUGINLIB): $(VMDIR) $(OBJDIR) $(LIBOBJ)
+ $(AR) $(PLUGINLIB) $(LIBOBJ)
Added: trunk/platforms/win32/plugins/SqueakFFIPrims/Makefile.plugin
===================================================================
--- trunk/platforms/win32/plugins/SqueakFFIPrims/Makefile.plugin (rev 0)
+++ trunk/platforms/win32/plugins/SqueakFFIPrims/Makefile.plugin 2016-02-13 23:09:50 UTC (rev 3593)
@@ -0,0 +1,16 @@
+# On Cog we use the ThreadedFFIPlugin and need no platform-dependent code
+ifdef COGDEFS
+CROSSDIR:= $(PLATDIR)/Cross/plugins/$(LIBNAME)
+MAKERDIR:= $(PLUGINSRCDIR)/plugins/$(LIBNAME)
+OBJDIR:= $(BASEDIR)/$(BUILD)/$(LIBNAME)
+WIN32DIR:= $(PLATDIR)/win32/plugins/$(LIBNAME)
+
+%:
+ $(MAKE) -f ../common/Makefile.plugin VPATH="$(CROSSDIR) $(MAKERDIR) $(WIN32DIR) $(OBJDIR)" \
+ CROSSSRC="sqFFIPlugin.c sqFFITestFuncs.c sqManualSurface.c" \
+ MAKERSRC="SqueakFFIPrims.c" \
+ WIN32SRC="" \
+ $@
+else
+include ../common/Makefile.plugin
+endif
Added: trunk/platforms/win32/plugins/SqueakSSL/Makefile.plugin
===================================================================
--- trunk/platforms/win32/plugins/SqueakSSL/Makefile.plugin (rev 0)
+++ trunk/platforms/win32/plugins/SqueakSSL/Makefile.plugin 2016-02-13 23:09:50 UTC (rev 3593)
@@ -0,0 +1,28 @@
+# Makefile for SqueakSSL plugin. This should work given the right versions of
+# things. Alas my current MINGW installation, 3.17, doesn't have an up-to-date
+# /usr/lib/w32api/libcrypt32.a; it defines 14 funcs needed by sqWin32SSL.c but
+# another 11 are undefined.
+# If you want to experiment, download a suitable version of openssl,
+# e.g. http://www.openssl.org/source/openssl-1.0.1e.tar.gz
+# and unpack it. The below assumes it is unpacked in /usr/local.
+# Then in the openssl directory do
+# ./Configure mingw
+# make
+# make test
+# Then in cygwinbuild do
+# make build/vm/SqueakSSL.dll
+# If you get something that works please let me know.
+# Eliot Miranda, eliot.miranda at gmail.com, 2013/4/4
+
+OPENSSL:=/usr/local/openssl-1.0.1e
+EXTRALIBS:= -L$(OPENSSL) \
+ -lssl -lcrypto \
+ -L/usr/lib/w32api \
+ -lcrypt32 -lsecur32
+
+# You may need the following to make an internal plugin
+DLLTOOLEXTRA := $(OPENSSL)/libssl.a \
+ $(OPENSSL)/libcrypto.a
+DLLWRAPEXTRA := $(DLLTOOLEXTRA)
+
+include ../common/Makefile.plugin
Added: trunk/platforms/win32/plugins/Win32OSProcessPlugin/Makefile.plugin
===================================================================
--- trunk/platforms/win32/plugins/Win32OSProcessPlugin/Makefile.plugin (rev 0)
+++ trunk/platforms/win32/plugins/Win32OSProcessPlugin/Makefile.plugin 2016-02-13 23:09:50 UTC (rev 3593)
@@ -0,0 +1,3 @@
+include ../common/Makefile.plugin
+INCLUDES += -I$(PLATDIR)/Cross/plugins/FilePlugin \
+ -I$(PLATDIR)/Cross/plugins/SocketPlugin
More information about the Vm-dev
mailing list