]> git.saurik.com Git - wxWidgets.git/blame - utils/wxPython/modules/makeinc.vc
started adding modules tree...
[wxWidgets.git] / utils / wxPython / modules / makeinc.vc
CommitLineData
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#----------------------------------------------------------------------------
13VERSION=2.1b2
14
15# Set WXDIR to the root wxWindows directory for your system
16WXDIR = $(WXWIN)
17
18# Set this to the root of the Python installation
19PYTHONDIR=\progra~1\Python
20
21# Set this to 1 for a non-debug, optimised compile
22FINAL=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
27TARGETDIR=$(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.
32COMPILEPY=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.
36WXUSINGDLL=1
37
38# If you want to compile in code to aquire/release the Python
39# Interpreter Lock at the appropriate places
40WXP_USE_THREAD=1
41
42
43#----------------------------------------------------------------------
44
45!if "$(WXP_USE_THREAD)" == "1"
46THREAD=-DWXP_USE_THREAD=1
47!endif
48
49#----------------------------------------------------------------------
50
51NOPCH=1
52THISDIR=$(WXDIR)\utils\wxPython\modules
53WXPSRCDIR=$(WXDIR)\utils\wxPython\src
54
55EXTRALIBS=$(PYTHONDIR)\libs\python15.lib $(WXPSRCDIR)\wxc.lib
56#EXTRALIBS=$(PYTHONDIR)\PCbuild\python15_d.lib -D_DEBUG
57EXTRAINC=-I$(PYTHONDIR)\include -I$(WXPSRCDIR) -I.
58EXTRAFLAGS=/Fpwxp.pch /YXhelpers.h -DSWIG_GLOBAL -DHAVE_CONFIG_H $(THREAD)
59OVERRIDEFLAGS=/GX- $(OTHERCFLAGS)
60
61
62SWIGFLAGS=-c++ -shadow -python -dnone -D__WXMSW__ -I$(WXPSRCDIR)
63GENCODEDIR=msw
64
65
66!include $(WXDIR)\src\makevc.env
67
68#----------------------------------------------------------------------
69
70!if "$(FINAL)" == "1"
71DEBUGLFLAGS = /DEBUG /INCREMENTAL:YES
72!else
73DEBUGLFLAGS = /INCREMENTAL:NO
74!endif
75
76LFLAGS= $(DEBUGLFLAGS) /DLL /subsystem:windows,3.50 /machine:I386 /nologo
77
78#----------------------------------------------------------------------
79
80def: default
81
82
83showflags:
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
125clean:
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
137dist:
138 cd ..\..
139 wxPython\distrib\zipit.bat $(VERSION)
140
141pycfiles : $(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
150sources : $(SOURCES)
151
152#----------------------------------------------------------------------