2 #----------------------------------------------------------------------------
4 # Purpose: Win32, VC++ 5/6 makefile for wxPython
10 # Copyright: (c) 1998 by Total Control Software
11 # Licence: wxWindows license
12 #----------------------------------------------------------------------------
15 # Set WXDIR to the root wxWindows directory for your system
18 # Set this to the root of the Python installation
19 PYTHONDIR=\progra~1\Python
21 # Set this to 1 for a non-debug, optimised compile
24 # Set this to where you want the stuff installed at. It should
25 # be a directory contained in a PYTHONPATH directory, and should be
27 TARGETDIR=$(PYTHONDIR)\wxPython
29 # Set this to 1 for make to pre-compile the Python modules, 0 to
30 # just copy the sources and let Python compile them the first
31 # time they are imported.
34 # If your wxWindows is built as a DLL, set this to 1. Using 0 or unset
35 # means that wxWindows will be staticaly linked with wxPython.
38 # If you want to compile in code to aquire/release the Python
39 # Interpreter Lock at the appropriate places
43 #----------------------------------------------------------------------
45 !if "$(WXP_USE_THREAD)" == "1"
46 THREAD=-DWXP_USE_THREAD=1
49 #----------------------------------------------------------------------
52 THISDIR=$(WXDIR)\utils\wxPython\modules
53 WXPSRCDIR=$(WXDIR)\utils\wxPython\src
55 EXTRALIBS=$(PYTHONDIR)\libs\python15.lib $(WXPSRCDIR)\wxc.lib
56 #EXTRALIBS=$(PYTHONDIR)\PCbuild\python15_d.lib -D_DEBUG
57 EXTRAINC=-I$(PYTHONDIR)\include -I$(WXPSRCDIR) -I.
58 EXTRAFLAGS=/Fpwxp.pch /YXhelpers.h -DSWIG_GLOBAL -DHAVE_CONFIG_H $(THREAD)
59 OVERRIDEFLAGS=/GX- $(OTHERCFLAGS)
62 SWIGFLAGS=-c++ -shadow -python -dnone -D__WXMSW__ -I$(WXPSRCDIR)
66 !include $(WXDIR)\src\makevc.env
68 #----------------------------------------------------------------------
71 DEBUGLFLAGS = /DEBUG /INCREMENTAL:YES
73 DEBUGLFLAGS = /INCREMENTAL:NO
76 LFLAGS= $(DEBUGLFLAGS) /DLL /subsystem:windows,3.50 /machine:I386 /nologo
78 #----------------------------------------------------------------------
86 # implicit rule for compiling .cpp and .c files
92 {$(GENCODEDIR)}.cpp{}.obj:
103 #------------------------------------------------------------------------
107 # Implicit rules to run SWIG
108 {}.i{$(GENCODEDIR)}.cpp:
109 swig $(SWIGFLAGS) -c -o $@ $<
111 {}.i{$(GENCODEDIR)}.py:
112 swig $(SWIGFLAGS) -c -o $(GENCODEDIR)\tmp_wrap.cpp $<
113 -erase $(GENCODEDIR)\tmp_wrap.cpp
116 {$(GENCODEDIR)}.py{$(TARGETDIR)}.py:
119 {}.py{$(TARGETDIR)}.py:
122 #{}.py{$(TARGETDIR)}.$(PYEXT):
123 # $(PYTHON) -c "import py_compile; py_compile.compile('$<', '$@')"
135 # -erase $(TARGETDIR)\$(TARGET).*
139 wxPython\distrib\zipit.bat $(VERSION)
141 pycfiles : $(PYMODULES)
142 !if "$(COMPILEPY)" == "1"
143 $(PYTHONDIR)\python $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR)
144 $(PYTHONDIR)\python -O $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR)
147 $(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
148 $(rc) -r /i$(WXDIR)\include -fo$@ $(TARGET).rc
152 #----------------------------------------------------------------------