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