]> git.saurik.com Git - wxWidgets.git/blame - utils/wxPython/src/makefile.nt
Changes mostly as a result of __WXSTUBS__ compilation. The stubs code now
[wxWidgets.git] / utils / wxPython / src / makefile.nt
CommitLineData
7bf85405
RD
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
13# Set WXDIR to the root wxWindows directory for your system
14WXDIR = $(WXWIN)
15
16# Set this to the root of the Python installation
17PYTHONDIR=e:\Tools\Python15
18
19# Set this to 1 for a non-debug, optimised compile
20FINAL=0
21
22# Set this to where you want the stuff installed at. It should
23# be a directory contained in a PYTHONPATH directory.
24TARGETDIR=..
25
3b8b2387
RD
26# Set this to 1 for make to pre-compile the Python modules, 0 to
27# just copy the sources and let Python compile them at the first
28# runtime.
29COMPILEPY=0
7bf85405
RD
30
31#----------------------------------------------------------------------
32
33WXUSINGDLL=0
34NOPCH=1
35THISDIR=$(WXDIR)\utils\wxPython
36
37EXTRALIBS=$(PYTHONDIR)\libs\python15.lib
38EXTRAINC=-I$(PYTHONDIR)\include
39EXTRAFLAGS=/Fpwxp.pch /YXhelpers.h -DSWIG_GLOBAL -DHAVE_CONFIG_H
40
41SWIGFLAGS=-c++ -shadow -python -dnone
42
43
44!include $(WXDIR)\src\ntwxwin.mak
45
46#----------------------------------------------------------------------
47
48TARGET = wxpc
49
50OBJECTS = wxp.obj helpers.obj windows.obj events.obj \
51 misc.obj gdi.obj mdi.obj controls.obj \
52 controls2.obj windows2.obj cmndlgs.obj
53
54PYMODULES = $(TARGETDIR)\wxp.py $(TARGETDIR)\events.py \
55 $(TARGETDIR)\windows.py $(TARGETDIR)\misc.py \
56 $(TARGETDIR)\gdi.py $(TARGETDIR)\mdi.py \
57 $(TARGETDIR)\controls.py $(TARGETDIR)\controls2.py \
58 $(TARGETDIR)\windows2.py $(TARGETDIR)\cmndlgs.py \
59 $(TARGETDIR)\__init__.py
60
61#----------------------------------------------------------------------
62
63!if "$(FINAL)" == "0"
64DEBUGLFLAGS = /DEBUG /INCREMENTAL:YES
65!else
66DEBUGLFLAGS = /INCREMENTAL:NO
67!endif
68
69LFLAGS= $(DEBUGLFLAGS) /DLL /def:$(TARGET).def /subsystem:windows,3.50 \
70 /machine:I386 /implib:./$(TARGET).lib /nologo
71
72#----------------------------------------------------------------------
73
74default: $(TARGETDIR)\$(TARGET).pyd pycfiles
75
76all: wx $(TARGET)
77
78wx:
79 cd $(WXDIR)\src\msw
80 nmake -f makefile.nt FINAL=$(FINAL)
81 cd $(THISDIR)
82
83wxclean:
84 cd $(WXDIR)\src\msw
85 nmake -f makefile.nt clean
86 cd $(THISDIR)
87
88
89pycfiles : $(PYMODULES)
3b8b2387 90!if "$(COMPILEPY)" == "1"
7bf85405
RD
91 $(PYTHONDIR)\python $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR)
92 $(PYTHONDIR)\python -O $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR)
3b8b2387 93!endif
7bf85405
RD
94
95#----------------------------------------------------------------------
96
97$(TARGETDIR)\$(TARGET).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(TARGET).res
98 $(link) @<<
99/out:$@ /dll
100$(LFLAGS)
101$(DUMMYOBJ) $(OBJECTS) $(TARGET).res
102$(LIBS)
103<<
104
105
106$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
107 $(rc) -r /i$(WXDIR)\include -fo$@ $(TARGET).rc
108
109
110
111# implicit rule for compiling .cpp files
112{}.cpp{}.obj:
113 $(cc) @<<
114$(CPPFLAGS) /c /Tp $<
115<<
116
117
118clean:
119 -erase *.obj
120 -erase *.exe
121 -erase *.res
122 -erase *.map
123 -erase *.sbr
124 -erase *.pdb
125 -erase *.pch
126 -erase $(TARGET).exp
127 -erase $(TARGET).lib
128 -erase $(TARGETDIR)\$(TARGET).pyd
129 -erase $(TARGETDIR)\*.py
130 -erase $(TARGETDIR)\*.pyc
131 -erase $(TARGETDIR)\*.pyo
132 -erase $(TARGETDIR)\$(TARGET).*
133
134
135
136#------------------------------------------------------------------------
137
138.SUFFIXES : .i .py
139
140# Implicit rules to run SWIG
141{}.i{}.cpp:
142 swig $(SWIGFLAGS) -c -o $*.cpp $*.i
143
144{}.i{}.py:
145 swig $(SWIGFLAGS) -c -o $*.cpp $*.i
146
147{}.py{$(TARGETDIR)}.py:
148 copy $< $@
149
150#{}.py{$(TARGETDIR)}.$(PYEXT):
151# $(PYTHON) -c "import py_compile; py_compile.compile('$<', '$@')"
152
153
154
155
156# This one must leave out the -c flag so we define the whole rule
157wxp.cpp wxp.py : wxp.i my_typemaps.i _defs.i _extras.py
158 swig $(SWIGFLAGS) -o wxp.cpp wxp.i
159
160
161# define some dependencies
162windows.cpp windows.py : windows.i my_typemaps.i _defs.i
163windows2.cpp windows2.py : windows2.i my_typemaps.i _defs.i
164events.cpp events.py : events.i my_typemaps.i _defs.i
165misc.cpp misc.py : misc.i my_typemaps.i _defs.i
166gdi.cpp gdi.py : gdi.i my_typemaps.i _defs.i
167mdi.cpp mdi.py : mdi.i my_typemaps.i _defs.i
168controls.cpp controls.py : controls.i my_typemaps.i _defs.i
169controls2.cpp controls2.py : controls2.i my_typemaps.i _defs.i
170cmndlgs.cpp cmndlgs.py : cmndlgs.i my_typemaps.i _defs.i
171
172
173$(TARGETDIR)\wxp.py : wxp.py
174$(TARGETDIR)\windows.py : windows.py
175$(TARGETDIR)\windows2.py : windows2.py
176$(TARGETDIR)\events.py : events.py
177$(TARGETDIR)\misc.py : misc.py
178$(TARGETDIR)\gdi.py : gdi.py
179$(TARGETDIR)\mdi.py : mdi.py
180$(TARGETDIR)\controls.py : controls.py
181$(TARGETDIR)\controls2.py : controls2.py
182$(TARGETDIR)\cmndlgs.py : cmndlgs.py
183
184
185#------------------------------------------------------------------------
186#
187# $Log$
3b8b2387
RD
188# Revision 1.2 1998/08/14 03:34:23 RD
189# made pre-compiling the python files optional
190#
7bf85405
RD
191# Revision 1.1 1998/08/09 08:25:51 RD
192# Initial version
193#