]>
Commit | Line | Data |
---|---|---|
05394a18 HH |
1 | # -*- makefile -*- |
2 | #---------------------------------------------------------------------------- | |
3 | # Name: makefile.nt | |
4 | # Purpose: Win32, VC++ 5/6 makefile for wxPython | |
5 | # | |
6 | # Author: Robin Dunn | |
7 | # | |
8 | # Created: 3/27/97 | |
9 | # RCS-ID: $Id$ | |
10 | # Copyright: (c) 1998 by Total Control Software | |
11 | # Licence: wxWindows license | |
12 | #---------------------------------------------------------------------------- | |
13 | VERSION=2.1b2 | |
14 | ||
15 | # Set WXDIR to the root wxWindows directory for your system | |
16 | WXDIR = $(WXWIN) | |
17 | ||
18 | # Set this to the root of the Python installation | |
19 | PYTHONDIR=\progra~1\Python | |
20 | ||
21 | # Set this to 1 for a non-debug, optimised compile | |
22 | FINAL=1 | |
23 | ||
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 | |
26 | # named wxPython | |
27 | TARGETDIR=$(PYTHONDIR)\wxPython | |
28 | ||
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. | |
32 | COMPILEPY=0 | |
33 | ||
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. | |
36 | WXUSINGDLL=1 | |
37 | ||
38 | # If you want to compile in code to aquire/release the Python | |
39 | # Interpreter Lock at the appropriate places | |
40 | WXP_USE_THREAD=1 | |
41 | ||
42 | ||
43 | #---------------------------------------------------------------------- | |
44 | ||
45 | !if "$(WXP_USE_THREAD)" == "1" | |
46 | THREAD=-DWXP_USE_THREAD=1 | |
47 | !endif | |
48 | ||
49 | #---------------------------------------------------------------------- | |
50 | ||
51 | NOPCH=1 | |
52 | THISDIR=$(WXDIR)\utils\wxPython\modules | |
53 | WXPSRCDIR=$(WXDIR)\utils\wxPython\src | |
54 | ||
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) | |
60 | ||
61 | ||
62 | SWIGFLAGS=-c++ -shadow -python -dnone -D__WXMSW__ -I$(WXPSRCDIR) | |
63 | GENCODEDIR=msw | |
64 | ||
65 | ||
66 | !include $(WXDIR)\src\makevc.env | |
67 | ||
68 | #---------------------------------------------------------------------- | |
69 | ||
70 | !if "$(FINAL)" == "1" | |
71 | DEBUGLFLAGS = /DEBUG /INCREMENTAL:YES | |
72 | !else | |
73 | DEBUGLFLAGS = /INCREMENTAL:NO | |
74 | !endif | |
75 | ||
76 | LFLAGS= $(DEBUGLFLAGS) /DLL /subsystem:windows,3.50 /machine:I386 /nologo | |
77 | ||
78 | #---------------------------------------------------------------------- | |
79 | ||
80 | def: default | |
81 | ||
82 | ||
83 | showflags: | |
84 | @echo $(CPPFLAGS) | |
85 | ||
86 | # implicit rule for compiling .cpp and .c files | |
87 | {}.cpp{}.obj: | |
88 | $(cc) @<< | |
89 | $(CPPFLAGS) /c /Tp $< | |
90 | << | |
91 | ||
92 | {$(GENCODEDIR)}.cpp{}.obj: | |
93 | $(cc) @<< | |
94 | $(CPPFLAGS) /c /Tp $< | |
95 | << | |
96 | ||
97 | {}.c{}.obj: | |
98 | $(cc) @<< | |
99 | $(CPPFLAGS) /c $< | |
100 | << | |
101 | ||
102 | ||
103 | #------------------------------------------------------------------------ | |
104 | ||
105 | .SUFFIXES : .i .py | |
106 | ||
107 | # Implicit rules to run SWIG | |
108 | {}.i{$(GENCODEDIR)}.cpp: | |
109 | swig $(SWIGFLAGS) -c -o $@ $< | |
110 | ||
111 | {}.i{$(GENCODEDIR)}.py: | |
112 | swig $(SWIGFLAGS) -c -o $(GENCODEDIR)\tmp_wrap.cpp $< | |
113 | -erase $(GENCODEDIR)\tmp_wrap.cpp | |
114 | ||
115 | ||
116 | {$(GENCODEDIR)}.py{$(TARGETDIR)}.py: | |
117 | copy $< $@ | |
118 | ||
119 | {}.py{$(TARGETDIR)}.py: | |
120 | copy $< $@ | |
121 | ||
122 | #{}.py{$(TARGETDIR)}.$(PYEXT): | |
123 | # $(PYTHON) -c "import py_compile; py_compile.compile('$<', '$@')" | |
124 | ||
125 | clean: | |
126 | -erase *.obj | |
127 | -erase *.exe | |
128 | -erase *.res | |
129 | -erase *.map | |
130 | -erase *.sbr | |
131 | -erase *.pdb | |
132 | -erase *.pch | |
133 | -erase $(TARGET).exp | |
134 | -erase $(TARGET).lib | |
135 | # -erase $(TARGETDIR)\$(TARGET).* | |
136 | ||
137 | dist: | |
138 | cd ..\.. | |
139 | wxPython\distrib\zipit.bat $(VERSION) | |
140 | ||
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) | |
145 | !endif | |
146 | ||
147 | $(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc | |
148 | $(rc) -r /i$(WXDIR)\include -fo$@ $(TARGET).rc | |
149 | ||
150 | sources : $(SOURCES) | |
151 | ||
152 | #---------------------------------------------------------------------- |