[PD-dev] Help! Makefile for compiling pd externs in Windows gcc

Hans-Christoph Steiner hans at eds.org
Wed Nov 19 20:41:19 CET 2003


On Tue, 18 Nov 2003, Becky Currano wrote:

> Does anyone have a makefile that they've successfully used to compile pd 
> externs in windows using gcc?  If so, can you send it to me?

I don't think that exists, though there have been various attempts at
getting parts of Pd working with cygwin and mingw.  I was working on
getting things to compile from CVS using MinGW, I attached my makefile.  I
don't remember how far I got.  This makefile is also in CVS
externals/build/win.

Let us know if you get something working, it would be great to be able to
compile Pd using free tools.

.hc

	zen
	   \
	    \
	     \
-------------- next part --------------
# ----------------------- NT -----------------------


EXTERNALS=\
#!IF ![f exist filelist.inc del filelist.inc & for %i in (*.c) do @echo %i \>> filelist.inc]
!INCLUDE filelist.inc
#!ENDIF

all: filelist.inc link.stamp $(EXTERNALS:.c=.dll)

.SUFFIXES: .dll

PDNTCFLAGS = /W3 /WX /DNT /DPD /nologo
VC="C:\Program Files\Microsoft Visual Studio\Vc98"
SRCPATH=..\src
PDPATH=..\..\..\pd

PDNTINCLUDE = /I. /I.. /I..\..\..\pd\src /I$(VC)\include /I..\..\creb\include

PDNTLDIR = $(VC)\lib
PDNTLIB = $(PDNTLDIR)\libc.lib \
	$(PDNTLDIR)\oldnames.lib \
	$(PDNTLDIR)\kernel32.lib \
	$(PDNTLDIR)\uuid.lib \
	$(PDNTLDIR)\ws2_32.lib \
	$(PDPATH)\bin\pthreadVC.lib \
	$(PDPATH)\bin\pd.lib 

.c.dll:
	cl $(PDNTCFLAGS) $(PDNTINCLUDE) /c $*.c
	link /dll /export:$(*:~=_tilde)_setup $(*).obj $(PDNTLIB)
	del $*.obj $*.lib $*.exp

filelist.inc:
	if exist filelist.inc del filelist.inc
#	for %i in ($(SRCPATH)\*.c) do @echo %~ni%~xi \>> filelist.inc
	for %i in ($(SRCPATH)\*.c) do @echo %~ni%~xi \>> filelist.inc

transfer:
	copy $(SRCPATH)\*.c .

link.stamp: filelist.inc
	copy $(SRCPATH)\*.c .
	copy /y nul link.stamp
	nmake

clean:
# don't delete filelist.inc at the moment, as some externals can't be compiled
# on win32
	-del link.stamp
	-del *.c	
	-del *.obj
	-del *.lib
	-del *.exp
	-del *.dll


More information about the Pd-dev mailing list