summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorJoe George <joe@zeroc.com>2014-09-05 15:24:15 -0230
committerJoe George <joe@zeroc.com>2014-09-05 15:24:15 -0230
commita3a7a19af2c48ef4911f5c4dcccab118c279f333 (patch)
tree4c19c7ba3145674ca0aa2679f1422519495b83c4 /cpp
parentICE-5659 remove Ice.MonitorConnections from properties (diff)
downloadice-a3a7a19af2c48ef4911f5c4dcccab118c279f333.tar.bz2
ice-a3a7a19af2c48ef4911f5c4dcccab118c279f333.tar.xz
ice-a3a7a19af2c48ef4911f5c4dcccab118c279f333.zip
ICE-5658 - NPM support for IceJS distribution
Diffstat (limited to 'cpp')
-rw-r--r--cpp/config/Make.rules22
-rw-r--r--cpp/config/Make.rules.Darwin12
-rwxr-xr-xcpp/config/Make.rules.mak16
-rw-r--r--cpp/src/IceUtil/Makefile.mak2
-rw-r--r--cpp/src/slice2js/Makefile.mak2
5 files changed, 35 insertions, 19 deletions
diff --git a/cpp/config/Make.rules b/cpp/config/Make.rules
index b67fa8e0ca5..175b552c91d 100644
--- a/cpp/config/Make.rules
+++ b/cpp/config/Make.rules
@@ -34,7 +34,7 @@ create_runpath_symlink ?= no
#
# Define LP64 as yes or no if you want force a 32 or 64 bit. The
-# default is platform-dependent. This property has no effect on
+# default is platform-dependent. This property has no effect on
# OS X. On OS X, use CXXARCHFLAGS bellow to establish the build
# architectures.
#
@@ -65,7 +65,7 @@ create_runpath_symlink ?= no
# If you combine Ice with more GPL-incompatible software, or have
# licensed Ice under a commercial (non-GPL) license, you should ponder
# the licensing implications of using readline.
-#
+#
USE_READLINE ?= no
#
@@ -96,13 +96,13 @@ USE_READLINE ?= no
#OPENSSL_HOME ?= /opt/openssl
#
-# If MCPP is not installed in a standard location where the compiler
+# If MCPP is not installed in a standard location where the compiler
# can find it, set MCPP_HOME to the Mcpp installation directory.
#
#MCPP_HOME ?= /opt/mcpp
#
-# If libiconv is not installed in a standard location where the compiler
+# If libiconv is not installed in a standard location where the compiler
# can find it, set ICONV_HOME to the libiconv installation directory.
#
#ICONV_HOME ?= /opt/libiconv
@@ -133,7 +133,7 @@ THIRDPARTY_HOME ?= C:\Program Files (x86)\ZeroC\Ice-$(VERSION)-ThirdParty
#DEFAULT_MUTEX_PROTOCOL ?= PrioNone
#
-# Define CPP11 as yes if you want to enable C++11 features in GCC or
+# Define CPP11 as yes if you want to enable C++11 features in GCC or
# Clang.
#
#CPP11 ?= yes
@@ -270,7 +270,7 @@ ICECPPFLAGS = -I$(slicedir)
SLICE2CPPFLAGS = $(ICECPPFLAGS)
-ifeq ($(ice_dir), /usr)
+ifeq ($(ice_dir), /usr)
LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS)
else
CPPFLAGS += -I$(includedir)
@@ -294,7 +294,7 @@ else
endif
ifeq ($(mkshlib),)
- $(error You need to define mkshlib in Make.rules.$(UNAME))
+ $(error You need to define mkshlib in Make.rules.$(UNAME))
endif
ifeq ($(mktestname),)
@@ -316,7 +316,11 @@ else
endif
ifeq ($(SLICE_LIBS),)
- SLICE_LIBS = -lSlice $(BASELIBS)
+ ifeq ($(STATICLIBS),yes)
+ SLICE_LIBS = -lSlice -lmcpp $(BASELIBS)
+ else
+ SLICE_LIBS = -lSlice $(BASELIBS)
+ endif
endif
ifeq ($(ICESSL_LIBS),)
@@ -352,7 +356,7 @@ $(HDIR)/%.h %.cpp: $(SDIR)/%.ice $(SLICE2CPP) $(SLICEPARSERLIB)
%.h %.cpp: %.ice $(SLICE2CPP) $(SLICEPARSERLIB)
rm -f $(*F).h $(*F).cpp
- $(SLICE2CPP) $(SLICE2CPPFLAGS) $(*F).ice
+ $(SLICE2CPP) $(SLICE2CPPFLAGS) $(*F).ice
%.h %.cpp: %.y
rm -f $(*F).h $(*F).cpp
diff --git a/cpp/config/Make.rules.Darwin b/cpp/config/Make.rules.Darwin
index bbfb3679b2b..2bb8d945696 100644
--- a/cpp/config/Make.rules.Darwin
+++ b/cpp/config/Make.rules.Darwin
@@ -24,7 +24,7 @@ ifeq ($(OPTIMIZE),yes)
#
ifeq ($(CXXARCHFLAGS),)
CXXARCHFLAGS := -arch i386 -arch x86_64
- endif
+ endif
CXXFLAGS := $(CXXARCHFLAGS) -O2 -DNDEBUG $(CXXFLAGS)
else
CXXFLAGS := $(CXXARCHFLAGS) -g $(CXXFLAGS)
@@ -63,12 +63,18 @@ endif
mklibfilename = $(if $(2),lib$(1).$(2).dylib,lib$(1).dylib)
mksoname = $(if $(2),lib$(1).$(2).dylib,lib$(1).dylib)
-mklibname = lib$(1).dylib
+ifeq ($(STATICLIBS),yes)
+ mklibname = lib$(1).a
+else
+ mklibname = lib$(1).dylib
+endif
+mklib = libtool -static -o $(1) $(2)
+
curdir = $(shell pwd)
mkshlib = $(CXX) -dynamiclib $(shlibldflags) -o $(1) -install_name @rpath/$(2) $(3) $(4)
-BASELIBS = -lIceUtil
+BASELIBS = -lIceUtil
LIBS = -lIce $(BASELIBS)
ICONV_LIB = -liconv
diff --git a/cpp/config/Make.rules.mak b/cpp/config/Make.rules.mak
index 8197ab86cf8..786dc4f22d3 100755
--- a/cpp/config/Make.rules.mak
+++ b/cpp/config/Make.rules.mak
@@ -37,7 +37,7 @@ prefix = C:\Ice-$(VERSION)
#WINRT = yes
#
-# Is the MFC library available?
+# Is the MFC library available?
# Set to no if you are using Visual Studio Express
# A few Ice demos use MFC
#
@@ -54,7 +54,7 @@ HAS_MFC = yes
!if "$(PROCESSOR_ARCHITECTURE)" == "AMD64"
THIRDPARTY_HOME = $(PROGRAMFILES) (x86)\ZeroC\Ice-$(VERSION)-ThirdParty
!else
-THIRDPARTY_HOME = $(PROGRAMFILES)\ZeroC\Ice-$(VERSION)-ThirdParty
+THIRDPARTY_HOME = $(PROGRAMFILES)\ZeroC\Ice-$(VERSION)-ThirdParty
!endif
!endif
@@ -85,7 +85,7 @@ CPP_COMPILER = VC120
!elseif ([cl 2>&1 | findstr "Version\ 15" > nul] == 0)
!error Detected VC90
!else
-!error Cannot detect C++ compiler
+!error Cannot detect C++ compiler
!endif
#!message CPP_COMPILER set to $(CPP_COMPILER)
@@ -169,6 +169,12 @@ RCFLAGS = -D_DEBUG
SSL_OS_LIBS = secur32.lib crypt32.lib
EXPAT_LIBS = libexpat.lib
+!if "$(STATICLIBS)" =="yes"
+SLICE_LIBS = $(PRELIBS)slice$(LIBSUFFIX).lib $(MCPP_LIBS)
+!else
+SLICE_LIBS = $(PRELIBS)slice$(LIBSUFFIX).lib
+!endif
+
CPPFLAGS = $(CPPFLAGS) -I"$(includedir)"
ICECPPFLAGS = -I"$(slicedir)"
SLICE2CPPFLAGS = $(ICECPPFLAGS) $(SLICE2CPPFLAGS)
@@ -196,7 +202,7 @@ SLICE2FREEZE = $(ice_dir)\bin$(x64suffix)\slice2freeze.exe
!endif
#
-# In WinRT tests we don't want a dependency on SLICEPARSELIB, as we can build all
+# In WinRT tests we don't want a dependency on SLICEPARSELIB, as we can build all
# test configurations using the same slice2cpp and slice.lib.
#
!if "$(WINRT)" == "yes"
@@ -299,7 +305,7 @@ clean::
!endif
-!endif
+!endif
clean::
-del /q *.obj *.bak *.ilk *.exp *.pdb *.tds *.idb
diff --git a/cpp/src/IceUtil/Makefile.mak b/cpp/src/IceUtil/Makefile.mak
index 1b2528626f7..1db74d842f4 100644
--- a/cpp/src/IceUtil/Makefile.mak
+++ b/cpp/src/IceUtil/Makefile.mak
@@ -59,7 +59,7 @@ RES_FILE = IceUtil.res
$(DLLNAME):
$(LIBNAME): $(OBJS)
- $(AR) $(ARFLAGS) $(PDBFLAGS) $(OBJS) $(PREOUT)$@
+ $(AR) $(ARFLAGS) $(PDBFLAGS) $(OBJS) $(PREOUT)$@ DbgHelp.lib
!else
diff --git a/cpp/src/slice2js/Makefile.mak b/cpp/src/slice2js/Makefile.mak
index 58bf485669a..6a242f68577 100644
--- a/cpp/src/slice2js/Makefile.mak
+++ b/cpp/src/slice2js/Makefile.mak
@@ -30,7 +30,7 @@ PDBFLAGS = /pdb:$(NAME:.exe=.pdb)
RES_FILE = Slice2Js.res
$(NAME): $(OBJS) Slice2Js.res
- $(LINK) $(LD_EXEFLAGS) $(PDBFLAGS) $(OBJS) $(SETARGV) $(PREOUT)$@ $(PRELIBS)slice$(LIBSUFFIX).lib \
+ $(LINK) $(LD_EXEFLAGS) $(PDBFLAGS) $(OBJS) $(SETARGV) $(PREOUT)$@ $(SLICE_LIBS) \
$(BASELIBS) $(RES_FILE)
@if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
$(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest