]> git.saurik.com Git - wxWidgets.git/blame_incremental - utils/wxPython/src/makefile.vc
minimal now works in Unicode mode
[wxWidgets.git] / utils / wxPython / src / makefile.vc
... / ...
CommitLineData
1#----------------------------------------------------------------------------
2# Name: makefile.nt
3# Purpose: Win32, VC++ 5/6 makefile for wxPython
4#
5# Author: Robin Dunn
6#
7# Created: 3/27/97
8# RCS-ID: $Id$
9# Copyright: (c) 1998 by Total Control Software
10# Licence: wxWindows license
11#----------------------------------------------------------------------------
12VERSION=2.0b6
13
14# Set WXDIR to the root wxWindows directory for your system
15WXDIR = $(WXWIN)
16
17# Set this to the root of the Python installation
18PYTHONDIR=e:\Tools\Python15
19
20# Set this to 1 for a non-debug, optimised compile
21FINAL=0
22
23# Set this to where you want the stuff installed at. It should
24# be a directory contained in a PYTHONPATH directory, and should be
25# named wxPython
26TARGETDIR=..
27
28# Set this to 1 for make to pre-compile the Python modules, 0 to
29# just copy the sources and let Python compile them at the first
30# runtime.
31COMPILEPY=0
32
33# If your wxWindows is built as a DLL, set this to 1. Using 0 means
34# that wxWindows will be staticaly linked with wxPython.
35WXUSINGDLL=1
36
37# (experimental)
38SEPARATE=0
39
40#----------------------------------------------------------------------
41
42NOPCH=1
43THISDIR=$(WXDIR)\utils\wxPython
44
45EXTRALIBS=$(PYTHONDIR)\libs\python15.lib
46EXTRAINC=-I$(PYTHONDIR)\include -I.
47EXTRAFLAGS=/Fpwxp.pch /YXhelpers.h -DSWIG_GLOBAL -DHAVE_CONFIG_H
48OVERRIDEFLAGS=/GX- /DwxUSE_GLOBAL_MEMORY_OPERATORS=0 $(OTHERCFLAGS)
49
50
51SWIGFLAGS=-c++ -shadow -python -dnone -D__WXMSW__ $(OTHERSWIGFLAGS)
52GENCODEDIR=msw
53
54
55!include $(WXDIR)\src\ntwxwin.mak
56
57#----------------------------------------------------------------------
58
59TARGET = wxc
60
61OBJECTS = wx.obj helpers.obj windows.obj events.obj \
62 misc.obj gdi.obj mdi.obj controls.obj \
63 controls2.obj windows2.obj cmndlgs.obj stattool.obj \
64 frames.obj windows3.obj \
65!if "$(SEPARATE)" == "0"
66 utils.obj
67!else
68
69OTHERCFLAGS=-DSEPARATE=1
70OTHERSWIGFLAGS=-DSEPARATE
71TARGET2 = utilsc
72OBJECTS2 = utils.obj
73target2=$(TARGETDIR)\$(TARGET2).pyd
74!endif
75
76PYMODULES = $(TARGETDIR)\wx.py $(TARGETDIR)\events.py \
77 $(TARGETDIR)\windows.py $(TARGETDIR)\misc.py \
78 $(TARGETDIR)\gdi.py $(TARGETDIR)\mdi.py \
79 $(TARGETDIR)\controls.py $(TARGETDIR)\controls2.py \
80 $(TARGETDIR)\windows2.py $(TARGETDIR)\cmndlgs.py \
81 $(TARGETDIR)\stattool.py $(TARGETDIR)\frames.py \
82 $(TARGETDIR)\utils.py $(TARGETDIR)\windows3.py \
83 $(TARGETDIR)\__init__.py
84
85
86#----------------------------------------------------------------------
87
88!if "$(FINAL)" == "0"
89DEBUGLFLAGS = /DEBUG /INCREMENTAL:YES
90!else
91DEBUGLFLAGS = /INCREMENTAL:NO
92!endif
93
94LFLAGS= $(DEBUGLFLAGS) /DLL /def:$(TARGET).def /subsystem:windows,3.50 \
95 /machine:I386 /implib:./$(TARGET).lib /nologo
96
97LFLAGS2=$(DEBUGLFLAGS) /DLL /def:$(TARGET2).def /subsystem:windows,3.50 \
98 /machine:I386 /implib:./$(TARGET2).lib /nologo
99
100#----------------------------------------------------------------------
101
102default: $(TARGETDIR)\$(TARGET).pyd $(target2) pycfiles
103
104all: wx $(TARGET) $(TARGET2)
105
106wx:
107 cd $(WXDIR)\src\msw
108 nmake -f makefile.nt FINAL=$(FINAL)
109 cd $(THISDIR)
110
111wxclean:
112 cd $(WXDIR)\src\msw
113 nmake -f makefile.nt clean
114 cd $(THISDIR)
115
116
117pycfiles : $(PYMODULES)
118!if "$(COMPILEPY)" == "1"
119 $(PYTHONDIR)\python $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR)
120 $(PYTHONDIR)\python -O $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR)
121!endif
122
123#----------------------------------------------------------------------
124
125$(TARGETDIR)\$(TARGET).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(TARGET).res
126 $(link) @<<
127/out:$@ /dll
128$(LFLAGS)
129$(DUMMYOBJ) $(OBJECTS) $(TARGET).res
130$(LIBS)
131<<
132
133$(TARGETDIR)\$(TARGET2).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS2)
134 $(link) @<<
135/out:$@ /dll
136$(LFLAGS2)
137$(DUMMYOBJ) $(OBJECTS2)
138$(LIBS)
139<<
140
141
142$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
143 $(rc) -r /i$(WXDIR)\include -fo$@ $(TARGET).rc
144
145
146
147# implicit rule for compiling .cpp files
148{}.cpp{}.obj:
149 $(cc) @<<
150$(CPPFLAGS) /c /Tp $<
151<<
152
153{$(GENCODEDIR)}.cpp{}.obj:
154 $(cc) @<<
155$(CPPFLAGS) /c /Tp $<
156<<
157
158
159clean:
160 -erase *.obj
161 -erase *.exe
162 -erase *.res
163 -erase *.map
164 -erase *.sbr
165 -erase *.pdb
166 -erase *.pch
167 -erase $(TARGET).exp
168 -erase $(TARGET).lib
169 -erase $(TARGETDIR)\$(TARGET).*
170!if "$(SEPARATE)" != "0"
171 -erase $(TARGET2).exp
172 -erase $(TARGET2).lib
173 -erase $(TARGETDIR)\$(TARGET2).*
174!endif
175 -erase $(TARGETDIR)\$(TARGET).pyd
176 -erase $(TARGETDIR)\*.py
177 -erase $(TARGETDIR)\*.pyc
178 -erase $(TARGETDIR)\*.pyo
179
180
181showflags:
182 @echo $(CPPFLAGS)
183
184#------------------------------------------------------------------------
185
186.SUFFIXES : .i .py
187
188# Implicit rules to run SWIG
189{}.i{$(GENCODEDIR)}.cpp:
190 swig $(SWIGFLAGS) -c -o $@ $<
191
192{}.i{$(GENCODEDIR)}.py:
193 swig $(SWIGFLAGS) -c -o $@ $<
194
195
196{$(GENCODEDIR)}.py{$(TARGETDIR)}.py:
197 copy $< $@
198
199{}.py{$(TARGETDIR)}.py:
200 copy $< $@
201
202#{}.py{$(TARGETDIR)}.$(PYEXT):
203# $(PYTHON) -c "import py_compile; py_compile.compile('$<', '$@')"
204
205
206
207
208# This one must leave out the -c flag so we define the whole rule
209$(GENCODEDIR)\wx.cpp $(GENCODEDIR)\wx.py : wx.i my_typemaps.i _defs.i _extras.py
210 swig $(SWIGFLAGS) -o $(GENCODEDIR)/wx.cpp wx.i
211
212
213# Define some dependencies. These MUST use forward slashes so SWIG
214# will write the shadow file to the right directory.
215$(GENCODEDIR)/windows.cpp $(GENCODEDIR)/windows.py : windows.i my_typemaps.i _defs.i
216$(GENCODEDIR)/windows2.cpp $(GENCODEDIR)/windows2.py : windows2.i my_typemaps.i _defs.i
217$(GENCODEDIR)/windows3.cpp $(GENCODEDIR)/windows3.py : windows3.i my_typemaps.i _defs.i
218$(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py : events.i my_typemaps.i _defs.i
219$(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py : misc.i my_typemaps.i _defs.i
220$(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py : gdi.i my_typemaps.i _defs.i
221$(GENCODEDIR)/mdi.cpp $(GENCODEDIR)/mdi.py : mdi.i my_typemaps.i _defs.i
222$(GENCODEDIR)/controls.cpp $(GENCODEDIR)/controls.py : controls.i my_typemaps.i _defs.i
223$(GENCODEDIR)/controls2.cpp $(GENCODEDIR)/controls2.py : controls2.i my_typemaps.i _defs.i
224$(GENCODEDIR)/cmndlgs.cpp $(GENCODEDIR)/cmndlgs.py : cmndlgs.i my_typemaps.i _defs.i
225$(GENCODEDIR)/stattool.cpp $(GENCODEDIR)/stattool.py : stattool.i my_typemaps.i _defs.i
226$(GENCODEDIR)/frames.cpp $(GENCODEDIR)/frames.py : frames.i my_typemaps.i _defs.i
227
228!if "$(SEPARATE)" == "1"
229$(GENCODEDIR)\utils.cpp $(GENCODEDIR)\utils.py : utils.i my_typemaps.i
230 swig $(SWIGFLAGS) -o $(GENCODEDIR)/utils.cpp utils.i
231!else
232$(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py : utils.i my_typemaps.i _defs.i
233!endif
234
235
236$(TARGETDIR)\wx.py : $(GENCODEDIR)\wx.py
237$(TARGETDIR)\windows.py : $(GENCODEDIR)\windows.py
238$(TARGETDIR)\windows2.py : $(GENCODEDIR)\windows2.py
239$(TARGETDIR)\windows3.py : $(GENCODEDIR)\windows3.py
240$(TARGETDIR)\events.py : $(GENCODEDIR)\events.py
241$(TARGETDIR)\misc.py : $(GENCODEDIR)\misc.py
242$(TARGETDIR)\gdi.py : $(GENCODEDIR)\gdi.py
243$(TARGETDIR)\mdi.py : $(GENCODEDIR)\mdi.py
244$(TARGETDIR)\controls.py : $(GENCODEDIR)\controls.py
245$(TARGETDIR)\controls2.py : $(GENCODEDIR)\controls2.py
246$(TARGETDIR)\cmndlgs.py : $(GENCODEDIR)\cmndlgs.py
247$(TARGETDIR)\frames.py : $(GENCODEDIR)\frames.py
248$(TARGETDIR)\stattool.py : $(GENCODEDIR)\stattool.py
249$(TARGETDIR)\utils.py : $(GENCODEDIR)\utils.py
250$(TARGETDIR)\__init__.py : __init__.py
251
252
253SOURCES = $(GENCODEDIR)\wx.cpp $(GENCODEDIR)\wx.py \
254 $(GENCODEDIR)/windows.cpp $(GENCODEDIR)/windows.py \
255 $(GENCODEDIR)/windows2.cpp $(GENCODEDIR)/windows2.py \
256 $(GENCODEDIR)/windows3.cpp $(GENCODEDIR)/windows3.py \
257 $(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py \
258 $(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py \
259 $(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py \
260 $(GENCODEDIR)/mdi.cpp $(GENCODEDIR)/mdi.py \
261 $(GENCODEDIR)/controls.cpp $(GENCODEDIR)/controls.py \
262 $(GENCODEDIR)/controls2.cpp $(GENCODEDIR)/controls2.py\
263 $(GENCODEDIR)/cmndlgs.cpp $(GENCODEDIR)/cmndlgs.py \
264 $(GENCODEDIR)/stattool.cpp $(GENCODEDIR)/stattool.py \
265 $(GENCODEDIR)/frames.cpp $(GENCODEDIR)/frames.py \
266 $(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py \
267
268
269sources : $(SOURCES)
270
271
272dist:
273 cd ..\..
274 wxPython\distrib\zipit.bat $(VERSION)
275
276#------------------------------------------------------------------------
277#
278# $Log$
279# Revision 1.4 1999/03/05 07:22:30 RD
280# Minor wxPython changes for wxWin 2.0
281#
282# Revision 1.3 1999/02/25 07:08:33 RD
283#
284# wxPython version 2.0b5
285#
286# Revision 1.2 1999/02/20 09:03:00 RD
287# Added wxWindow_FromHWND(hWnd) for wxMSW to construct a wxWindow from a
288# window handle. If you can get the window handle into the python code,
289# it should just work... More news on this later.
290#
291# Added wxImageList, wxToolTip.
292#
293# Re-enabled wxConfig.DeleteAll() since it is reportedly fixed for the
294# wxRegConfig class.
295#
296# As usual, some bug fixes, tweaks, etc.
297#
298# Revision 1.1 1999/02/06 23:47:03 RD
299#
300# Changing makefile.nt to makefile.vc as in rest of wxWindows
301#
302# Revision 1.10 1999/02/01 00:10:40 RD
303#
304# Added the missing EVT_LIST_ITEM_SELECTED and friends.
305#
306# Revision 1.9 1999/01/30 07:30:13 RD
307#
308# Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
309#
310# Various cleanup, tweaks, minor additions, etc. to maintain
311# compatibility with the current wxWindows.
312#
313# Revision 1.8 1998/12/21 19:58:06 RD
314#
315# Now compiles with /GX- on MSW.
316#
317# Revision 1.7 1998/12/15 20:41:20 RD
318# Changed the import semantics from "from wxPython import *" to "from
319# wxPython.wx import *" This is for people who are worried about
320# namespace pollution, they can use "from wxPython import wx" and then
321# prefix all the wxPython identifiers with "wx."
322#
323# Added wxTaskbarIcon for wxMSW.
324#
325# Made the events work for wxGrid.
326#
327# Added wxConfig.
328#
329# Added wxMiniFrame for wxGTK, (untested.)
330#
331# Changed many of the args and return values that were pointers to gdi
332# objects to references to reflect changes in the wxWindows API.
333#
334# Other assorted fixes and additions.
335#
336# Revision 1.6 1998/10/02 06:40:41 RD
337#
338# Version 0.4 of wxPython for MSW.
339#
340# Revision 1.5 1998/08/19 00:38:23 RD
341#
342# A few tweaks
343#
344# Revision 1.4 1998/08/18 21:55:10 RD
345#
346# New build directory structure
347#
348# Revision 1.3 1998/08/15 07:36:37 RD
349# - Moved the header in the .i files out of the code that gets put into
350# the .cpp files. It caused CVS conflicts because of the RCS ID being
351# different each time.
352#
353# - A few minor fixes.
354#
355# Revision 1.2 1998/08/14 03:34:23 RD
356# made pre-compiling the python files optional
357#
358# Revision 1.1 1998/08/09 08:25:51 RD
359# Initial version
360#