# Makefile for building various SWIG generated extensions SRCS = example.c IFILE = example INTERFACE = $(IFILE).i WRAPFILE = $(IFILE)_wrap.c # Location of the Visual C++ tools (32 bit assumed) TARGET = example.dll CC = "C:\Program Files\Microsoft Visual Studio\VC98\bin\cl.exe" LINK = "C:\Program Files\Microsoft Visual Studio\VC98\bin\link.exe" MACHINE = I386 SWIG = "C:\Program Files\SWIG13\swig.exe" # C Library needed to build a DLL DLLIBC = msvcrt.lib oldnames.lib # Windows libraries that are apparently needed WINLIB = kernel32.lib advapi32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib LIBCMT.lib # Libraries common to all DLLs LIBS = $(DLLIBC) $(WINLIB) # Linker options LOPT = -debug:full -debugtype:cv /NODEFAULTLIB /RELEASE /NOLOGO /MACHINE:$(MACHINE) -entry:_DllMainCRTStartup@12 -dll # C compiler flags CFLAGS = /Z7 /Od /c /nologo TCL_INCLUDES = /I "C:\Program Files\Tcl84\include" TCLLIB = "C:\Program Files\Tcl84\lib\tcl84.lib" tcl:: $(SWIG) -tcl8 -o $(WRAPFILE) $(INTERFACE) $(CC) $(CFLAGS) $(TCL_INCLUDES) $(SRCS) $(WRAPFILE) $(LINK) $(LOPT) -out:$(TARGET) $(LIBS) $(TCLLIB) example.obj example_wrap.obj clean: del $(TARGET) $(WRAPFILE) example.lib example.exp example.pdb example.obj example_wrap.obj