summaryrefslogtreecommitdiff
path: root/cpp/test
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test')
-rw-r--r--cpp/test/Ice/interceptor/Makefile1
-rwxr-xr-xcpp/test/Ice/interceptor/Makefile.mak51
-rw-r--r--cpp/test/Ice/interceptor/MyObjectI.cpp8
-rwxr-xr-xcpp/test/Ice/interceptor/TestI.cpp22
4 files changed, 69 insertions, 13 deletions
diff --git a/cpp/test/Ice/interceptor/Makefile b/cpp/test/Ice/interceptor/Makefile
index ab4250c5764..9fb7cab09e7 100644
--- a/cpp/test/Ice/interceptor/Makefile
+++ b/cpp/test/Ice/interceptor/Makefile
@@ -14,6 +14,7 @@ CLIENT = client
TARGETS = $(CLIENT)
OBJS = Test.o \
+ TestI.o \
Client.o \
InterceptorI.o \
AMDInterceptorI.o \
diff --git a/cpp/test/Ice/interceptor/Makefile.mak b/cpp/test/Ice/interceptor/Makefile.mak
index d82bc3ca038..f65a7fd6552 100755
--- a/cpp/test/Ice/interceptor/Makefile.mak
+++ b/cpp/test/Ice/interceptor/Makefile.mak
@@ -9,32 +9,73 @@
top_srcdir = ..\..\..
+LIBNAME = InterceptorTest$(LIBSUFFIX).lib
+DLLNAME = InterceptorTest$(SOVERSION)$(LIBSUFFIX).dll
+
CLIENT = client.exe
+!ifdef BUILD_CLIENT
TARGETS = $(CLIENT)
+!else
+TARGETS = $(LIBNAME) $(DLLNAME)
+!endif
+
+LOBJS = Test.obj \
+ TestI.obj
-OBJS = Test.obj \
- Client.obj \
+COBJS = Client.obj \
InterceptorI.obj \
AMDInterceptorI.obj \
MyObjectI.obj
-SRCS = $(OBJS:.obj=.cpp)
+!ifdef BUILD_CLIENT
+SRCS = $(COBJS:.obj=.cpp)
+!else
+SRCS = $(LOBJS:.obj=.cpp)
+!endif
!include $(top_srcdir)/config/Make.rules.mak
+!ifdef BUILD_CLIENT
CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
PDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
!endif
-$(CLIENT): $(OBJS)
- $(LINK) $(LD_EXEFLAGS) $(PDBFLAGS) $(SETARGV) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+!else
+SLICE2CPPFLAGS = --dll-export INTERCEPTOR_TEST_API $(SLICE2CPPFLAGS)
+CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN -DINTERCEPTOR_TEST_API_EXPORTS
+
+!if "$(CPP_COMPILER)" != "BCC2006" && "$(OPTIMIZE)" != "yes"
+PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb)
+!endif
+!endif
+
+
+$(LIBNAME): $(DLLNAME)
+
+$(DLLNAME): $(LOBJS)
+ $(LINK) $(LD_DLLFLAGS) $(PDBFLAGS) $(LOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+ move $(DLLNAME:.dll=.lib) $(LIBNAME)
+ @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
+ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest
+ @if exist $(DLLNAME:.dll=.exp) del /q $(DLLNAME:.dll=.exp)
+
+
+$(CLIENT): $(COBJS)
+ $(LINK) $(LD_EXEFLAGS) $(PDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBNAME) $(LIBS)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
+!ifdef BUILD_CLIENT
clean::
del /q Test.cpp Test.h
+!else
+
+$(EVERYTHING)::
+ @$(MAKE) -nologo /f Makefile.mak BUILD_CLIENT=1 $@
+
+!endif
!include .depend
diff --git a/cpp/test/Ice/interceptor/MyObjectI.cpp b/cpp/test/Ice/interceptor/MyObjectI.cpp
index 10d83a0efb3..f814820d713 100644
--- a/cpp/test/Ice/interceptor/MyObjectI.cpp
+++ b/cpp/test/Ice/interceptor/MyObjectI.cpp
@@ -11,18 +11,10 @@
#include <MyObjectI.h>
#include <TestCommon.h>
#include <IceUtil/IceUtil.h>
-#include <iostream>
using namespace IceUtil;
using namespace std;
-void
-Test::RetryException::ice_print(ostream& out) const
-{
- Exception::ice_print(out);
- out << ":\nretry dispatch";
-}
-
int
MyObjectI::add(int x, int y, const Ice::Current&)
{
diff --git a/cpp/test/Ice/interceptor/TestI.cpp b/cpp/test/Ice/interceptor/TestI.cpp
new file mode 100755
index 00000000000..27b60f0a5ea
--- /dev/null
+++ b/cpp/test/Ice/interceptor/TestI.cpp
@@ -0,0 +1,22 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2007 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.
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <Test.h>
+#include <iostream>
+
+using namespace IceUtil;
+using namespace std;
+
+void
+Test::RetryException::ice_print(ostream& out) const
+{
+ Exception::ice_print(out);
+ out << ":\nretry dispatch";
+}