diff options
-rwxr-xr-x | py/Makefile.mak | 43 | ||||
-rw-r--r-- | py/all.dsw | 44 | ||||
-rw-r--r-- | py/config/Make.rules.mak | 108 | ||||
-rw-r--r-- | py/modules/IcePy/IcePy.dsp | 225 | ||||
-rwxr-xr-x | py/modules/IcePy/Makefile.mak | 50 | ||||
-rwxr-xr-x | py/modules/Makefile.mak | 19 | ||||
-rwxr-xr-x[-rw-r--r--] | py/python/Makefile.mak (renamed from py/python/generate.mak) | 34 | ||||
-rw-r--r-- | py/python/Python.dsp | 83 |
8 files changed, 235 insertions, 371 deletions
diff --git a/py/Makefile.mak b/py/Makefile.mak new file mode 100755 index 00000000000..de86c5cc8c6 --- /dev/null +++ b/py/Makefile.mak @@ -0,0 +1,43 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved. +# +# This copy of Ice is licensed to you under the terms described in the +# ICE_LICENSE file included in this distribution. +# +# ********************************************************************** + +top_srcdir = . + +!include $(top_srcdir)\config\Make.rules.mak + +SUBDIRS = python modules + +INSTALL_SUBDIRS = $(install_libdir) $(install_slicedir) $(install_pythondir) + +install:: + @if not exist $(prefix) \ + @echo "Creating $(prefix)..." & \ + mkdir $(prefix) + + @for %i in ( $(INSTALL_SUBDIRS) ) do \ + @if not exist %i \ + @echo "Creating %i..." & \ + mkdir %i + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -nologo -f Makefile.mak $@" || exit 1 + +install:: + @if exist slice \ + @echo "making $@ in slice" & \ + cmd /c "cd slice & $(MAKE) -nologo -f Makefile.mak $@" || exit 1 + +install:: + copy ICE_LICENSE $(prefix) + copy LICENSE $(prefix) + +test:: + @python $(top_srcdir)/allTests.py diff --git a/py/all.dsw b/py/all.dsw deleted file mode 100644 index 4b163952408..00000000000 --- a/py/all.dsw +++ /dev/null @@ -1,44 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "IcePy"=.\modules\IcePy\IcePy.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Python
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Python"=.\python\Python.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/py/config/Make.rules.mak b/py/config/Make.rules.mak new file mode 100644 index 00000000000..fac5f00887c --- /dev/null +++ b/py/config/Make.rules.mak @@ -0,0 +1,108 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved. +# +# This copy of Ice is licensed to you under the terms described in the +# ICE_LICENSE file included in this distribution. +# +# ********************************************************************** + +!if "$(ICE_HOME)" == "" +!error ICE_HOME is not defined +!endif + +# +# Select an installation base directory. The directory will be created +# if it does not exist. +# + +prefix = C:\IcePy-$(VERSION) + +# +# Define OPTIMIZE as yes if you want to build with optimization. +# Otherwise the Ice extension is built with debug information. +# + +#OPTIMIZE = yes + +# +# Set PYTHON_HOME to your Python installation directory. +# + +PYTHON_HOME = C:\Python24 + +# +# Define if using STLPort. Required if using MSVC++ 6.0. +# +#STLPORT_HOME = C:\Ice-$(VERSION)-ThirdParty + +# ---------------------------------------------------------------------- +# Don't change anything below this line! +# ---------------------------------------------------------------------- + +SHELL = /bin/sh +VERSION_MAJOR = 3 +VERSION_MINOR = 2 +VERSION_PATCH = 0 +VERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH) +SOVERSION = $(VERSION_MAJOR)$(VERSION_MINOR) +libdir = $(top_srcdir)\python + +install_slicedir = $(prefix)\slice +install_pythondir = $(prefix)\python + +!if exist ($(top_srcdir)\config\Make.rules.msvc) +configdir = $(top_srcdir)\config +!else +configdir = $(ICE_HOME)\config +!endif + +!if "$(STLPORT_HOME)" != "" +LDFLAGS = /LIBPATH:"$(STLPORT_HOME)\lib" +!endif + +!include $(configdir)\Make.rules.msvc + +!if "$(OPTIMIZE)" != "yes" +LIBSUFFIX = $(LIBSUFFIX)d +PYLIBSUFFIX = _$(LIBSUFFIX) +!endif + +ICE_LIBS = ice$(LIBSUFFIX).lib iceutil$(LIBSUFFIX).lib slice$(LIBSUFFIX).lib + +ICE_CPPFLAGS = -I"$(ICE_HOME)\include" +ICE_LDFLAGS = /LIBPATH:"$(ICE_HOME)\lib" + +!if exist ($(top_srcdir)\slice) +slicedir = $(top_srcdir)\slice +!else +slicedir = $(ICE_HOME)\slice +!endif + +PYTHON_CPPFLAGS = -I"$(PYTHON_HOME)\include" +PYTHON_LDFLAGS = /LIBPATH:"$(PYTHON_HOME)\libs" + +install_libdir = $(prefix)\python +libsubdir = lib + +ICECPPFLAGS = -I$(slicedir) +SLICE2PYFLAGS = $(ICECPPFLAGS) + +SLICE2PY = $(ICE_HOME)\bin\slice2py.exe + +EVERYTHING = all depend clean install + +.SUFFIXES: +.SUFFIXES: .cpp .obj .py + +all:: $(SRCS) + +.cpp.obj:: + $(CXX) /c $(CPPFLAGS) $(CXXFLAGS) $< + +clean:: + del /q $(TARGETS) core *.obj *.pyc *.bak + +all:: $(SRCS) $(TARGETS) + +install:: diff --git a/py/modules/IcePy/IcePy.dsp b/py/modules/IcePy/IcePy.dsp deleted file mode 100644 index aeda01c0f16..00000000000 --- a/py/modules/IcePy/IcePy.dsp +++ /dev/null @@ -1,225 +0,0 @@ -# Microsoft Developer Studio Project File - Name="IcePy" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=IcePy - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "IcePy.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "IcePy.mak" CFG="IcePy - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "IcePy - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "IcePy - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "IcePy - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Yu"stdafx.h" /FD /c
-# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I "." /I "$(ICE_HOME)\include" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "WIN32" /FD /c
-# SUBTRACT CPP /Fr /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 Ice.lib Slice.lib IceUtil.lib python24.lib /nologo /dll /machine:I386 /libpath:"$(ICE_HOME)\lib" /export:initIcePy
-# SUBTRACT LINK32 /pdb:none
-# Begin Special Build Tool
-OutDir=.\Release
-SOURCE="$(InputPath)"
-PostBuild_Cmds=copy $(OutDir)\IcePy.dll ..\..\python
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "IcePy - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ICE_EXPORTS" /Yu"stdafx.h" /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /WX /Gm /GR /GX /Zi /Od /I "$(ICE_HOME)\include" /I "." /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /D "WIN32" /FD /GZ /c
-# SUBTRACT CPP /Fr /YX
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386
-# ADD LINK32 Iced.lib Sliced.lib IceUtild.lib python24_d.lib /nologo /dll /debug /machine:I386 /out:"Debug/IcePy_d.dll" /libpath:"$(ICE_HOME)\lib" /export:initIcePy
-# SUBTRACT LINK32 /pdb:none
-# Begin Special Build Tool
-OutDir=.\Debug
-SOURCE="$(InputPath)"
-PostBuild_Cmds=copy $(OutDir)\IcePy_d.pdb ..\..\python copy $(OutDir)\IcePy_d.dll ..\..\python
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "IcePy - Win32 Release"
-# Name "IcePy - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\Communicator.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Connection.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Current.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Init.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Logger.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\ObjectAdapter.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\ObjectFactory.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Operation.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Properties.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Proxy.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Slice.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\ThreadNotification.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Types.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Util.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\Communicator.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Connection.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Current.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Logger.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ObjectAdapter.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ObjectFactory.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Operation.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Properties.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Proxy.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Slice.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\ThreadNotification.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Types.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Util.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/py/modules/IcePy/Makefile.mak b/py/modules/IcePy/Makefile.mak new file mode 100755 index 00000000000..50a3776076c --- /dev/null +++ b/py/modules/IcePy/Makefile.mak @@ -0,0 +1,50 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved. +# +# This copy of Ice is licensed to you under the terms described in the +# ICE_LICENSE file included in this distribution. +# +# ********************************************************************** + +top_srcdir = ..\.. + +LIBNAME = IcePy$(PYLIBSUFFIX).lib +DLLNAME = $(top_srcdir)\python\IcePy$(PYLIBSUFFIX).dll + +TARGETS = $(LIBNAME) $(DLLNAME) + +OBJS = Communicator.obj \ + Connection.obj \ + Current.obj \ + Init.obj \ + Logger.obj \ + ObjectAdapter.obj \ + ObjectFactory.obj \ + Operation.obj \ + Properties.obj \ + Proxy.obj \ + Slice.obj \ + ThreadNotification.obj \ + Types.obj \ + Util.obj + +SRCS = $(OBJS:.obj=.cpp) + +!include $(top_srcdir)\config\Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) $(ICE_CPPFLAGS) $(PYTHON_CPPFLAGS) + +LINKWITH = $(ICE_LIBS) $(PYTHON_LIBS) $(CXXLIBS) + +$(LIBNAME): $(DLLNAME) + +$(DLLNAME): $(OBJS) + $(LINK) $(PYTHON_LDFLAGS) $(ICE_LDFLAGS) $(LD_DLLFLAGS) $(PDBFLAGS) /export:initIcePy $(OBJS) \ + $(PREOUT)$(DLLNAME) $(PRELIBS)$(LINKWITH) + move $(DLLNAME:.dll=.lib) $(LIBNAME) + +install:: all + copy $(DLLNAME) $(install_libdir) + +!include .depend diff --git a/py/modules/Makefile.mak b/py/modules/Makefile.mak new file mode 100755 index 00000000000..97ea007649b --- /dev/null +++ b/py/modules/Makefile.mak @@ -0,0 +1,19 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved. +# +# This copy of Ice is licensed to you under the terms described in the +# ICE_LICENSE file included in this distribution. +# +# ********************************************************************** + +top_srcdir = .. + +!include $(top_srcdir)\config\Make.rules.mak + +SUBDIRS = IcePy + +$(EVERYTHING):: + @for %i in ( $(SUBDIRS) ) do \ + @echo "making $@ in %i" & \ + cmd /c "cd %i & $(MAKE) -nologo -f Makefile.mak $@" || exit 1 diff --git a/py/python/generate.mak b/py/python/Makefile.mak index a901dc1783b..0b5f7317433 100644..100755 --- a/py/python/generate.mak +++ b/py/python/Makefile.mak @@ -1,27 +1,15 @@ # ********************************************************************** # -# Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** -.SUFFIXES: .py +top_srcdir = .. -!IF EXIST (../slice) -slicedir = ../slice -!ELSE IFDEF ICE_HOME -slicedir = $(ICE_HOME)/slice -!ELSE -!ERROR "Slice directory not found - set ICE_HOME!" -!ENDIF - -!IFDEF ICE_HOME -SLICE2PY = $(ICE_HOME)\bin\slice2py -!ELSE -SLICE2PY = slice2py -!ENDIF +!include $(top_srcdir)\config\Make.rules.mak ICE_SRCS = Ice_LocalException_ice.py \ Ice_Communicator_ice.py \ @@ -89,7 +77,7 @@ ALL_SRCS = $(ICE_SRCS) \ PACKAGES = Glacier2 IceBox IceGrid IcePatch2 IceStorm -SLICE2PYFLAGS = -I$(slicedir) --ice +SLICE2PYFLAGS = $(SLICE2PYFLAGS) --ice all:: $(ALL_SRCS) @@ -251,7 +239,15 @@ IcePatch2_FileServer_ice.py: $(slicedir)/IcePatch2/FileServer.ice IceStorm_IceStorm_ice.py: $(slicedir)/IceStorm/IceStorm.ice $(SLICE2PY) $(SLICE2PYFLAGS) --prefix IceStorm_ $(slicedir)/IceStorm/IceStorm.ice + +install:: $(ALL_SRCS) + @echo "Installing generated code" + copy *.py $(install_pythondir) + @for %i in ( $(PACKAGES) ) do \ + @if not exist $(install_pythondir)\%i \ + mkdir $(install_pythondir)\%i + @for %i in ( $(PACKAGES) ) do \ + copy %i\* $(install_pythondir)\%i + clean:: - -del /Q *.pyc - -del /Q *_ice.py - -rmdir /S /Q $(PACKAGES) + del /q $(PACKAGES) *_ice.py diff --git a/py/python/Python.dsp b/py/python/Python.dsp deleted file mode 100644 index 080240b5821..00000000000 --- a/py/python/Python.dsp +++ /dev/null @@ -1,83 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Python" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) External Target" 0x0106
-
-CFG=Python - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "Python.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "Python.mak" CFG="Python - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Python - Win32 Release" (based on "Win32 (x86) External Target")
-!MESSAGE "Python - Win32 Debug" (based on "Win32 (x86) External Target")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-
-!IF "$(CFG)" == "Python - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ""
-# PROP BASE Intermediate_Dir ""
-# PROP BASE Cmd_Line "NMAKE /f generate.mak"
-# PROP BASE Rebuild_Opt "/a"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir ""
-# PROP Cmd_Line "NMAKE /f generate.mak"
-# PROP Rebuild_Opt "clean all"
-# PROP Target_File "sources"
-# PROP Target_Dir ""
-
-!ELSEIF "$(CFG)" == "Python - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ""
-# PROP BASE Intermediate_Dir ""
-# PROP BASE Cmd_Line "NMAKE /f generate.mak"
-# PROP BASE Rebuild_Opt "/a"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir ""
-# PROP Cmd_Line "NMAKE /f generate.mak"
-# PROP Rebuild_Opt "clean all"
-# PROP Target_File "sources"
-# PROP Target_Dir ""
-
-!ENDIF
-
-# Begin Target
-
-# Name "Python - Win32 Release"
-# Name "Python - Win32 Debug"
-
-!IF "$(CFG)" == "Python - Win32 Release"
-
-!ELSEIF "$(CFG)" == "Python - Win32 Debug"
-
-!ENDIF
-
-# Begin Source File
-
-SOURCE=.\generate.mak
-# End Source File
-# End Target
-# End Project
|