git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
232 lines
6.6 KiB
Plaintext
232 lines
6.6 KiB
Plaintext
#----------------------------------------------------------------------------
|
|
# Name: makefile.nt
|
|
# Purpose: Win32, VC++ 5 makefile for wxPython
|
|
#
|
|
# Author: Robin Dunn
|
|
#
|
|
# Created: 3/27/97
|
|
# RCS-ID: $Id$
|
|
# Copyright: (c) 1998 by Total Control Software
|
|
# Licence: wxWindows license
|
|
#----------------------------------------------------------------------------
|
|
|
|
# Set WXDIR to the root wxWindows directory for your system
|
|
WXDIR = $(WXWIN)
|
|
|
|
# Set this to the root of the Python installation
|
|
PYTHONDIR=e:\Tools\Python15
|
|
|
|
# Set this to 1 for a non-debug, optimised compile
|
|
FINAL=0
|
|
|
|
# Set this to where you want the stuff installed at. It should
|
|
# be a directory contained in a PYTHONPATH directory.
|
|
TARGETDIR=..
|
|
|
|
# Set this to 1 for make to pre-compile the Python modules, 0 to
|
|
# just copy the sources and let Python compile them at the first
|
|
# runtime.
|
|
COMPILEPY=0
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
WXUSINGDLL=0
|
|
NOPCH=1
|
|
THISDIR=$(WXDIR)\utils\wxPython
|
|
|
|
EXTRALIBS=$(PYTHONDIR)\libs\python15.lib
|
|
EXTRAINC=-I$(PYTHONDIR)\include -I.
|
|
EXTRAFLAGS=/Fpwxp.pch /YXhelpers.h -DSWIG_GLOBAL -DHAVE_CONFIG_H
|
|
|
|
SWIGFLAGS=-c++ -shadow -python -dnone -D__WXMSW__
|
|
GENCODEDIR=msw
|
|
|
|
|
|
!include $(WXDIR)\src\ntwxwin.mak
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
TARGET = wxpc
|
|
|
|
OBJECTS = wxp.obj helpers.obj windows.obj events.obj \
|
|
misc.obj gdi.obj mdi.obj controls.obj \
|
|
controls2.obj windows2.obj cmndlgs.obj stattool.obj \
|
|
frames.obj
|
|
|
|
|
|
PYMODULES = $(TARGETDIR)\wxp.py $(TARGETDIR)\events.py \
|
|
$(TARGETDIR)\windows.py $(TARGETDIR)\misc.py \
|
|
$(TARGETDIR)\gdi.py $(TARGETDIR)\mdi.py \
|
|
$(TARGETDIR)\controls.py $(TARGETDIR)\controls2.py \
|
|
$(TARGETDIR)\windows2.py $(TARGETDIR)\cmndlgs.py \
|
|
$(TARGETDIR)\stattool.py $(TARGETDIR)\frames.py \
|
|
$(TARGETDIR)\__init__.py
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
!if "$(FINAL)" == "0"
|
|
DEBUGLFLAGS = /DEBUG /INCREMENTAL:YES
|
|
!else
|
|
DEBUGLFLAGS = /INCREMENTAL:NO
|
|
!endif
|
|
|
|
LFLAGS= $(DEBUGLFLAGS) /DLL /def:$(TARGET).def /subsystem:windows,3.50 \
|
|
/machine:I386 /implib:./$(TARGET).lib /nologo
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
default: $(TARGETDIR)\$(TARGET).pyd pycfiles
|
|
|
|
all: wx $(TARGET)
|
|
|
|
wx:
|
|
cd $(WXDIR)\src\msw
|
|
nmake -f makefile.nt FINAL=$(FINAL)
|
|
cd $(THISDIR)
|
|
|
|
wxclean:
|
|
cd $(WXDIR)\src\msw
|
|
nmake -f makefile.nt clean
|
|
cd $(THISDIR)
|
|
|
|
|
|
pycfiles : $(PYMODULES)
|
|
!if "$(COMPILEPY)" == "1"
|
|
$(PYTHONDIR)\python $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR)
|
|
$(PYTHONDIR)\python -O $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR)
|
|
!endif
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
$(TARGETDIR)\$(TARGET).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(TARGET).res
|
|
$(link) @<<
|
|
/out:$@ /dll
|
|
$(LFLAGS)
|
|
$(DUMMYOBJ) $(OBJECTS) $(TARGET).res
|
|
$(LIBS)
|
|
<<
|
|
|
|
|
|
$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
|
|
$(rc) -r /i$(WXDIR)\include -fo$@ $(TARGET).rc
|
|
|
|
|
|
|
|
# implicit rule for compiling .cpp files
|
|
{}.cpp{}.obj:
|
|
$(cc) @<<
|
|
$(CPPFLAGS) /c /Tp $<
|
|
<<
|
|
|
|
{$(GENCODEDIR)}.cpp{}.obj:
|
|
$(cc) @<<
|
|
$(CPPFLAGS) /c /Tp $<
|
|
<<
|
|
|
|
|
|
clean:
|
|
-erase *.obj
|
|
-erase *.exe
|
|
-erase *.res
|
|
-erase *.map
|
|
-erase *.sbr
|
|
-erase *.pdb
|
|
-erase *.pch
|
|
-erase $(TARGET).exp
|
|
-erase $(TARGET).lib
|
|
-erase $(TARGETDIR)\$(TARGET).pyd
|
|
-erase $(TARGETDIR)\*.py
|
|
-erase $(TARGETDIR)\*.pyc
|
|
-erase $(TARGETDIR)\*.pyo
|
|
-erase $(TARGETDIR)\$(TARGET).*
|
|
|
|
|
|
|
|
#------------------------------------------------------------------------
|
|
|
|
.SUFFIXES : .i .py
|
|
|
|
# Implicit rules to run SWIG
|
|
{}.i{$(GENCODEDIR)}.cpp:
|
|
swig $(SWIGFLAGS) -c -o $@ $<
|
|
|
|
{}.i{$(GENCODEDIR)}.py:
|
|
swig $(SWIGFLAGS) -c -o $@ $<
|
|
|
|
|
|
{$(GENCODEDIR)}.py{$(TARGETDIR)}.py:
|
|
copy $< $@
|
|
|
|
{}.py{$(TARGETDIR)}.py:
|
|
copy $< $@
|
|
|
|
#{}.py{$(TARGETDIR)}.$(PYEXT):
|
|
# $(PYTHON) -c "import py_compile; py_compile.compile('$<', '$@')"
|
|
|
|
|
|
|
|
|
|
# This one must leave out the -c flag so we define the whole rule
|
|
$(GENCODEDIR)\wxp.cpp $(GENCODEDIR)\wxp.py : wxp.i my_typemaps.i _defs.i _extras.py
|
|
swig $(SWIGFLAGS) -o $(GENCODEDIR)/wxp.cpp wxp.i
|
|
|
|
|
|
# Define some dependencies. These MUST use forward slashes so SWIG
|
|
# will write the shadow file to the right directory.
|
|
$(GENCODEDIR)/windows.cpp $(GENCODEDIR)/windows.py : windows.i my_typemaps.i _defs.i
|
|
$(GENCODEDIR)/windows2.cpp $(GENCODEDIR)/windows2.py : windows2.i my_typemaps.i _defs.i
|
|
$(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py : events.i my_typemaps.i _defs.i
|
|
$(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py : misc.i my_typemaps.i _defs.i
|
|
$(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py : gdi.i my_typemaps.i _defs.i
|
|
$(GENCODEDIR)/mdi.cpp $(GENCODEDIR)/mdi.py : mdi.i my_typemaps.i _defs.i
|
|
$(GENCODEDIR)/controls.cpp $(GENCODEDIR)/controls.py : controls.i my_typemaps.i _defs.i
|
|
$(GENCODEDIR)/controls2.cpp $(GENCODEDIR)/controls2.py : controls2.i my_typemaps.i _defs.i
|
|
$(GENCODEDIR)/cmndlgs.cpp $(GENCODEDIR)/cmndlgs.py : cmndlgs.i my_typemaps.i _defs.i
|
|
$(GENCODEDIR)/stattool.cpp $(GENCODEDIR)/stattool.py : stattool.i my_typemaps.i _defs.i
|
|
$(GENCODEDIR)/frames.cpp $(GENCODEDIR)/frames.py : frames.i my_typemaps.i _defs.i
|
|
|
|
|
|
$(TARGETDIR)\wxp.py : $(GENCODEDIR)\wxp.py
|
|
$(TARGETDIR)\windows.py : $(GENCODEDIR)\windows.py
|
|
$(TARGETDIR)\windows2.py : $(GENCODEDIR)\windows2.py
|
|
$(TARGETDIR)\events.py : $(GENCODEDIR)\events.py
|
|
$(TARGETDIR)\misc.py : $(GENCODEDIR)\misc.py
|
|
$(TARGETDIR)\gdi.py : $(GENCODEDIR)\gdi.py
|
|
$(TARGETDIR)\mdi.py : $(GENCODEDIR)\mdi.py
|
|
$(TARGETDIR)\controls.py : $(GENCODEDIR)\controls.py
|
|
$(TARGETDIR)\controls2.py : $(GENCODEDIR)\controls2.py
|
|
$(TARGETDIR)\cmndlgs.py : $(GENCODEDIR)\cmndlgs.py
|
|
$(TARGETDIR)\frames.py : $(GENCODEDIR)\frames.py
|
|
$(TARGETDIR)\stattool.py : $(GENCODEDIR)\stattool.py
|
|
$(TARGETDIR)\__init__.py : __init__.py
|
|
|
|
|
|
#------------------------------------------------------------------------
|
|
#
|
|
# $Log$
|
|
# Revision 1.6 1998/10/02 06:40:41 RD
|
|
# Version 0.4 of wxPython for MSW.
|
|
#
|
|
# Revision 1.5 1998/08/19 00:38:23 RD
|
|
#
|
|
# A few tweaks
|
|
#
|
|
# Revision 1.4 1998/08/18 21:55:10 RD
|
|
#
|
|
# New build directory structure
|
|
#
|
|
# Revision 1.3 1998/08/15 07:36:37 RD
|
|
# - Moved the header in the .i files out of the code that gets put into
|
|
# the .cpp files. It caused CVS conflicts because of the RCS ID being
|
|
# different each time.
|
|
#
|
|
# - A few minor fixes.
|
|
#
|
|
# Revision 1.2 1998/08/14 03:34:23 RD
|
|
# made pre-compiling the python files optional
|
|
#
|
|
# Revision 1.1 1998/08/09 08:25:51 RD
|
|
# Initial version
|
|
#
|