+# -*- makefile -*-
#----------------------------------------------------------------------------
# Name: makefile.nt
# Purpose: Win32, VC++ 5/6 makefile for wxPython
# Copyright: (c) 1998 by Total Control Software
# Licence: wxWindows license
#----------------------------------------------------------------------------
-VERSION=2.0b6
+VERSION=2.1b2
# Set WXDIR to the root wxWindows directory for your system
WXDIR = $(WXWIN)
TARGETDIR=..
# Set this to 1 for make to pre-compile the Python modules, 0 to
-# just copy the sources and let Python compile them at the first
-# runtime.
+# just copy the sources and let Python compile them the first
+# time they are imported.
COMPILEPY=0
-# If your wxWindows is built as a DLL, set this to 1. Using 0 means
-# that wxWindows will be staticaly linked with wxPython.
+# If your wxWindows is built as a DLL, set this to 1. Using 0 or unset
+# means that wxWindows will be staticaly linked with wxPython.
WXUSINGDLL=1
+# If you want to compile in code to aquire/release the Python
+# Interpreter Lock at the appropriate places
+WXP_USE_THREAD=1
+
+
+# Set this if you want to build the wxGLCanvas
+WITH_GLCANVAS=1
+
# (experimental)
-SEPARATE=0
+SEPARATE=1
+
+#----------------------------------------------------------------------
+
+!if "$(WXP_USE_THREAD)" == "1"
+THREAD=-DWXP_USE_THREAD=1
+!endif
#----------------------------------------------------------------------
NOPCH=1
THISDIR=$(WXDIR)\utils\wxPython
-EXTRALIBS=$(PYTHONDIR)\libs\python15.lib
-EXTRAINC=-I$(PYTHONDIR)\include -I.
-EXTRAFLAGS=/Fpwxp.pch /YXhelpers.h -DSWIG_GLOBAL -DHAVE_CONFIG_H
-OVERRIDEFLAGS=/GX- /DwxUSE_GLOBAL_MEMORY_OPERATORS=0 $(OTHERCFLAGS)
+EXTRALIBS=$(PYTHONDIR)\libs\python15.lib $(GLLIBS)
+#EXTRALIBS=$(PYTHONDIR)\PCbuild\python15_d.lib -D_DEBUG
+EXTRAINC=-I$(PYTHONDIR)\include -I. -I$(WXDIR)\utils\glcanvas\win
+EXTRAFLAGS=/Fpwxp.pch /YXhelpers.h -DSWIG_GLOBAL -DHAVE_CONFIG_H $(THREAD)
+OVERRIDEFLAGS=/GX- $(OTHERCFLAGS)
+
+
+!if "$(WITH_GLCANVAS)" == "1"
+GLLIBS=$(WXDIR)\lib\glcanvas.lib glu32.lib opengl32.lib
+OTHERSWIGFLAGS=-DWITH_GLCANVAS
+OTHERCFLAGS=-DWITH_GLCANVAS
+!endif
SWIGFLAGS=-c++ -shadow -python -dnone -D__WXMSW__ $(OTHERSWIGFLAGS)
GENCODEDIR=msw
-!include $(WXDIR)\src\ntwxwin.mak
+!include $(WXDIR)\src\makevc.env
#----------------------------------------------------------------------
OBJECTS = wx.obj helpers.obj windows.obj events.obj \
misc.obj gdi.obj mdi.obj controls.obj \
controls2.obj windows2.obj cmndlgs.obj stattool.obj \
- frames.obj windows3.obj \
+ frames.obj windows3.obj image.obj printfw.obj \
+ misc2.obj \
!if "$(SEPARATE)" == "0"
- utils.obj
+ utils.obj \
+!if "$(WITH_GLCANVAS)" == "1"
+ glcanvas.obj
+!endif
!else
-OTHERCFLAGS=-DSEPARATE=1
-OTHERSWIGFLAGS=-DSEPARATE
+OTHERCFLAGS=$(OTHERCFLAGS) -DSEPARATE=1
+OTHERSWIGFLAGS=$(OTHERSWIGFLAGS) -DSEPARATE
TARGET2 = utilsc
OBJECTS2 = utils.obj
target2=$(TARGETDIR)\$(TARGET2).pyd
+
+TARGET3 = glcanvasc
+OBJECTS3 = glcanvas.obj
+target3=$(TARGETDIR)\$(TARGET3).pyd
+
+TARGET4 = oglcc
+OBJECTS4 = ogl.obj
+target4=$(TARGETDIR)\$(TARGET4).pyd
!endif
PYMODULES = $(TARGETDIR)\wx.py $(TARGETDIR)\events.py \
$(TARGETDIR)\controls.py $(TARGETDIR)\controls2.py \
$(TARGETDIR)\windows2.py $(TARGETDIR)\cmndlgs.py \
$(TARGETDIR)\stattool.py $(TARGETDIR)\frames.py \
- $(TARGETDIR)\utils.py $(TARGETDIR)\windows3.py \
- $(TARGETDIR)\__init__.py
-
+ $(TARGETDIR)\windows3.py $(TARGETDIR)\__init__.py \
+ $(TARGETDIR)\utils.py $(TARGETDIR)\image.py \
+ $(TARGETDIR)\printfw.py $(TARGETDIR)\misc2.py \
+!if "$(WITH_GLCANVAS)" == "1"
+ $(TARGETDIR)\glcanvas.py
+!endif
#----------------------------------------------------------------------
DEBUGLFLAGS = /INCREMENTAL:NO
!endif
-LFLAGS= $(DEBUGLFLAGS) /DLL /def:$(TARGET).def /subsystem:windows,3.50 \
- /machine:I386 /implib:./$(TARGET).lib /nologo
-
-LFLAGS2=$(DEBUGLFLAGS) /DLL /def:$(TARGET2).def /subsystem:windows,3.50 \
- /machine:I386 /implib:./$(TARGET2).lib /nologo
+LFLAGS= $(DEBUGLFLAGS) /DLL /subsystem:windows,3.50 /machine:I386 /nologo
#----------------------------------------------------------------------
-default: $(TARGETDIR)\$(TARGET).pyd $(target2) pycfiles
+default: $(TARGETDIR)\$(TARGET).pyd $(target2) $(target3) pycfiles
-all: wx $(TARGET) $(TARGET2)
+all: wx $(TARGET) $(TARGET2) $(TARGET3)
wx:
cd $(WXDIR)\src\msw
$(TARGETDIR)\$(TARGET).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(TARGET).res
$(link) @<<
/out:$@ /dll
-$(LFLAGS)
+$(LFLAGS) /def:$(TARGET).def /implib:./$(TARGET).lib
$(DUMMYOBJ) $(OBJECTS) $(TARGET).res
$(LIBS)
<<
$(TARGETDIR)\$(TARGET2).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS2)
$(link) @<<
/out:$@ /dll
-$(LFLAGS2)
+$(LFLAGS) /def:$(TARGET2).def /implib:./$(TARGET2).lib
$(DUMMYOBJ) $(OBJECTS2)
-$(LIBS)
+$(LIBS) wxc.lib
+<<
+
+$(TARGETDIR)\$(TARGET3).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS3)
+ $(link) @<<
+/out:$@ /dll
+$(LFLAGS) /def:$(TARGET3).def /implib:./$(TARGET3).lib
+$(DUMMYOBJ) $(OBJECTS3)
+$(LIBS) $(WXDIR)\lib\glcanvas.lib glu32.lib opengl32.lib wxc.lib
+<<
+
+
+$(TARGETDIR)\$(TARGET4).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS4)
+ $(link) @<<
+/out:$@ /dll
+$(LFLAGS) /def:$(TARGET4).def /implib:./$(TARGET4).lib
+$(DUMMYOBJ) $(OBJECTS4)
+$(LIBS) wxc.lib $(WXDIR)\lib\ogl$(LIBEXT).lib
<<
-erase $(TARGET2).exp
-erase $(TARGET2).lib
-erase $(TARGETDIR)\$(TARGET2).*
+ -erase $(TARGET3).exp
+ -erase $(TARGET3).lib
+ -erase $(TARGETDIR)\$(TARGET3).*
+ -erase $(TARGET4).exp
+ -erase $(TARGET4).lib
+ -erase $(TARGETDIR)\$(TARGET4).*
!endif
-erase $(TARGETDIR)\$(TARGET).pyd
-erase $(TARGETDIR)\*.py
$(GENCODEDIR)/windows3.cpp $(GENCODEDIR)/windows3.py : windows3.i my_typemaps.i _defs.i
$(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py : events.i my_typemaps.i _defs.i
$(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py : misc.i my_typemaps.i _defs.i
+$(GENCODEDIR)/misc2.cpp $(GENCODEDIR)/misc2.py : misc2.i my_typemaps.i _defs.i
$(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py : gdi.i my_typemaps.i _defs.i
$(GENCODEDIR)/mdi.cpp $(GENCODEDIR)/mdi.py : mdi.i my_typemaps.i _defs.i
$(GENCODEDIR)/controls.cpp $(GENCODEDIR)/controls.py : controls.i my_typemaps.i _defs.i
$(GENCODEDIR)/cmndlgs.cpp $(GENCODEDIR)/cmndlgs.py : cmndlgs.i my_typemaps.i _defs.i
$(GENCODEDIR)/stattool.cpp $(GENCODEDIR)/stattool.py : stattool.i my_typemaps.i _defs.i
$(GENCODEDIR)/frames.cpp $(GENCODEDIR)/frames.py : frames.i my_typemaps.i _defs.i
+$(GENCODEDIR)/image.cpp $(GENCODEDIR)/image.py : image.i my_typemaps.i _defs.i
+$(GENCODEDIR)/printfw.cpp $(GENCODEDIR)/printfw.py : printfw.i my_typemaps.i _defs.i
!if "$(SEPARATE)" == "1"
$(GENCODEDIR)\utils.cpp $(GENCODEDIR)\utils.py : utils.i my_typemaps.i
swig $(SWIGFLAGS) -o $(GENCODEDIR)/utils.cpp utils.i
+
+$(GENCODEDIR)\ogl.cpp $(GENCODEDIR)\ogl.py : ogl.i my_typemaps.i
+ swig $(SWIGFLAGS) -o $(GENCODEDIR)/ogl.cpp ogl.i
+
+!if "$(WITH_GLCANVAS)" == "1"
+$(GENCODEDIR)\glcanvas.cpp $(GENCODEDIR)\glcanvas.py : glcanvas.i my_typemaps.i
+ swig $(SWIGFLAGS) -c -o $(GENCODEDIR)/glcanvas.cpp glcanvas.i
+!endif
!else
-$(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py : utils.i my_typemaps.i _defs.i
+$(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py : utils.i my_typemaps.i _defs.i
+!if "$(WITH_GLCANVAS)" == "1"
+$(GENCODEDIR)/glcanvas.cpp $(GENCODEDIR)/glcanvas.py : glcanvas.i my_typemaps.i _defs.i
+!endif
!endif
$(TARGETDIR)\windows3.py : $(GENCODEDIR)\windows3.py
$(TARGETDIR)\events.py : $(GENCODEDIR)\events.py
$(TARGETDIR)\misc.py : $(GENCODEDIR)\misc.py
+$(TARGETDIR)\misc2.py : $(GENCODEDIR)\misc2.py
$(TARGETDIR)\gdi.py : $(GENCODEDIR)\gdi.py
$(TARGETDIR)\mdi.py : $(GENCODEDIR)\mdi.py
$(TARGETDIR)\controls.py : $(GENCODEDIR)\controls.py
$(TARGETDIR)\cmndlgs.py : $(GENCODEDIR)\cmndlgs.py
$(TARGETDIR)\frames.py : $(GENCODEDIR)\frames.py
$(TARGETDIR)\stattool.py : $(GENCODEDIR)\stattool.py
-$(TARGETDIR)\utils.py : $(GENCODEDIR)\utils.py
$(TARGETDIR)\__init__.py : __init__.py
+$(TARGETDIR)\utils.py : $(GENCODEDIR)\utils.py
+$(TARGETDIR)\image.py : $(GENCODEDIR)\image.py
+$(TARGETDIR)\printfw.py : $(GENCODEDIR)\printfw.py
+
+!if "$(WITH_GLCANVAS)" == "1"
+$(TARGETDIR)\glcanvas.py : $(GENCODEDIR)\glcanvas.py
+!endif
SOURCES = $(GENCODEDIR)\wx.cpp $(GENCODEDIR)\wx.py \
$(GENCODEDIR)/windows3.cpp $(GENCODEDIR)/windows3.py \
$(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py \
$(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py \
+ $(GENCODEDIR)/misc2.cpp $(GENCODEDIR)/misc2.py \
$(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py \
$(GENCODEDIR)/mdi.cpp $(GENCODEDIR)/mdi.py \
$(GENCODEDIR)/controls.cpp $(GENCODEDIR)/controls.py \
$(GENCODEDIR)/stattool.cpp $(GENCODEDIR)/stattool.py \
$(GENCODEDIR)/frames.cpp $(GENCODEDIR)/frames.py \
$(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py \
+ $(GENCODEDIR)/image.cpp $(GENCODEDIR)/image.py \
+ $(GENCODEDIR)/printfw.cpp $(GENCODEDIR)/printfw.py \
+!if "$(WITH_GLCANVAS)" == "1"
+ $(GENCODEDIR)/glcanvas.cpp $(GENCODEDIR)/glcanvas.py \
+!endif
sources : $(SOURCES)
#------------------------------------------------------------------------
#
-# $Log$
-# Revision 1.4 1999/03/05 07:22:30 RD
-# Minor wxPython changes for wxWin 2.0
-#
-# Revision 1.3 1999/02/25 07:08:33 RD
-#
-# wxPython version 2.0b5
-#
-# Revision 1.2 1999/02/20 09:03:00 RD
-# Added wxWindow_FromHWND(hWnd) for wxMSW to construct a wxWindow from a
-# window handle. If you can get the window handle into the python code,
-# it should just work... More news on this later.
-#
-# Added wxImageList, wxToolTip.
-#
-# Re-enabled wxConfig.DeleteAll() since it is reportedly fixed for the
-# wxRegConfig class.
-#
-# As usual, some bug fixes, tweaks, etc.
-#
-# Revision 1.1 1999/02/06 23:47:03 RD
-#
-# Changing makefile.nt to makefile.vc as in rest of wxWindows
-#
-# Revision 1.10 1999/02/01 00:10:40 RD
-#
-# Added the missing EVT_LIST_ITEM_SELECTED and friends.
-#
-# Revision 1.9 1999/01/30 07:30:13 RD
-#
-# Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
-#
-# Various cleanup, tweaks, minor additions, etc. to maintain
-# compatibility with the current wxWindows.
-#
-# Revision 1.8 1998/12/21 19:58:06 RD
-#
-# Now compiles with /GX- on MSW.
-#
-# Revision 1.7 1998/12/15 20:41:20 RD
-# Changed the import semantics from "from wxPython import *" to "from
-# wxPython.wx import *" This is for people who are worried about
-# namespace pollution, they can use "from wxPython import wx" and then
-# prefix all the wxPython identifiers with "wx."
-#
-# Added wxTaskbarIcon for wxMSW.
-#
-# Made the events work for wxGrid.
-#
-# Added wxConfig.
-#
-# Added wxMiniFrame for wxGTK, (untested.)
-#
-# Changed many of the args and return values that were pointers to gdi
-# objects to references to reflect changes in the wxWindows API.
-#
-# Other assorted fixes and additions.
-#
-# Revision 1.6 1998/10/02 06:40:41 RD
-#
-# Version 0.4 of wxPython for MSW.
-#
-# Revision 1.5 1998/08/19 00:38:23 RD
-#
-# A few tweaks
-#
-# Revision 1.4 1998/08/18 21:55:10 RD
-#
-# New build directory structure
-#
-# Revision 1.3 1998/08/15 07:36:37 RD
-# - Moved the header in the .i files out of the code that gets put into
-# the .cpp files. It caused CVS conflicts because of the RCS ID being
-# different each time.
-#
-# - A few minor fixes.
-#
-# Revision 1.2 1998/08/14 03:34:23 RD
-# made pre-compiling the python files optional
-#
-# Revision 1.1 1998/08/09 08:25:51 RD
-# Initial version
-#