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