#---------------------------------------------------------------------------- # Name: makefile.nt # Purpose: Win32, VC++ 5/6 makefile for wxPython # # Author: Robin Dunn # # Created: 3/27/97 # RCS-ID: $Id$ # Copyright: (c) 1998 by Total Control Software # Licence: wxWindows license #---------------------------------------------------------------------------- VERSION=2.0b9 # 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, and should be # named wxPython TARGETDIR=.. # Set this to 1 for make to pre-compile the Python modules, 0 to # just copy the sources and let Python compile them the first # time they are imported. COMPILEPY=0 # If your wxWindows is built as a DLL, set this to 1. Using 0 or unset # means that wxWindows will be staticaly linked with wxPython. #WXUSINGDLL=1 # If you want to compile in code to aquire/release the Python # Interpreter Lock at the appropriate places WXP_USE_THREAD=1 # Set this if you want to build the wxGLCanvas WITH_GLCANVAS=1 # (experimental) SEPARATE=0 #---------------------------------------------------------------------- !if "$(WXP_USE_THREAD)" == "1" THREAD=-DWXP_USE_THREAD=1 !endif #---------------------------------------------------------------------- NOPCH=1 THISDIR=$(WXDIR)\utils\wxPython EXTRALIBS=$(PYTHONDIR)\libs\python15.lib $(GLLIBS) #EXTRALIBS=$(PYTHONDIR)\PCbuild\python15_d.lib -D_DEBUG EXTRAINC=-I$(PYTHONDIR)\include -I. -I$(WXDIR)\utils\glcanvas\win EXTRAFLAGS=/Fpwxp.pch /YXhelpers.h -DSWIG_GLOBAL -DHAVE_CONFIG_H $(THREAD) OVERRIDEFLAGS=/GX- $(OTHERCFLAGS) !if "$(WITH_GLCANVAS)" == "1" GLLIBS=$(WXDIR)\lib\glcanvas.lib glu32.lib opengl32.lib OTHERSWIGFLAGS=-DWITH_GLCANVAS OTHERCFLAGS=-DWITH_GLCANVAS !endif SWIGFLAGS=-c++ -shadow -python -dnone -D__WXMSW__ $(OTHERSWIGFLAGS) GENCODEDIR=msw !include $(WXDIR)\src\ntwxwin.mak #---------------------------------------------------------------------- TARGET = wxc OBJECTS = wx.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 windows3.obj image.obj \ !if "$(SEPARATE)" == "0" utils.obj \ !if "$(WITH_GLCANVAS)" == "1" glcanvas.obj !endif !else OTHERCFLAGS=$(OTHERCFLAGS) -DSEPARATE=1 OTHERSWIGFLAGS=$(OTHERSWIGFLAGS) -DSEPARATE TARGET2 = utilsc OBJECTS2 = utils.obj target2=$(TARGETDIR)\$(TARGET2).pyd TARGET3 = glcanvasc OBJECTS3 = glcanvas.obj target3=$(TARGETDIR)\$(TARGET3).pyd !endif PYMODULES = $(TARGETDIR)\wx.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)\windows3.py $(TARGETDIR)\__init__.py \ $(TARGETDIR)\utils.py $(TARGETDIR)\image.py \ !if "$(WITH_GLCANVAS)" == "1" $(TARGETDIR)\glcanvas.py !endif #---------------------------------------------------------------------- !if "$(FINAL)" == "0" DEBUGLFLAGS = /DEBUG /INCREMENTAL:YES !else DEBUGLFLAGS = /INCREMENTAL:NO !endif LFLAGS= $(DEBUGLFLAGS) /DLL /subsystem:windows,3.50 /machine:I386 /nologo #---------------------------------------------------------------------- default: $(TARGETDIR)\$(TARGET).pyd $(target2) $(target3) pycfiles all: wx $(TARGET) $(TARGET2) $(TARGET3) 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) /def:$(TARGET).def /implib:./$(TARGET).lib $(DUMMYOBJ) $(OBJECTS) $(TARGET).res $(LIBS) << $(TARGETDIR)\$(TARGET2).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS2) $(link) @<< /out:$@ /dll $(LFLAGS) /def:$(TARGET2).def /implib:./$(TARGET2).lib $(DUMMYOBJ) $(OBJECTS2) $(LIBS) wxc.lib << $(TARGETDIR)\$(TARGET3).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS3) $(link) @<< /out:$@ /dll $(LFLAGS) /def:$(TARGET3).def /implib:./$(TARGET3).lib $(DUMMYOBJ) $(OBJECTS3) $(LIBS) $(WXDIR)\lib\glcanvas.lib glu32.lib opengl32.lib wxc.lib << $(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).* !if "$(SEPARATE)" != "0" -erase $(TARGET2).exp -erase $(TARGET2).lib -erase $(TARGETDIR)\$(TARGET2).* -erase $(TARGET3).exp -erase $(TARGET3).lib -erase $(TARGETDIR)\$(TARGET3).* !endif -erase $(TARGETDIR)\$(TARGET).pyd -erase $(TARGETDIR)\*.py -erase $(TARGETDIR)\*.pyc -erase $(TARGETDIR)\*.pyo showflags: @echo $(CPPFLAGS) #------------------------------------------------------------------------ .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)\wx.cpp $(GENCODEDIR)\wx.py : wx.i my_typemaps.i _defs.i _extras.py swig $(SWIGFLAGS) -o $(GENCODEDIR)/wx.cpp wx.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)/windows3.cpp $(GENCODEDIR)/windows3.py : windows3.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 $(GENCODEDIR)/image.cpp $(GENCODEDIR)/image.py : image.i my_typemaps.i _defs.i !if "$(SEPARATE)" == "1" $(GENCODEDIR)\utils.cpp $(GENCODEDIR)\utils.py : utils.i my_typemaps.i swig $(SWIGFLAGS) -o $(GENCODEDIR)/utils.cpp utils.i !if "$(WITH_GLCANVAS)" == "1" $(GENCODEDIR)\glcanvas.cpp $(GENCODEDIR)\glcanvas.py : glcanvas.i my_typemaps.i swig $(SWIGFLAGS) -c -o $(GENCODEDIR)/glcanvas.cpp glcanvas.i !endif !else $(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py : utils.i my_typemaps.i _defs.i !if "$(WITH_GLCANVAS)" == "1" $(GENCODEDIR)/glcanvas.cpp $(GENCODEDIR)/glcanvas.py : glcanvas.i my_typemaps.i _defs.i !endif !endif $(TARGETDIR)\wx.py : $(GENCODEDIR)\wx.py $(TARGETDIR)\windows.py : $(GENCODEDIR)\windows.py $(TARGETDIR)\windows2.py : $(GENCODEDIR)\windows2.py $(TARGETDIR)\windows3.py : $(GENCODEDIR)\windows3.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 $(TARGETDIR)\utils.py : $(GENCODEDIR)\utils.py $(TARGETDIR)\image.py : $(GENCODEDIR)\utils.py !if "$(WITH_GLCANVAS)" == "1" $(TARGETDIR)\glcanvas.py : $(GENCODEDIR)\glcanvas.py !endif SOURCES = $(GENCODEDIR)\wx.cpp $(GENCODEDIR)\wx.py \ $(GENCODEDIR)/windows.cpp $(GENCODEDIR)/windows.py \ $(GENCODEDIR)/windows2.cpp $(GENCODEDIR)/windows2.py \ $(GENCODEDIR)/windows3.cpp $(GENCODEDIR)/windows3.py \ $(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py \ $(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py \ $(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py \ $(GENCODEDIR)/mdi.cpp $(GENCODEDIR)/mdi.py \ $(GENCODEDIR)/controls.cpp $(GENCODEDIR)/controls.py \ $(GENCODEDIR)/controls2.cpp $(GENCODEDIR)/controls2.py\ $(GENCODEDIR)/cmndlgs.cpp $(GENCODEDIR)/cmndlgs.py \ $(GENCODEDIR)/stattool.cpp $(GENCODEDIR)/stattool.py \ $(GENCODEDIR)/frames.cpp $(GENCODEDIR)/frames.py \ $(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py \ $(GENCODEDIR)/image.cpp $(GENCODEDIR)/image.py \ !if "$(WITH_GLCANVAS)" == "1" $(GENCODEDIR)/glcanvas.cpp $(GENCODEDIR)/glcanvas.py \ !endif sources : $(SOURCES) dist: cd ..\.. wxPython\distrib\zipit.bat $(VERSION) #------------------------------------------------------------------------ #