Commit 453d733f authored by Miller Puckette's avatar Miller Puckette
Browse files

adapt to ".net" compiler for MS Windows

parent cf3e58e9
......@@ -14,16 +14,17 @@ pd_nt: expr.dll
NTOBJ = vexp.obj vexp_fun.obj vexp_if.obj
PDNTCFLAGS = /W3 /WX /DNT /DPD /nologo
VC="C:\Program Files\Microsoft Visual Studio\Vc98"
PDNTCFLAGS = /W3 /DNT /DPD /nologo
VC = "C:\Program Files\Microsoft Visual Studio 9.0\VC"
VSTK = "C:\Program Files\Microsoft SDKs\Windows\v6.0A"
PDNTINCLUDE = /I. /I..\..\src /I$(VC)\include
PDNTLDIR = $(VC)\lib
PDNTLIB = $(PDNTLDIR)\libc.lib \
$(PDNTLDIR)\oldnames.lib \
$(PDNTLDIR)\kernel32.lib \
..\..\bin\pd.lib
PDNTLIB = /NODEFAULTLIB:libcmt /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel32 \
$(PDNTLDIR)\libcmt.lib $(PDNTLDIR)\oldnames.lib \
$(VSTK)\lib\kernel32.lib \
..\..\bin\pd.lib
.c.obj:
cl $(PDNTCFLAGS) $(PDNTINCLUDE) /c $*.c
......
......@@ -7,15 +7,17 @@ pd_nt: $(NAME).dll
.SUFFIXES: .dll
PDNTCFLAGS = /W3 /WX /DNT /DPD /nologo
VC="C:\Program Files\Microsoft Visual Studio\Vc98"
# VC="C:\Program Files\Microsoft Visual Studio\Vc98"
VC = "C:\Program Files\Microsoft Visual Studio 9.0\VC"
VSTK = "C:\Program Files\Microsoft SDKs\Windows\v6.0A"
PDNTINCLUDE = /I. /I..\..\src /I$(VC)\include
PDNTLDIR = $(VC)\lib
PDNTLIB = $(PDNTLDIR)\libc.lib \
$(PDNTLDIR)\oldnames.lib \
$(PDNTLDIR)\kernel32.lib \
..\..\bin\pd.lib
PDNTLIB = /NODEFAULTLIB:libcmt /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel32 \
$(PDNTLDIR)\libcmt.lib $(PDNTLDIR)\oldnames.lib \
$(VSTK)\lib\kernel32.lib \
..\..\bin\pd.lib
.c.dll:
cl $(PDNTCFLAGS) $(PDNTINCLUDE) /c $*.c
......
......@@ -20,10 +20,20 @@ cp -a extra/ /tmp/pd/extra
cd /tmp/pd
find . -name "*.pd_linux" -exec rm {} \;
foreach i (`find . -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "make*" -o -name "*.txt" -o -name "*.pd" -o -name "*.htm" -o -name "*.html"`)
foreach i (`find . -name "*.c" -o -name "*.h" -o -name "*.cpp" \
-o -name "make*" -o -name "*.txt" -o -name "*.pd" -o -name "*.htm" \
-o -name "*.html" | grep -v asio | grep -v portmidi | grep -v portaudio \
| grep -v include/X11`)
textconvert u w < $i > /tmp/xxx
mv /tmp/xxx $i
end
foreach i (`find lib/asio -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "make*" -o -name "*.txt" -o -name "*.pd" -o -name "*.htm" -o -name "*.html"`)
echo FOO----- $i
textconvert w u < $i > /tmp/xxx
textconvert u w < /tmp/xxx > $i
end
cd ..
rm -f pd.zip
zip -q -r pd.zip pd
......
......@@ -24,10 +24,19 @@ cp -a extra/ /tmp/pd/extra
cd /tmp/pd
find . -name "*.pd_linux" -exec rm {} \;
foreach i (`find . -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "make*" -o -name "*.txt" -o -name "*.pd" -o -name "*.htm" -o -name "*.html"`)
foreach i (`find . -name "*.c" -o -name "*.h" -o -name "*.cpp" \
-o -name "make*" -o -name "*.txt" -o -name "*.pd" -o -name "*.htm" \
-o -name "*.html" | grep -v asio | grep -v portmidi | grep -v portaudio \
| grep -v include/X11`)
textconvert u w < $i > /tmp/xxx
mv /tmp/xxx $i
end
foreach i (`find lib/asio -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "make*" -o -name "*.txt" -o -name "*.pd" -o -name "*.htm" -o -name "*.html"`)
echo FOO----- $i
textconvert w u < $i > /tmp/xxx
textconvert u w < /tmp/xxx > $i
end
cd ..
rm -f pd.zip
zip -q -r pd.zip pd
......
......@@ -2,17 +2,23 @@
all: pd gui ..\bin\pd.tk ..\bin\pdsend.exe ..\bin\pdreceive.exe
VC = "C:\Program Files\Microsoft Visual Studio\VC98"
VCSDK = "C:\Program Files\Microsoft SDKs\Windows\v6.0A"
VC9 = "C:\Program Files\Microsoft Visual Studio 9.0\VC"
#VC="\Program Files\DevStudio\Vc"
INCLUDE = -I.\ -I..\Tcl\include -I\DXSDK\include -I$(VC)\include
INCLUDE = -I.\ -I..\Tcl\include -I\DXSDK\include -I$(VC9)\Include \
-I$(VCSDK)\Include
LDIR = $(VC)\lib
LDIR = $(VCSDK)\lib
LD2 = $(VC9)\lib
LIB = /NODEFAULTLIB:libc /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel \
/NODEFAULTLIB:uuid \
$(LDIR)\libc.lib $(LDIR)\oldnames.lib $(LDIR)\kernel32.lib \
LIB = /NODEFAULTLIB:libcmt /NODEFAULTLIB:oldnames /NODEFAULTLIB:libc \
/NODEFAULTLIB:uuid $(LDIR)\kernel32.lib \
$(LDIR)\wsock32.lib $(LDIR)\winmm.lib $(LDIR)\advapi32.lib \
$(LDIR)\setupapi.lib ..\bin\pthreadVC.lib
$(LDIR)\setupapi.lib ..\bin\pthreadVC.lib \
$(LD2)\libcmt.lib $(LD2)\oldnames.lib
# \
GLIB = $(LIB) ..\bin\tcl84.lib ..\bin\tk84.lib
CFLAGS = /nologo /W3 /DMSW /DNT /DPD /DPD_INTERNAL /DWIN32 /DWINDOWS /Ox \
......@@ -97,11 +103,11 @@ pd: ..\bin\pd.exe ..\bin\pd.com
gui: ..\bin\pdtcl.dll
..\bin\pd.exe: s_entry.obj ..\bin\pd.lib
link $(LFLAGS) /out:..\bin\pd.exe /INCREMENTAL:NO s_entry.obj \
link $(LFLAGS) /OUT:..\bin\pd.exe /INCREMENTAL:NO s_entry.obj \
..\bin\pd.lib $(LIB) $(ASIOLIB)
..\bin\pd.dll ..\bin\pd.lib: $(OBJC) $(OBJASIO)
link $(LFLAGS) /dll /export:sys_main /out:..\bin\pd.dll $(OBJC) \
link /DLL /OUT:..\bin\pd.dll /EXPORT:sys_main $(LFLAGS) $(OBJC) \
$(OBJASIO) $(LIB) $(ASIOLIB)
..\bin\pdtcl.dll: t_tkcmd.obj
......
......@@ -23,6 +23,7 @@ int WINAPI WinMain(HINSTANCE hInstance,
{
printf("caught an exception; stopping\n");
}
return (0);
}
#else /* not _MSC_VER ... */
......
......@@ -1237,7 +1237,7 @@ int sys_startgui(const char *guidir)
sys_guisock = accept(xsock, (struct sockaddr *) &server,
(socklen_t *)&len);
#ifdef OOPS
close(xsock);
sys_closesocket(xsock);
#endif
if (sys_guisock < 0) sys_sockerror("accept");
if (sys_verbose)
......@@ -1292,7 +1292,7 @@ void glob_quit(void *dummy)
sys_vgui("exit\n");
if (!sys_nogui)
{
close(sys_guisock);
sys_closesocket(sys_guisock);
sys_rmpollfn(sys_guisock);
}
sys_bail(0);
......
......@@ -286,9 +286,6 @@ void sys_save_audio_params(
typedef void (*t_printhook)(const char *s);
extern t_printhook sys_printhook; /* set this to override printing */
extern int sys_printtostderr;
#ifdef MSW
#define vsnprintf _vsnprintf /* jsarlo -- alias this name for msw */
#endif
/* jsarlo { */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment