You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by rv...@apache.org on 2016/05/19 15:14:43 UTC

[36/51] [partial] incubator-geode git commit: Add source for geode c++ and .net clients

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/dist/executeFunction/XMLs/serverExecuteFunctions2.xml
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/dist/executeFunction/XMLs/serverExecuteFunctions2.xml b/geode-client-native/examples/dist/executeFunction/XMLs/serverExecuteFunctions2.xml
new file mode 100755
index 0000000..01bce02
--- /dev/null
+++ b/geode-client-native/examples/dist/executeFunction/XMLs/serverExecuteFunctions2.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+
+
+<!DOCTYPE cache PUBLIC
+  "-//GemStone Systems, Inc.//GemFire Declarative Caching 6.5//EN"
+  "http://www.gemstone.com/dtd/cache6_5.dtd">
+<cache>
+  <cache-server port="40404" notify-by-subscription="true">
+     <group>ServerGroup1</group>
+  </cache-server>
+  <vm-root-region name='partition_region'>
+    <region-attributes  mirror-type="keys-values" data-policy="partition"></region-attributes>
+  </vm-root-region>
+  <function-service>
+    <function>
+      <class-name>javaobject.MultiGetFunctionI</class-name>
+    </function>
+    <function>
+      <class-name>javaobject.MultiPutFunctionI</class-name>
+    </function>
+    <function>
+      <class-name>javaobject.MultiGetFunction</class-name>
+    </function>
+    <function>
+      <class-name>javaobject.MultiPutFunction</class-name>
+    </function>
+    <function>
+      <class-name>javaobject.RegionOperationsFunction</class-name>
+    </function>
+  </function-service>
+</cache>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/dist/executeFunction/buildit.bat
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/dist/executeFunction/buildit.bat b/geode-client-native/examples/dist/executeFunction/buildit.bat
new file mode 100644
index 0000000..3ec8ac6
--- /dev/null
+++ b/geode-client-native/examples/dist/executeFunction/buildit.bat
@@ -0,0 +1,7 @@
+@echo off
+
+rem GFCPP must be set
+
+cl /MD /Zc:wchar_t /EHsc /GR /wd4996 /D_EXAMPLE /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NON_CONFORMING_SWPRINTFS /DWINVER=0x0500 /I%GFCPP%/include /FeExecuteFunctions.exe ExecuteFunctions.cpp %GFCPP%/lib/gfcppcache.lib
+
+del *.obj

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/dist/executeFunction/buildit.sh
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/dist/executeFunction/buildit.sh b/geode-client-native/examples/dist/executeFunction/buildit.sh
new file mode 100755
index 0000000..4747a62
--- /dev/null
+++ b/geode-client-native/examples/dist/executeFunction/buildit.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+
+if [ -z ${GFCPP:-} ]; then
+  echo GFCPP is not set.
+  exit 1
+fi
+
+echo Building GemFire ExecuteFunction
+
+OPT=-O3
+LIBDIR=lib
+
+platform=`uname`
+is64bit=__IS_64_BIT__
+if [ "$platform" == "SunOS" ]; then
+  if [ $is64bit -eq 1 ]; then
+    ARCH="-xarch=v9"
+  else
+    ARCH="-xarch=v8plus"
+  fi
+  CC=CC
+  CXX_FLAGS="-mt -D_RWSTD_MULTI_THREAD -DTHREAD=MULTI \
+      -D_REENTRANT $OPT $ARCH \
+      -I$GFCPP/include \
+      -L$GFCPP/$LIBDIR \
+      -R$GFCPP/$LIBDIR \
+      -lgfcppcache -lrt -lpthread -lkstat"
+elif [ "$platform" == "Linux" ]; then
+  if [ $is64bit -eq 1 ]; then
+    ARCH="-m64"
+  else
+    ARCH="-m32"
+  fi
+  CC=g++
+  CXX_FLAGS="-D_REENTRANT $OPT -Wall $ARCH \
+      -I$GFCPP/include \
+      -Xlinker -rpath -Xlinker $GFCPP/$LIBDIR -L$GFCPP/$LIBDIR \
+      -lgfcppcache"
+else
+  echo "This script is not supported on this platform."
+  exit 1
+fi
+
+$CC  $CXX_FLAGS \
+    ExecuteFunctions.cpp -o ExecuteFunctions 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/dist/executeFunction/cleanup.bat
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/dist/executeFunction/cleanup.bat b/geode-client-native/examples/dist/executeFunction/cleanup.bat
new file mode 100644
index 0000000..6446ab9
--- /dev/null
+++ b/geode-client-native/examples/dist/executeFunction/cleanup.bat
@@ -0,0 +1,9 @@
+@echo off
+
+echo Deleting GemFire Statistics and Log files...
+
+del /q *.gfs
+del /q gfecs\*.*
+rmdir gfecs
+del /q gfecs2\*.*
+rmdir gfecs2

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/dist/executeFunction/cleanup.sh
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/dist/executeFunction/cleanup.sh b/geode-client-native/examples/dist/executeFunction/cleanup.sh
new file mode 100755
index 0000000..8c28fb2
--- /dev/null
+++ b/geode-client-native/examples/dist/executeFunction/cleanup.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+echo Deleting GemFire Statistics and Log files...
+
+rm -f *.gfs
+rm -f gfecs/*
+rmdir gfecs
+rm -f gfecs2/*
+rmdir gfecs2

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/dist/executeFunction/runExecuteFunctions.bat
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/dist/executeFunction/runExecuteFunctions.bat b/geode-client-native/examples/dist/executeFunction/runExecuteFunctions.bat
new file mode 100644
index 0000000..478fa8a
--- /dev/null
+++ b/geode-client-native/examples/dist/executeFunction/runExecuteFunctions.bat
@@ -0,0 +1,20 @@
+@echo off
+
+rem GFCPP must be set
+
+if not "%GFCPP%"=="" goto startexamples
+
+echo GFCPP is not set.
+goto finished
+
+
+:startexamples
+
+echo.
+echo Running GemFire C++ ExecuteFunctions example
+
+set PATH=%PATH%;%GFCPP%\bin;..\bin;
+
+
+call ExecuteFunctions.exe %1
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/dist/executeFunction/runExecuteFunctions.sh
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/dist/executeFunction/runExecuteFunctions.sh b/geode-client-native/examples/dist/executeFunction/runExecuteFunctions.sh
new file mode 100644
index 0000000..a3c37d3
--- /dev/null
+++ b/geode-client-native/examples/dist/executeFunction/runExecuteFunctions.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+if [ -z ${GFCPP:-} ]; then
+  echo GFCPP is not set.
+  exit 1
+fi
+
+exname='ExecuteFunctions'
+
+echo Running GemFire C++ example ${exname} ...
+
+export PATH="${PATH}:${GEMFIRE}/bin"
+
+${exname} $*
+
+echo Finished example ${exname}.
+
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/dist/executeFunction/startServer.bat
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/dist/executeFunction/startServer.bat b/geode-client-native/examples/dist/executeFunction/startServer.bat
new file mode 100644
index 0000000..706572d
--- /dev/null
+++ b/geode-client-native/examples/dist/executeFunction/startServer.bat
@@ -0,0 +1,34 @@
+@echo off
+
+rem GFCPP must be set
+rem GEMFIRE must be set
+
+
+if not "%GEMFIRE%"=="" goto startexamples
+
+echo GEMFIRE is not set.
+goto finished
+
+
+:startexamples
+
+
+:runexample
+
+echo.
+echo Running GemFire Server
+
+set CLASSPATH=%CLASSPATH%;../javaobject.jar;
+set PATH=%GEMFIRE%\bin;%PATH%;%GEMFIRE%\bin;..\bin;
+
+if not exist gfecs mkdir gfecs
+if not exist gfecs2 mkdir gfecs2
+
+
+
+call cacheserver start cache-xml-file=../XMLs/serverExecuteFunctions.xml mcast-port=35673 -dir=gfecs
+call cacheserver start cache-xml-file=../XMLs/serverExecuteFunctions2.xml mcast-port=35673 -dir=gfecs2
+
+rem pause
+
+:finished

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/dist/executeFunction/startServer.sh
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/dist/executeFunction/startServer.sh b/geode-client-native/examples/dist/executeFunction/startServer.sh
new file mode 100755
index 0000000..091331f
--- /dev/null
+++ b/geode-client-native/examples/dist/executeFunction/startServer.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+if [ -z ${GEMFIRE:-} ]; then
+  echo GEMFIRE is not set.
+  exit 1
+fi
+
+echo Running GemFire Server
+
+export CLASSPATH="${CLASSPATH}:../javaobject.jar"
+export PATH="${PATH}:${GEMFIRE}/bin"
+
+if [ ! -d gfecs ]
+then
+  mkdir gfecs
+fi
+
+if [ ! -d gfecs2 ]
+then
+  mkdir gfecs2
+fi
+
+   cacheserver start cache-xml-file=../XMLs/serverExecuteFunctions.xml mcast-port=35673 -dir=gfecs
+
+   cacheserver start cache-xml-file=../XMLs/serverExecuteFunctions2.xml mcast-port=35673 -dir=gfecs2

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/dist/executeFunction/stopServer.bat
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/dist/executeFunction/stopServer.bat b/geode-client-native/examples/dist/executeFunction/stopServer.bat
new file mode 100644
index 0000000..1ddf398
--- /dev/null
+++ b/geode-client-native/examples/dist/executeFunction/stopServer.bat
@@ -0,0 +1,22 @@
+@echo off
+
+rem GEMFIRE must be set
+
+
+if not "%GEMFIRE%"=="" goto startexamples
+
+echo GEMFIRE is not set.
+goto finished
+
+
+:startexamples
+
+echo.
+echo Stopping GemFire Server
+
+set PATH=%GEMFIRE%\bin;%PATH%;%GEMFIRE%\bin;..\bin;
+
+call cacheserver stop -dir=gfecs
+call cacheserver stop -dir=gfecs2
+:finished
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/dist/executeFunction/stopServer.sh
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/dist/executeFunction/stopServer.sh b/geode-client-native/examples/dist/executeFunction/stopServer.sh
new file mode 100755
index 0000000..f9af1bd
--- /dev/null
+++ b/geode-client-native/examples/dist/executeFunction/stopServer.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+if [ -z ${GEMFIRE:-} ]; then
+  echo GEMFIRE is not set.
+  exit 1
+fi
+
+
+echo Stop GemFire Server
+
+export PATH="${PATH}:${GEMFIRE}/bin"
+
+
+cacheserver stop -dir=gfecs
+
+cacheserver stop -dir=gfecs2
+
+echo Stopped Server
+
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/dist/overview.html
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/dist/overview.html b/geode-client-native/examples/dist/overview.html
new file mode 100755
index 0000000..8e2fee7
--- /dev/null
+++ b/geode-client-native/examples/dist/overview.html
@@ -0,0 +1,15 @@
+<HTML>
+<BODY>
+
+<p>These demonstration programs provide examples of how to use
+GemFire's distributed data caching features.</p>
+
+<P>The {@link cacheRunner} example provides an interactive command
+line utility for experimenting with many of the features of the
+GemFire distributed cache.</P>
+
+<P>The {@link cachetest} example provides an non interactive command
+demonstrating operational throughput under various region configurations.</P>
+
+</BODY>
+</HTML>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/dist/userobjects/AccountHistory.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/dist/userobjects/AccountHistory.cpp b/geode-client-native/examples/dist/userobjects/AccountHistory.cpp
new file mode 100644
index 0000000..f881d02
--- /dev/null
+++ b/geode-client-native/examples/dist/userobjects/AccountHistory.cpp
@@ -0,0 +1,99 @@
+
+#include "AccountHistory.hpp"
+#include "EClassIds.hpp"
+#include <stdio.h>
+
+using namespace gemfire;
+
+AccountHistory::AccountHistory( )
+: Cacheable(),
+  m_history()
+{
+}
+
+/**
+ * @brief serialize this object
+ **/
+void AccountHistory::toData( DataOutput& output ) const
+{
+  size_t itemCount = m_history.size();
+  output.writeInt( (int32_t) itemCount );
+  for( size_t idx = 0; idx < itemCount; idx++ ) {
+    // copy each string to the serialization buffer, including the null
+    // terminating character at the end of the string.
+    output.writeBytes( (int8_t*) m_history[idx].c_str(), m_history[idx].size() + 1 );
+  }
+}
+
+/**
+ * @brief deserialize this object
+ **/
+Serializable* AccountHistory::fromData( DataInput& input )
+{
+  size_t buflen = 1000;
+  char* readbuf = new char[buflen];
+  uint32_t itemCount = 0;
+  uint32_t itemLength = 0;
+
+  input.readInt( (uint32_t*) &itemCount );
+  for( size_t idx = 0; idx < itemCount; idx++ ) {
+    input.readInt( (uint32_t*) &itemLength );
+    // grow the read buffer if an item exceeds the length.
+    if ( buflen <= itemLength ) {
+      buflen = itemLength;
+      delete [] readbuf;
+      readbuf = new char[buflen];
+    }
+    // read from serialization buffer into a character array
+    input.readBytesOnly((uint8_t*) readbuf, itemLength);
+    // and store in the history list of strings.
+    m_history.push_back( readbuf );
+  }
+  return this;
+}
+
+/**
+ * @brief creation function for strings.
+ */
+Serializable* AccountHistory::createDeserializable( )
+{
+  return new AccountHistory();
+}
+
+/**
+ *@brief return the classId of the instance being serialized.
+ * This is used by deserialization to determine what instance
+ * type to create and derserialize into.
+ */
+int32_t AccountHistory::classId( ) const
+{
+  return EClassIds::AccountHistory;
+}
+
+/** Log the state of this in a pretty fashion. */
+void AccountHistory::showAccountHistory( ) const
+{
+  printf( "AccountHistory: \n" );
+  for( size_t idx = 0; idx < m_history.size(); idx++ ) {
+    printf( "  %s\n", m_history[idx].c_str() );
+  }
+}
+
+/** Add a entry to the history. */
+void AccountHistory::addLog( const std::string& entry )
+{
+  m_history.push_back( entry );
+}
+
+uint32_t AccountHistory::objectSize( ) const
+{
+  size_t itemCount = m_history.size();
+  uint32_t size = sizeof(AccountHistory);
+  size += sizeof(itemCount);
+  for( size_t idx = 0; idx < itemCount; idx++ ) {
+    size += sizeof(char) * (m_history[idx].size()+1);
+  }
+  return size;
+
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/dist/userobjects/AccountHistory.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/dist/userobjects/AccountHistory.hpp b/geode-client-native/examples/dist/userobjects/AccountHistory.hpp
new file mode 100644
index 0000000..6add142
--- /dev/null
+++ b/geode-client-native/examples/dist/userobjects/AccountHistory.hpp
@@ -0,0 +1,59 @@
+
+#ifndef __AccountHistory_hpp__
+#define __AccountHistory_hpp__ 1
+
+
+#include <gfcpp/GemfireCppCache.hpp>
+#include <string>
+#include <vector>
+
+class AccountHistory;
+typedef gemfire::SharedPtr< AccountHistory > AccountHistoryPtr;
+
+/** 
+ * Defines a custom type that can be used as a value in a
+ * gemfire region.
+ */
+class AccountHistory : public gemfire::Cacheable
+{
+  private:
+    std::vector< std::string > m_history;
+
+  public:
+
+  AccountHistory( );
+
+   /**
+   *@brief serialize this object
+   **/
+  virtual void toData( gemfire::DataOutput& output ) const;
+
+  /**
+   *@brief deserialize this object
+   **/
+  virtual gemfire::Serializable* fromData( gemfire::DataInput& input );
+  
+  /**
+   * @brief creation function for strings.
+   */
+  static gemfire::Serializable* createDeserializable( );
+
+  /**
+   *@brief return the classId of the instance being serialized.
+   * This is used by deserialization to determine what instance
+   * type to create and derserialize into.
+   */
+  virtual int32_t classId( ) const;
+
+  /** Log the state of this in a pretty fashion. */
+  void showAccountHistory( ) const;
+  
+  /** Add a entry to the history. */
+  void addLog( const std::string& entry );
+  
+  virtual uint32_t objectSize() const;
+   
+};
+
+#endif
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/dist/userobjects/BankAccount.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/dist/userobjects/BankAccount.cpp b/geode-client-native/examples/dist/userobjects/BankAccount.cpp
new file mode 100644
index 0000000..fb7fbfb
--- /dev/null
+++ b/geode-client-native/examples/dist/userobjects/BankAccount.cpp
@@ -0,0 +1,62 @@
+
+#include "BankAccount.hpp"
+#include "EClassIds.hpp"
+#include <stdio.h>
+
+using namespace gemfire;
+
+BankAccount::BankAccount( int customerNum, int accountNum )
+: CacheableKey(),
+  m_customerId( customerNum ),
+  m_accountId( accountNum )
+{
+}
+
+void BankAccount::toData( DataOutput& output ) const
+{
+  // write each field to the DataOutput.
+  output.writeInt( m_customerId );
+  output.writeInt( m_accountId );
+}
+
+Serializable* BankAccount::fromData( DataInput& input )
+{
+  // set each field from the data input.
+  input.readInt( &m_customerId );
+  input.readInt( &m_accountId );
+  return this;
+}
+
+Serializable* BankAccount::createDeserializable( )
+{
+  // Create a new instance that will be initialized later by a call to fromData.
+  return new BankAccount( 0, 0 );
+}
+
+int32_t BankAccount::classId( ) const
+{
+  return EClassIds::BankAccount;
+}
+
+bool BankAccount::operator==( const CacheableKey& other ) const
+{
+  const BankAccount& rhs = static_cast< const BankAccount& >( other );
+  return ( m_customerId == rhs.m_customerId ) 
+    && ( m_accountId == rhs.m_accountId );
+}
+
+uint32_t BankAccount::hashcode( ) const
+{
+  return /* not the best hash.. */ m_customerId + ( m_accountId << 3 );
+}
+
+void BankAccount::showAccountIdentifier( ) const
+{
+  printf( "BankAccount( customer: %d, account: %d )\n", 
+    m_customerId, m_accountId );
+}
+
+uint32_t BankAccount::objectSize( ) const
+{
+  return sizeof(BankAccount) ;
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/dist/userobjects/BankAccount.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/dist/userobjects/BankAccount.hpp b/geode-client-native/examples/dist/userobjects/BankAccount.hpp
new file mode 100644
index 0000000..2a245d8
--- /dev/null
+++ b/geode-client-native/examples/dist/userobjects/BankAccount.hpp
@@ -0,0 +1,72 @@
+
+#ifndef __BankAccount_hpp__
+#define __BankAccount_hpp__ 1
+
+
+#include <gfcpp/GemfireCppCache.hpp>
+
+
+class BankAccount;
+typedef gemfire::SharedPtr< BankAccount > BankAccountPtr;
+
+/**
+ * Defines a custom type that can be used as a key in
+ * a gemfire region.
+ */
+class BankAccount : public gemfire::CacheableKey
+{
+  private:
+
+    int m_customerId; 
+    int m_accountId;
+
+  public:
+
+  BankAccount( int customerNum, int accountNum );
+
+   /**
+   *@brief serialize this object
+   **/
+  virtual void toData( gemfire::DataOutput& output ) const;
+
+  /**
+   *@brief deserialize this object
+   **/
+  virtual gemfire::Serializable* fromData( gemfire::DataInput& input );
+  
+  /**
+   * @brief creation function for strings.
+   */
+  static gemfire::Serializable* createDeserializable( );
+
+  /**
+   *@brief return the classId of the instance being serialized.
+   * This is used by deserialization to determine what instance
+   * type to create and derserialize into.
+   */
+  virtual int32_t classId( ) const;
+
+  /** return true if this key matches other. */
+  virtual bool operator==( const gemfire::CacheableKey& other ) const;
+
+  /** return the hashcode for this key. */
+  virtual uint32_t hashcode( ) const;
+  
+  /** Log the state of this in a pretty fashion. */
+  void showAccountIdentifier( ) const;
+   
+  virtual uint32_t objectSize() const;   
+};
+
+namespace gemfire {
+
+/** overload of gemfire::createKey to pass CacheableInt32Ptr */
+inline CacheableKeyPtr createKey( const BankAccountPtr& value )
+{
+  return value;
+}
+
+}
+
+#endif
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/dist/userobjects/EClassIds.hpp
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/dist/userobjects/EClassIds.hpp b/geode-client-native/examples/dist/userobjects/EClassIds.hpp
new file mode 100644
index 0000000..68fe892
--- /dev/null
+++ b/geode-client-native/examples/dist/userobjects/EClassIds.hpp
@@ -0,0 +1,17 @@
+
+#ifndef __EClassIds_hpp__
+#define __EClassIds_hpp__ 1
+
+/** Class that holds the enum with each unique types serialization id. */
+class EClassIds 
+{
+  public:
+  
+  enum {
+    AccountHistory = 0x02,
+    BankAccount = 0x03
+  };
+};
+
+#endif
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/dist/userobjects/ExampleMain.cpp
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/dist/userobjects/ExampleMain.cpp b/geode-client-native/examples/dist/userobjects/ExampleMain.cpp
new file mode 100644
index 0000000..b160269
--- /dev/null
+++ b/geode-client-native/examples/dist/userobjects/ExampleMain.cpp
@@ -0,0 +1,68 @@
+
+#include <gfcpp/GemfireCppCache.hpp>
+#include "BankAccount.hpp"
+#include "AccountHistory.hpp"
+
+using namespace gemfire;
+
+/*
+  This example registers types, creates the cache, creates a
+  region, and then puts and gets user defined type BankAccount.
+*/
+int main( int argc, char** argv )
+{
+  // Register the user defined, serializable type.
+  Serializable::registerType( AccountHistory::createDeserializable );
+  Serializable::registerType( BankAccount::createDeserializable );
+
+  // Create a cache.
+  CacheFactoryPtr cacheFactory = CacheFactory::createCacheFactory();
+  CachePtr cachePtr = cacheFactory->setSubscriptionEnabled(true)->create();   
+
+  LOGINFO("Created the GemFire Cache");
+  
+  RegionFactoryPtr regionFactory = cachePtr->createRegionFactory(LOCAL);
+  
+  LOGINFO("Created the RegionFactory");
+
+  // Create the Region programmatically.
+  RegionPtr regionPtr = regionFactory->create("BankAccounts");
+
+  LOGINFO("Created the Region from the Cache");
+
+  // Place some instances of BankAccount cache region.
+  BankAccountPtr baKeyPtr(new BankAccount(2309, 123091));
+  AccountHistoryPtr ahValPtr(new AccountHistory());
+  ahValPtr->addLog( "Created account" );
+
+  regionPtr->put( baKeyPtr, ahValPtr );
+  printf( "Put an AccountHistory in cache keyed with BankAccount.\n" );
+  // Call custom behavior on instance of BankAccount.
+  baKeyPtr->showAccountIdentifier();
+  // Call custom behavior on instance of AccountHistory.
+  ahValPtr->showAccountHistory();
+
+  // Get a value out of the region.
+  AccountHistoryPtr historyPtr = dynCast<AccountHistoryPtr>( regionPtr->get( baKeyPtr ) );
+  if (historyPtr != NULLPTR) {
+    printf( "Found AccountHistory in the cache.\n" );
+    historyPtr->showAccountHistory();
+
+    historyPtr->addLog( "debit $1,000,000." );
+    regionPtr->put( baKeyPtr, historyPtr );
+    printf( "Updated AccountHistory in the cache.\n" );
+  }
+
+  // Look up the history again.
+  historyPtr = dynCast<AccountHistoryPtr>( regionPtr->get( baKeyPtr ) );
+  if (historyPtr != NULLPTR) {
+    printf( "Found AccountHistory in the cache.\n" );
+    historyPtr->showAccountHistory();
+  }
+
+  // Close the cache.
+  cachePtr->close();
+
+  return 0;
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/dist/userobjects/README.html
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/dist/userobjects/README.html b/geode-client-native/examples/dist/userobjects/README.html
new file mode 100644
index 0000000..09fbc23
--- /dev/null
+++ b/geode-client-native/examples/dist/userobjects/README.html
@@ -0,0 +1,107 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"><HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+<META NAME="GENERATOR" CONTENT="Adobe FrameMaker 7.0/HTML Export Filter">
+
+<TITLE>userobjects: Pivotal&#8482; GemFire&#174; Native Client C++ Example</TITLE>
+</HEAD>
+<BODY>
+ <IMG SRC="../../../docs/PIVOTAL_GemFire_190x81.png" BORDER="0">
+ <DIV>
+   <h1 align="center"><a name="Top" id="Top"></a>userobjects</h1>
+   <h2 align="center">
+   Pivotal<b><sup><font size=-0>&#8482;</font></sup></b> GemFire<b><sup><font size=-0>&#174;</font></sup></b> Native Client </h2>
+   <h2 align="center">C++ Programming Example</h2>
+</DIV>
+<DIV>
+<H2>
+<br>
+About the userobjects Example </H2>
+<P>The <code>userobjects</code> example demonstrates the native client C++ API for distributing and retrieving custom-defined user types. The example uses <code>gemfire::CacheableKey</code> to define a key type suitable for storage as a value in the cache. See the C++ API documentation for a description of <code>gemfire::CacheableKey</code>. You can also review the example source code in the <code>userobjects</code> directory. </P>
+<P>The <code>userobjects</code> example is located in <code>NativeClient_InstallDir/SampleCode/examples/userobjects</code>.</P>
+<br>
+</DIV>
+
+<DIV>
+<H2>
+<a name="configuring_environment" id="configuring_environment"></a>Configuring the Environment </H2>
+</DIV>
+ <DIV>
+   <p>The following is a list of the environment configuration commands for the <code>userobjects</code> example. Choose the set of commands that are appropriate for your operating system. The text that you type is shown in <strong><code>bold</code></strong>.</p>
+<p><strong>Bourne and Korn shells (sh, ksh, bash)</strong>  </p>
+<blockquote>
+  <p><code>    % <strong>GFCPP=&lt;path to NativeClient_InstallDir directory&gt;; export GFCPP </strong><br>
+    % <strong>PATH=$GFCPP/bin:$PATH; export PATH</strong><br>
+    % <strong>LD_LIBRARY_PATH=$GFCPP/lib; export LD_LIBRARY_PATH</strong></code></p>
+</blockquote>
+<p><strong>Windows</strong></p>
+<blockquote>
+  <p><em>The Windows native client installer sets the required environment configurations for you, so they are listed for reference only.</em></p>
+  <p><code>&gt; GFCPP=&lt;path to NativeClient_InstallDir directory&gt;<br>
+  &gt; PATH=%GFCPP%\bin;%PATH%<br>
+  <br>
+  <br>
+  </code></p>
+</blockquote>
+</DIV>
+
+<DIV>
+<H2>Running userobjects</H2>
+<P>
+Follow these steps to run the <code>userobjects</code> example.  The steps reflect Windows operations, so alter them as needed for your operating system.</P>
+</DIV>
+<DIV>
+<OL>
+<LI CLASS="Numbered-1st">
+  <p>
+Create a session, then configure the session environment according to the steps listed in <a href="#configuring_environment">Configuring the Environment</a><a href="../envsetup.html" target="_blank"></a>.</p>
+</LI>
+<LI CLASS="Numbered-1st">Go to the <code>userobjects</code> example directory.</LI>
+<blockquote>
+  <p><strong> <code>cd NativeClient_InstallDir\SampleCode\examples\userobjects</code></strong></p>
+</blockquote>
+<LI CLASS="Numbered">
+Enter this command to start the example:
+
+  <blockquote>
+   <p><strong>
+     <code>userobjects</code></strong></p>
+   </blockquote>
+ </LI>
+
+<p>The process registers custom serializable types, then connects to the distributed system. It creates a cache and region, then creates a new <code>AccountHistory</code> and puts it in the cache. Next, it gets <code>AccountHistory</code> from the cache and updates it.</p>
+<p>This is the example output:</p>
+<blockquote>
+    <p><code>Put an AccountHistory in cache keyed with BankAccount.<br>
+      BankAccount( customer: 2309, account: 123091 )<br>
+      AccountHistory:<br>
+&nbsp;&nbsp;Created account<br>
+      Found AccountHistory in the cache.<br>
+      AccountHistory:<br>
+&nbsp;&nbsp;Created account<br>
+      Updated AccountHistory in the cache.<br>
+      Found AccountHistory in the cache.<br>
+      AccountHistory:<br>
+&nbsp;&nbsp;Created account<br>
+&nbsp;&nbsp;debit $1,000,000.</code></p>
+  </blockquote>
+  <LI CLASS="Numbered">Close the session by entering <code>exit</code>.</LI>
+</OL>
+<br>
+</DIV>
+<DIV>
+<H2>
+Changing System Parameters</H2>
+<P>
+By default, this product ships configured for multicast membership resolution. If your network environment does not allow multicast, you can configure GemFire for unicast. See the <em>GemFire User's Guide</em> for instructions on configuring TCP transport for membership and discovery. <code><br>
+    <br>
+</code></P>
+</DIV>
+<a href="#Top">Top</a>
+<P>
+<br>
+<p>Copyright (c) 2006-2014 Pivotal Software, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. Pivotal products are covered by one or more patents listed at http://www.pivotal.io/patents. </p>
+</BODY>
+</HTML>
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/dist/userobjects/buildit.bat
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/dist/userobjects/buildit.bat b/geode-client-native/examples/dist/userobjects/buildit.bat
new file mode 100755
index 0000000..4012fe6
--- /dev/null
+++ b/geode-client-native/examples/dist/userobjects/buildit.bat
@@ -0,0 +1,7 @@
+@echo off
+
+echo "GFCPP=%GFCPP%"
+
+cl /MD /Zc:wchar_t /GR /EHsc /wd4996 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NON_CONFORMING_SWPRINTFS /DWINVER=0x0500 /I%GFCPP%\include /Feuserobjects.exe *.cpp %GFCPP%\lib\gfcppcache.lib
+
+del *.obj

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/dist/userobjects/buildit.sh
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/dist/userobjects/buildit.sh b/geode-client-native/examples/dist/userobjects/buildit.sh
new file mode 100755
index 0000000..1e317d4
--- /dev/null
+++ b/geode-client-native/examples/dist/userobjects/buildit.sh
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+
+if [ -z ${GFCPP:-} ]; then
+  echo set GFCPP...
+  exit 1
+fi
+
+OPT=-O3
+LIBDIR=lib
+
+platform=`uname`
+is64bit=__IS_64_BIT__
+if [ "$platform" == "SunOS" ]; then
+  if [ $is64bit -eq 1 ]; then
+    ARCH="-xarch=v9"
+  else
+    ARCH="-xarch=v8plus"
+  fi
+  CC \
+      -D_REENTRANT $OPT $ARCH \
+      -I$GFCPP/include \
+      -L$GFCPP/$LIBDIR \
+      -R$GFCPP/$LIBDIR \
+      *.cpp -o userobjects -lgfcppcache -lrt -lcollector -lkstat
+elif [ "$platform" == "Linux" ]; then
+  if [ $is64bit -eq 1 ]; then
+    ARCH="-m64"
+  else
+    ARCH="-m32"
+  fi
+  g++ \
+      -D_REENTRANT $OPT -Wall -Werror $ARCH \
+      -I$GFCPP/include \
+      -Xlinker -rpath -Xlinker $GFCPP/$LIBDIR -L$GFCPP/$LIBDIR \
+      *.cpp -o userobjects -lgfcppcache
+else
+  echo "This script is not supported on this platform."
+  exit 1
+fi
+
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/unix_README.html
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/unix_README.html b/geode-client-native/examples/unix_README.html
new file mode 100644
index 0000000..e2e3105
--- /dev/null
+++ b/geode-client-native/examples/unix_README.html
@@ -0,0 +1,41 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"><HTML>
+ <HEAD>
+  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+  <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+  <LINK REL="STYLESHEET" HREF="../../docs/DocIndex.css" CHARSET="ISO-8859-1" TYPE="text/css">
+  <TITLE>Pivotal GemFire&#174; Native Client Examples</TITLE>
+  <style type="text/css">
+<!--
+.style1 {font-style: italic}
+.style2 {font-size: medium}
+-->
+  </style>
+</HEAD>
+<BODY bgcolor="#ffffff">
+     <IMG SRC="../../docs/PIVOTAL_GemFire_190x81.png" BORDER="0">
+     <h1 align="left">
+     <FONT size=6><b>Pivotal GemFire<FONT size=6><b><sup><font size=-0>&#174;</font></sup></b></FONT> Native Client C++ Examples </H1></b></FONT>
+     <hr color="#330066" width=650 size="1" align="left">
+     <table border=0 cellspacing=0 cellpadding=5 width=650>
+  <tr>
+    <td valign="top"><strong>C++ Examples</strong></td>
+    <td valign="top"><p><a href="cacheRunner/README.html" target="_blank"><strong>cacheRunner</strong></a></b>: 
+      Shows how to modify and view cache contents, perform queries on cached data, maintain highly available client queues after server failover, and authenticate client credentials.</p>
+      <p><a href="userobjects/README.html" target="_blank"><strong>userobjects</strong></a>: 
+      Demonstrates the native client C++ API for distributing and retrieving custom-defined user types.</p>
+      <p><a href="cqQuery/README.html" target="_blank"><strong>cqQuery</strong></a>: 
+      Demonstrates the native client C++ API for continuous query.</p>
+      <hr color="#330066" width="75%" size="1" align="left">    </td>
+  </tr>
+  <tr>
+  <tr>
+   <td valign="top" width="24%"><a href="../../docs/cppdocs/index.html" target="_blank"><strong>C++ API Reference</strong></a> </td>
+
+   <td valign="top"> 
+		Online C++ API documentation for the native client.
+
+		  <hr color="#330066" width="75%" size="1" align="left">	</td>
+  </tr>
+ </table>
+</BODY>
+</HTML>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/examples/win_README.html
----------------------------------------------------------------------
diff --git a/geode-client-native/examples/win_README.html b/geode-client-native/examples/win_README.html
new file mode 100644
index 0000000..2c737f5
--- /dev/null
+++ b/geode-client-native/examples/win_README.html
@@ -0,0 +1,57 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"><HTML>
+ <HEAD>
+  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
+  <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
+  <LINK REL="STYLESHEET" HREF="../../docs/DocIndex.css" CHARSET="ISO-8859-1" TYPE="text/css">
+  <TITLE>Pivotal GemFire&#174; Native Client Examples</TITLE>
+  <style type="text/css">
+<!--
+.style1 {font-style: italic}
+.style2 {font-size: medium}
+-->
+  </style>
+</HEAD>
+<BODY bgcolor="#ffffff">
+     <IMG SRC="../../docs/PIVOTAL_GemFire_190x81.png" BORDER="0">
+     <h1 align="left">
+     <FONT size=6><b>Pivotal GemFire</b><FONT size=6><b><sup><font size=-0>&#174;</font></sup></b></FONT></FONT> Native Client C++ and C# Examples </H1>
+     <hr color="#330066" width=650 size="1" align="left">
+     <table border=0 cellspacing=0 cellpadding=5 width=650>
+  <tr>
+    <td valign="top"><strong>C++ Examples</strong></td>
+    <td valign="top"><p><a href="cacheRunner/README.html" target="_blank"><strong>cacheRunner</strong></a></b>: 
+      Shows how to modify and view cache contents, perform queries on cached data, maintain highly available client queues after server failover, and authenticate client credentials.</p>
+      <p><a href="userobjects/README.html" target="_blank"><strong>userobjects</strong></a>: 
+      Demonstrates the native client C++ API for distributing and retrieving custom-defined user types.</p>
+      <p><a href="cqQuery/README.html" target="_blank"><strong>cqQuery</strong></a>: 
+      Demonstrates the native client C++ API for continuous query.</p>
+      <hr color="#330066" width="75%" size="1" align="left">    </td>
+  </tr>
+    <tr>
+    <td valign="top"><strong>C# Examples</strong></td>
+    <td valign="top"><p><a href="cli_ProductBrowser/README.html" target="_blank"><strong>ProductBrowser</strong></a>: 
+        Presents heterogeneous client access by using both a .NET client and a Java client to interact with a Java cache server and exchange data between the clients.</p>
+      <p><a href="cli_CacheRunner/README.html" target="_blank"><strong>CacheRunner</strong></a></b>: 
+        Shows how to modify and view cache contents, perform queries on cached data, and maintain highly available client queues after server failover.</p>
+      <p><a href="cli_CqQuery/README.html" target="_blank"><strong>CqQuery</strong></a>: Demonstrate the usage of C# continuous query API.
+      <hr color="#330066" width="75%" size="1" align="left">    </td>
+  </tr>
+  <tr>
+   <td valign="top" width="24%"><a href="../../docs/DotNetDocs/index.html" target="_blank"><strong>.NET API Reference</strong></a> </td>
+
+   <td valign="top"> 
+		Online .NET API documentation for the native client.
+
+		  <hr color="#330066" width="75%" size="1" align="left">	</td>
+  </tr>
+  <tr>
+   <td valign="top" width="24%"><a href="../../docs/cppdocs/index.html" target="_blank"><strong>C++ API Reference</strong></a> </td>
+
+   <td valign="top">
+                Online C++ API documentation for the native client.
+
+                  <hr color="#330066" width="75%" size="1" align="left">        </td>
+  </tr>
+ </table>
+</BODY>
+</HTML>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/filehdr.txt
----------------------------------------------------------------------
diff --git a/geode-client-native/filehdr.txt b/geode-client-native/filehdr.txt
new file mode 100644
index 0000000..df54021
--- /dev/null
+++ b/geode-client-native/filehdr.txt
@@ -0,0 +1,12 @@
+
+/*=========================================================================
+ * Copyright (c) XXXX Pivotal Software, Inc. All rights reserved. 
+ * This product is protected by U.S. and international copyright 
+ * and intellectual property laws. Pivotal products are covered by 
+ * one or more patents listed at http://www.pivotal.io/patents.  
+REPLACE XXXX with year of code initial change (new file) or if modification 
+use specific year starting with initial (ie. 1997, 1999, 2008) or 
+range (1997-2014) if changed every year and delete these three lines. 
+ *=========================================================================
+ */
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/gfgrep
----------------------------------------------------------------------
diff --git a/geode-client-native/gfgrep b/geode-client-native/gfgrep
new file mode 100755
index 0000000..c8b1752
--- /dev/null
+++ b/geode-client-native/gfgrep
@@ -0,0 +1,18 @@
+#! /usr/bin/bash
+
+# -w -- whole word
+# -i -- case insensitive
+
+#glimpse=/usr/local/10bin/glimpse
+#glimpse=glimpse
+glimpse=/usr/local/10bin/glimpse41/bin/glimpse
+
+if [ -z ${GFBASE-} ]; then
+	GFBASE=`pwd`
+fi
+if [ ! -d "${GFBASE}/glimpsefiles" ]; then
+	echo "Cannot find glimpsefiles (${GFBASE}/glimpsefiles)."
+	exit 1;
+fi
+
+exec $glimpse -H $GFBASE/glimpsefiles "$@"

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/makefiles/cppcache.gmk
----------------------------------------------------------------------
diff --git a/geode-client-native/makefiles/cppcache.gmk b/geode-client-native/makefiles/cppcache.gmk
new file mode 100755
index 0000000..251e9d8
--- /dev/null
+++ b/geode-client-native/makefiles/cppcache.gmk
@@ -0,0 +1,788 @@
+#=========================================================================
+# Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+# This product is protected by U.S. and international copyright
+# and intellectual property laws. Pivotal products are covered by
+# more patents listed at http://www.pivotal.io/patents.
+#========================================================================
+
+ifdef LIBRARY
+
+ifeq ($(LIBRARY),gfcppcache)
+  CFLAGS_COMMON = -DBUILD_CPPCACHE -DACE_NLOGGING -DACE_NDEBUG -D__ACE_INLINE__
+endif
+
+ifeq ($(CPPDEVEL),1)
+  CFLAGS_COMMON += -DGF_DEVEL_ASSERTS=1
+endif
+
+# default rule
+ifdef WINDIR
+all: bothlibs
+else
+all: makeslow makefast
+endif
+
+ifdef WINDIR
+  WINDOWS = true
+else
+  UNAME := $(shell uname)
+  ifeq ($(UNAME),Linux)
+    LINUX = true
+  else
+    ifeq ($(UNAME),SunOS)
+      SOLARIS = true
+    endif
+  endif
+endif
+
+#ifeq ($(LINUX),true)
+#  MAKE_THREADS = -j16
+#else
+#  ifeq ($(UNAME),SunOS)
+#    MAKE_THREADS = -j8
+#  endif
+#endif
+#ifeq ($(WINDOWS),true)
+#  ifndef WIN_MAKE_THREADS
+#    WIN_MAKE_THREADS = 1
+#  endif
+#endif
+
+makeslow:
+	$(MAKE) $(MAKE_THREADS) VARIANT=slow library
+
+makefast:
+	$(MAKE) $(MAKE_THREADS) VARIANT=fast library
+
+bothlibs:
+	$(MAKE) -j$(WIN_MAKE_THREADS) makeslow makefast
+  
+.PHONY: bothlibs makeslow makefast all jniheaders
+
+endif # LIBRARY
+
+ifeq ($(VARIANT),slow)
+  LIBDIR=$(OSBUILDDIR)/hidden/lib/debug
+  DEBUGSUFFIX = _g
+else
+  LIBDIR=$(OSBUILDDIR)/hidden/lib
+  # DEBUGSUFFIX is empty
+endif
+
+ifdef TESTBUILD
+  OBJDIR=$(OSBUILDDIR)/tests/cpp_objects$(DEBUGSUFFIX)
+
+  GENERATEDDIR=$(OSBUILDDIR)/tests/generated
+  ENHANCEDDIR=$(OSBUILDDIR)/tests/enhanced-classes
+  CLASSESDIR=$(OSBUILDDIR)/tests/classes
+else
+  # src build
+  OBJDIR=$(OSBUILDDIR)/src/cpp_objects$(DEBUGSUFFIX)
+
+  GENERATEDDIR=$(OSBUILDDIR)/src/generated
+  ENHANCEDDIR=$(OSBUILDDIR)/src/enhanced-classes
+  CLASSESDIR=$(OSBUILDDIR)/classes
+endif
+TMPARDIR=$(OSBUILDDIR)/src
+
+BINDIR=$(OSBUILDDIR)/product/bin
+
+ifeq ($(OSNAME),SunOS)
+  UNAME_P := $(shell uname -p)
+  ifeq ($(UNAME_P),sparc)
+    HOSTTYPE_OSTYPE=sparc.Solaris
+    NATIVEINC=solaris
+  else
+    HOSTTYPE_OSTYPE=x86.Solaris
+    NATIVEINC=solaris
+  endif
+else
+  ifeq ($(OSNAME),Linux)
+    HOSTTYPE_OSTYPE=intel.Linux
+    NATIVEINC=linux
+  else
+    HOSTTYPE_OSTYPE=intel.Windows
+    NATIVEINC=win32
+  endif
+endif
+
+CINCLUDES = \
+  -I$(GENERATEDDIR) \
+  -I$(ACE_DIR)/include \
+  -I$(XML)/include/libxml2 \
+  -I$(OPENSSL)/include 
+#  -I$(ZZIP)/product/include
+
+ifndef USE_CPP11
+  CINCLUDES += -I$(STLPORT)/stlport 
+endif
+
+ZZIPLIBDIR = $(ZZIP)/product/lib
+
+INTERNAL_SRC_DIR = $(base)/src/com/gemstone/gemfire/internal
+
+ifdef CPPCACHE_INCLUDES
+  CINCLUDES += $(CPPCACHE_INCLUDES)
+endif
+
+#  FILES_FIRST_c should be the first one in the FILES_o list
+#  FILES_LAST_c must be not be in FILES_o, because we want it linked after
+#   the last object brought in from .a terms within LIBS
+#
+FILES_o = $(patsubst %.c,$(OBJDIR)/%.$(OBJEXT),$(FILES_FIRST_c)) \
+ $(patsubst %.c,$(OBJDIR)/%.$(OBJEXT),$(FILES_c)) \
+ $(patsubst %.cpp,$(OBJDIR)/%.$(OBJEXT),$(FILES_cpp)) \
+ $(patsubst statistics/%.cpp,$(OBJDIR)/statistics/%.$(OBJEXT),$(STATISTICS_FILES_cpp)) \
+ $(patsubst impl/%.cpp,$(OBJDIR)/impl/%.$(OBJEXT),$(IMPL_FILES_cpp)) \
+ $(patsubst %.asm,$(OBJDIR)/%.$(OBJEXT),$(FILES_asm)) \
+ $(patsubst admin/%.cpp,$(OBJDIR)/admin/%.$(OBJEXT),$(ADMIN_FILES_cpp)) \
+ $(patsubst admin/impl/%.cpp,$(OBJDIR)/admin/impl/%.$(OBJEXT),$(ADMIN_IMPL_FILES_cpp))
+
+LAST_o = $(patsubst %.c,$(OBJDIR)/%.$(OBJEXT),$(FILES_LAST_c)) 
+
+# By default NATIVEDIR_FUNC does nothing
+NATIVEDIR_FUNC = $(1)
+UNIXDIR_FUNC = $(1)
+NATIVEPATH_FUNC = $(1)
+
+ifeq ($(OSNAME),SunOS)
+  # JAVA_HOME must be a jdk , jre's do not include javah
+  # JAVA_HOME is set in build.sh, not here
+
+  #  SunCompilerDir is set in build.sh
+  CC  = $(SunCompilerDir)/cc  
+  CXX = $(SunCompilerDir)/CC
+
+  # Notes 
+  # TODO jbarrett -  -xcode=pic13 is small model position-independent (max 2*11 external syms)
+  # TODO jbarrett - -xcode=pic32 is large model position-independent (max 2*30 external syms)
+
+  # GFLIB_MODEL  is defined in build.xml
+  ifeq ($(GFLIB_MODEL),64bit)
+    # 64 bit model
+    CFLAGS_MODEL = -m64
+  else
+    # TODO jbarrett - 32bit model, but require int64 data  to be 8-byte-aligned
+    CFLAGS_MODEL = -m32
+  endif
+
+  CFLAGS_COMMON += -D_REENTRANT $(CFLAGS_EXTRA) \
+     '-DGEMFIRE_PRODUCTNAME="$(GEMFIRE_PRODUCTNAME)"' \
+     '-DGEMFIRE_VERSION="$(GEMFIRE_VERSION)"' \
+     '-DGEMFIRE_BITS="$(GEMFIRE_BITS)"' \
+     '-DGEMFIRE_BUILDID="$(GEMFIRE_BUILDID)"' \
+     '-DGEMFIRE_BUILDDATE="$(GEMFIRE_BUILDDATE)"' \
+     '-DGEMFIRE_BUILDOS="$(GEMFIRE_BUILDOS)"' \
+     '-DGEMFIRE_SOURCE_REVISION="$(GEMFIRE_SOURCE_REVISION)"' \
+     '-DGEMFIRE_SOURCE_REPOSITORY="$(GEMFIRE_SOURCE_REPOSITORY)"' \
+     '-DLICENSE_VERSION="$(LICENSE_VERSION)"'
+
+  ifdef USE_CPP11
+    CFLAGS_STD = -std=c++11
+  else
+    CFLAGS_STD = -library=no%Cstd,no%iostream
+  endif
+  
+  CFLAGS_COMMON += $(CFLAGS_MODEL) -features=rtti 
+  CFLAGS_COMMON += -mt -D_POSIX_PTHREAD_SEMANTICS
+  CFLAGS_COMMON += $(CFLAGS_COMMON_M_ALIGN) -KPIC
+  CFLAGS_COMMON += $(CFLAGS_STD)
+  CFLAGS_COMMON += -xMD
+
+  CFLAGS_slow = -g -DDEBUG -DGF_DEBUG_ASSERTS=1 -KPIC
+  COpt_slow/default = -g 
+  COpt_slow/fast = -O2   # not currently used
+  COpt_slow/debug = -g 
+
+  # if there is no file-specific variable defined
+  #   then COpt_slow/byfile evaluates to value of COpt_slow/default
+  COpt_slow/byfile = $(COpt_slow/$<)$(COpt_slow/default$(COpt_slow/$<))
+
+  #    file-specific optimization controls for slow library
+  # COpt_slow/hostunix.c = $(COpt_slow/debug)
+
+  CFLAGS_fast = -g -xwe
+  ifdef USE_CPP11
+    # -xO4 causes sigaborts on some exceptions thrown due to automatic inlining.
+    COpt_fast/default = -xO3
+    COpt_fast/big_pic = -xO3
+  else
+    COpt_fast/default = -xO4
+    COpt_fast/big_pic = -xO4
+  endif
+  COpt_fast/slower = -xO2
+  COpt_fast/debug = -g
+  COpt_fast/byfile = $(COpt_fast/$(notdir $<))$(COpt_fast/default$(COpt_fast/$(notdir $<)))
+
+  #    file-specific optimization controls for fast library
+  #  for safety compile signal handlers with O2
+  COpt_fast/AttributesFactory.cpp = $(COpt_fast/big_pic)
+  COpt_fast/AttributesMutator.cpp = $(COpt_fast/big_pic)
+  COpt_fast/Cache.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CacheFactory.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CacheAttributes.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CacheAttributesFactory.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CacheCallback.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CacheEvent.cpp = $(COpt_fast/big_pic)
+  COpt_fast/Cacheable.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CacheableToken.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CacheableString.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CacheableKey.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CacheFactory.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CacheListener.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CacheLoader.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CacheStatistics.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CacheWriter.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CqAttributesMutator.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CqAttributesFactory.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CqAttributes.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CqAttributesImpl.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CqState.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CqQuery.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CqListener.cpp = $(COpt_fast/big_pic)
+  COpt_fast/DistributedSystem.cpp = $(COpt_fast/big_pic)
+  COpt_fast/EntryEvent.cpp = $(COpt_fast/big_pic)
+  COpt_fast/Exception.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ExceptionTypes.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ExpirationAction.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ExpirationAttributes.cpp = $(COpt_fast/big_pic)
+  COpt_fast/HostAsm.cpp = $(COpt_fast/big_pic)
+  COpt_fast/InterestResultPolicy.cpp = $(COpt_fast/big_pic)
+  COpt_fast/LoaderHelper.cpp = $(COpt_fast/big_pic)
+  COpt_fast/License.cpp = $(COpt_fast/big_pic)
+  COpt_fast/LicenseFeatureSet.cpp = $(COpt_fast/big_pic)
+  COpt_fast/LicenseSet.cpp = $(COpt_fast/big_pic)
+  COpt_fast/RegionAttributes.cpp = $(COpt_fast/big_pic)
+  COpt_fast/RegionEvent.cpp = $(COpt_fast/big_pic)
+  COpt_fast/RegionEntry.cpp = $(COpt_fast/big_pic)
+  COpt_fast/Region.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ResultSet.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ResultSetImpl.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ScopeType.cpp = $(COpt_fast/big_pic)
+  COpt_fast/SelectResultsIterator.cpp = $(COpt_fast/big_pic)
+  COpt_fast/Serializable.cpp = $(COpt_fast/big_pic)
+  COpt_fast/SerializationHelper.cpp = $(COpt_fast/big_pic)
+  COpt_fast/StatisticsFactory.cpp = $(COpt_fast/big_pic)
+  COpt_fast/StructSet.cpp = $(COpt_fast/big_pic)
+  COpt_fast/StructSetImpl.cpp = $(COpt_fast/big_pic)
+  COpt_fast/UserData.cpp = $(COpt_fast/big_pic)
+  COpt_fast/BridgeLoader.cpp = $(COpt_fast/big_pic)
+  COpt_fast/Blowfish.cpp = $(COpt_fast/big_pic)
+  COpt_fast/MD5.cpp = $(COpt_fast/big_pic)
+  COpt_fast/VectorOfSharedBase.cpp = $(COpt_fast/big_pic)
+  COpt_fast/Version.cpp = $(COpt_fast/big_pic)
+  COpt_fast/Utils.cpp = $(COpt_fast/big_pic)
+  COpt_fast/LocalRegion.cpp = $(COpt_fast/big_pic)
+  COpt_fast/StackTrace.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ProxyCache.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ProxyRegion.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ProxyRemoteQueryService.cpp = $(COpt_fast/big_pic)
+  COpt_fast/UserAttributes.cpp = $(COpt_fast/big_pic)
+  COpt_fast/FunctionServiceImpl.cpp = $(COpt_fast/big_pic)
+  COpt_fast/GetAllServersRequest.cpp = $(COpt_fast/big_pic)
+  COpt_fast/GetAllServersResponse.cpp = $(COpt_fast/big_pic)
+
+  COpt_fast/LocatorImpl.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CacheApplicationImpl.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CacheRegionImpl.cpp = $(COpt_fast/big_pic)
+  COpt_fast/Statistic.cpp = $(COpt_fast/big_pic)
+  COpt_fast/StatisticEvent.cpp = $(COpt_fast/big_pic)
+  COpt_fast/StatisticListener.cpp = $(COpt_fast/big_pic)
+  COpt_fast/StatisticResource.cpp = $(COpt_fast/big_pic)
+  COpt_fast/Struct.cpp = $(COpt_fast/big_pic)
+  COpt_fast/SystemProperties.cpp = $(COpt_fast/big_pic)
+  COpt_fast/LogEvent.cpp = $(COpt_fast/big_pic)
+  COpt_fast/LogListener.cpp = $(COpt_fast/big_pic)
+  COpt_fast/TcrCSVersion.cpp = $(COpt_fast/big_pic)
+  COpt_fast/TcrDistributionManager.cpp = $(COpt_fast/big_pic)
+  COpt_fast/TcrHADistributionManager.cpp = $(COpt_fast/big_pic)
+  COpt_fast/TcrEndpoint.cpp = $(COpt_fast/big_pic)
+  COpt_fast/TcrConnectionManager.cpp = $(COpt_fast/big_pic)
+  COpt_fast/TcrConnection.cpp = $(COpt_fast/big_pic)
+  COpt_fast/TcrMessage.cpp = $(COpt_fast/big_pic)
+  COpt_fast/gfcppBanner.cpp = $(COpt_fast/big_pic)
+  COpt_fast/SpinLock.cpp = $(COpt_fast/big_pic)
+  COpt_fast/dllMain.cpp = $(COpt_fast/big_pic)
+  COpt_fast/TcpConn.cpp = $(COpt_fast/big_pic)
+  COpt_fast/UserPasswordAuthInit.cpp = $(COpt_fast/big_pic)
+  COpt_fast/AdminRegion.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ClientHealthStats.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ThinClientPoolDM.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ServerLocationRequest.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ClientConnectionResponse.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ClientConnectionRequest.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ThinClientLocatorHelper.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ServerLocationResponse.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ServerLocation.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ThinClientBaseDM.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ThinClientPoolRegion.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ThinClientRedundancyManager.cpp = $(COpt_fast/big_pic)
+  COpt_fast/QueueConnectionResponse.cpp = $(COpt_fast/big_pic)
+  COpt_fast/QueueConnectionRequest.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ThinClientHARegion.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ThinClientDistributionManager.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ThinClientCacheDistributionManager.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ThinClientPoolHADM.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CacheImpl.cpp = $(COpt_fast/big_pic)
+  COpt_fast/PoolFactory.cpp = $(COpt_fast/big_pic)
+  COpt_fast/PoolManager.cpp = $(COpt_fast/big_pic)
+  COpt_fast/Pool.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CqAttributesImpl.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CqAttributesMutatorImpl.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CqEventImpl.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CqQueryImpl.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CqQueryVsdStats.cpp = $(COpt_fast/big_pic)
+  COpt_fast/CqService.cpp = $(COpt_fast/big_pic)
+  COpt_fast/FunctionService.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ExecutionImpl.cpp = $(COpt_fast/big_pic)
+  COpt_fast/EventId.cpp = $(COpt_fast/big_pic)
+  COpt_fast/EventIdMap.cpp = $(COpt_fast/big_pic)
+  COpt_fast/MapEntry.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ExpMapEntry.cpp = $(COpt_fast/big_pic)
+  COpt_fast/LRUMapEntry.cpp = $(COpt_fast/big_pic)
+  COpt_fast/LRUExpMapEntry.cpp = $(COpt_fast/big_pic)
+  COpt_fast/TrackedMapEntry.cpp = $(COpt_fast/big_pic)
+  COpt_fast/LRUEntriesMap.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ThinClientPoolStickyDM.cpp = $(COpt_fast/big_pic)
+  COpt_fast/TcrPoolEndPoint.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ThinClientPoolStickyHADM.cpp = $(COpt_fast/big_pic)
+  COpt_fast/ThinClientStickyManager.cpp = $(COpt_fast/big_pic)
+  COpt_fast/RegionConfig.cpp = $(COpt_fast/big_pic)
+  COpt_fast/EntryExpiryHandler.cpp = $(COpt_fast/big_pic)
+  COpt_fast/MapSegment.cpp = $(COpt_fast/big_pic)
+  COpt_fast/PoolXmlCreation.cpp = $(COpt_fast/big_pic)
+  
+  CFLAGSnoop = -g
+
+  COptFlag = $(COpt_$(VARIANT)/byfile)
+  CFLAGS += $(CFLAGS_COMMON) $(CFLAGS_OPT) $(CFLAGS_$(VARIANT)) $(COptFlag) $(CINCLUDES)
+
+  # use -noex to disallow C++ exceptions
+  CXXFLAGS = $(CFLAGS_COMMON) $(CFLAGS_OPT) $(CFLAGS_$(VARIANT)) $(COptFlag) $(CINCLUDES)
+
+  LDFLAGS_MODEL = $(CFLAGS_MODEL)
+  LDFLAGSfast= -mt $(LDFLAGS_MODEL)
+  LDFLAGSslow= -g -mt $(LDFLAGS_MODEL)
+  LDFLAGSnoop= -g -mt $(LDFLAGS_MODEL)
+
+
+  ifeq ($(LIBRARY),gfcppcache)
+    THIRDPARTY_STATICS = $(ACE_STATIC_DIR)/lib/libACE.a $(XML)/lib/libxml2.a
+    LIBS = -ldl -lpthread -lc -L$(LIBDIR) -lm -lsocket -lrt -lnsl -ldemangle -lkstat -lz
+  else
+    THIRDPARTY_STATICS =
+    LIBS = -ldl -lpthread -lc -L$(LIBDIR) -lsocket -lrt -lnsl -ldemangle -lkstat -lz
+  endif
+
+  ifeq ($(GFLIB_MODEL),64bit)
+    PROG_LDFLAGS += $(CFLAGS_MODEL)
+  endif
+
+  ifeq ($(LIBRARY),framework)
+    LIBS += -L$(LIBDIR) $(CFLAGS_STD) -lgfcppcache -lpthread -lrt -lkstat
+  endif
+
+  ifeq ($(VARIANT),slow)
+    LIBS += -L $(LIBDIR)/..
+  endif
+
+  #https://docs.oracle.com/cd/E37069_01/html/E37075/bkamq.html#scrolltoc
+  ifdef USE_CPP11
+    LIB_LDFLAGS_STD = $(CFLAGS_STD) -lstdc++ -lgcc_s -lCrunG3 -lc
+  else
+    LIB_LDFLAGS_STD = $(CFLAGS_STD) -lCstd -lCrun -lc
+  endif
+
+
+  LIB_LDFLAGS = $(LIB_LDFLAGS_STD) $(LIBFLAGS) $(LDFLAGS$(VARIANT))
+  PROG_LDFLAGS = -ldl -lpthread $(LDFLAGS$(VARIANT)) $(EXTRA_PROGLDFLAGS)
+
+  OUT.c = -o $@
+
+  MAKE_RESOURCEDIR=if [ ! -d $(RESOURCEDIR) ]; then mkdir $(RESOURCEDIR) ; fi
+  MAKE_CLASSDIR=if [ ! -d $(CLASSDIR) ]; then mkdir $(CLASSDIR) ; fi; $(MAKE_GENERATEDDIR)
+  MAKE_GENERATEDDIR=if [ ! -d $(GENERATEDDIR) ]; then mkdir $(GENERATEDDIR) ; fi
+  OBJEXT=o
+  MAKE_OBJDIR=if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR) ; fi
+  MAKE_LIBDIR=if [ ! -d $(LIBDIR) ]; then mkdir -p $(LIBDIR) ; fi
+  #MAKE_DELAYFILE=if [ ! -f $(LIBDIR)/delaycoredump.txt ]; then touch $(LIBDIR)/delaycoredump.txt ; fi
+  MAKE_LOCALBINDIR=if [ ! -d $(LOCALBINDIR) ]; then mkdir -p $(LOCALBINDIR) ; fi
+  OBJLIB=$(LIBDIR)/lib$(LIBRARY).so
+  OBJLIBA=$(LIBDIR)/lib$(LIBRARY).a
+  PROGBIN=$(LOCALBINDIR)/$(PROGRAM)
+  # end Solaris
+else
+ifeq ($(HOSTTYPE_OSTYPE),intel.Linux)
+  # JAVA_HOME must be a jdk , jre's do not include javah
+  # JAVA_HOME is set in build.sh, not here
+
+  #  GccCompiler is set in build.sh
+  CC  = $(GccCCompiler)
+  CXX = $(GccCCompiler)
+
+  ifeq ($(GFLIB_MODEL),64bit)
+    # 64 bit model
+    CFLAGS_MODEL = -m64
+    #avoids issue with ACE static library
+    # relocation R_X86_64_32 against `a local symbol' can not be used when making a
+    # shared object
+    FPIC = -fPIC -DPIC
+  else
+    # 32bit model, but require int64 data  to be 8-byte-aligned
+    CFLAGS_MODEL = -m32
+    FPIC =
+  endif
+
+  # Notes 
+  #  std=iso9899:1990
+  CFLAGS_COMMON += $(CFLAGS_EXTRA) -D_REENTRANT \
+    '-D_LARGEFILE64_SOURCE' \
+    '-DGEMFIRE_PRODUCTNAME="$(GEMFIRE_PRODUCTNAME)"' \
+    '-DGEMFIRE_VERSION="$(GEMFIRE_VERSION)"' \
+    '-DGEMFIRE_BITS="$(GEMFIRE_BITS)"' \
+    '-DGEMFIRE_BUILDID="$(GEMFIRE_BUILDID)"' \
+    '-DGEMFIRE_BUILDDATE="$(GEMFIRE_BUILDDATE)"' \
+    '-DGEMFIRE_BUILDOS="$(GEMFIRE_BUILDOS)"' \
+    '-DGEMFIRE_SOURCE_REVISION="$(GEMFIRE_SOURCE_REVISION)"' \
+    '-DGEMFIRE_SOURCE_REPOSITORY="$(GEMFIRE_SOURCE_REPOSITORY)"' \
+    '-DLICENSE_VERSION="$(LICENSE_VERSION)"'
+
+  CFLAGS_COMMON += $(CFLAGS_MODEL) $(FPIC)
+  CFLAGS_COMMON += -MD
+
+  # removed -Wshadow because of ACE
+  CWarnings = -Wswitch \
+   -Wunused-variable -Wcomments \
+   -Wparentheses -Wsign-compare
+
+  # flags to use only when compiling non-C++ code   
+  nonCPPOpts = -Wimplicit-int -Wmissing-declarations 
+
+  CFLAGS_slow =  -g -DDEBUG -DGF_DEBUG_ASSERTS=1 $(CWarnings) -fno-implement-inlines
+  # COpt_slow/default = -O2
+  COpt_slow/default =
+  COpt_slow/slower =
+  COpt_slow/debug =
+
+  # if there is no file-specific variable defined 
+  #   then COpt_slow/byfile evaluates to value of COpt_slow/default
+  COpt_slow/byfile = $(COpt_slow/$<)$(COpt_slow/default$(COpt_slow/$<))
+
+  #    file-specific optimization controls for slow library
+  COpt_slow/hostsignal_unix.cpp = $(COpt_slow/slower)
+
+  CFLAGSnoop = 
+
+  CFLAGS_fast = -g $(CWarnings) -Wuninitialized
+  # note on  linux fast, can't get line numbers with -O3
+  COpt_fast/default = -O3 -Werror
+  COpt_fast/slower = -O2 -Werror 
+  COpt_fast/debug =
+  COpt_fast/byfile = $(COpt_fast/$<)$(COpt_fast/default$(COpt_fast/$<))
+
+  #    file-specific optimization controls for fast library
+  #  As of Jan, 2003, with gcc 2.96 must use -O2 on signal handlers 
+  COpt_fast/hostsignal_unix.cpp = $(COpt_fast/slower)
+
+  COptFlag = $(COpt_$(VARIANT)/byfile)
+  CFLAGS += $(CFLAGS_COMMON) $(CFLAGS_OPT) $(CFLAGS_$(VARIANT)) $(COptFlag) $(CINCLUDES)
+  CXXFLAGS = $(CFLAGS_COMMON) $(CFLAGS_OPT) $(CFLAGS_$(VARIANT)) $(COptFlag) $(CINCLUDES) -Wreturn-type -Wsign-promo
+
+  LDFLAGSfast= -g
+  LDFLAGSslow= -g
+  LDFLAGSnoop= -g
+
+  ifeq ($(LIBRARY),gfcppcache)
+    THIRDPARTY_STATICS = $(ACE_STATIC_DIR)/lib/libACE.a $(XML)/lib/libxml2.a
+    LIBS = -ldl -lm -lpthread -lc -L$(LIBDIR) -lz -lrt
+  else
+    THIRDPARTY_STATICS =
+    LIBS = -ldl -lm -lpthread -lc -L$(LIBDIR)
+  endif
+
+  ifeq ($(LIBRARY),framework)
+    LIBS += -L $(LIBDIR) -lgfcppcache -lpthread
+  endif
+
+  ifeq ($(VARIANT),slow)
+    LIBS += -L $(LIBDIR)/..
+  endif
+
+# -z defs doesn't work when linking a shared library 
+  LIB_LDFLAGS = -Wl,--warn-once -Wl,--no-as-needed $(LIBFLAGS) $(LDFLAGS$(VARIANT))
+  PROG_LDFLAGS = -ldl -lpthread $(LDFLAGS$(VARIANT)) $(EXTRA_PROGLDFLAGS)
+
+  LIB_LDFLAGS += $(CFLAGS_MODEL) 
+  OUT.c = -o $@
+
+  MAKE_RESOURCEDIR=if [ ! -d $(RESOURCEDIR) ]; then mkdir $(RESOURCEDIR) ; fi
+  MAKE_CLASSDIR=if [ ! -d $(CLASSDIR) ]; then mkdir $(CLASSDIR) ; fi; $(MAKE_GENERATEDDIR)
+  MAKE_GENERATEDDIR=if [ ! -d $(GENERATEDDIR) ]; then mkdir $(GENERATEDDIR) ; fi
+  OBJEXT=o
+  MAKE_OBJDIR=if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR) ; fi
+  MAKE_LIBDIR=if [ ! -d $(LIBDIR) ]; then mkdir -p $(LIBDIR) ; fi
+  #MAKE_DELAYFILE=if [ ! -f $(LIBDIR)/delaycoredump.txt ]; then touch $(LIBDIR)/delaycoredump.txt ; fi
+  MAKE_LOCALBINDIR=if [ ! -d $(LOCALBINDIR) ]; then mkdir -p $(LOCALBINDIR) ; fi
+  OBJLIB=$(LIBDIR)/lib$(LIBRARY).so
+  OBJLIBA=$(LIBDIR)/lib$(LIBRARY).a
+  PROGBIN=$(LOCALBINDIR)/$(PROGRAM)
+  # end Linux
+
+else
+
+  # begin Win2K
+  ifeq ($(MAKE_MODE),unix)
+    NATIVEDIR_FUNC = '$(strip $(shell cygpath -w "$(1)"))'
+    UNIXDIR_FUNC = $(shell cygpath -u '$(1)')
+    NATIVEPATH_FUNC = '$(strip $(shell cygpath -p -w "$(1)"))'
+    override base := $(call UNIXDIR_FUNC,$(base))
+    override OSBUILDDIR := $(call UNIXDIR_FUNC,$(OSBUILDDIR))
+    # must use a jdk here, jre will not have javah 
+    ifndef JAVA_HOME
+      JAVA_HOME=//n080-fil01/NT_build_resources/java/jdk1.4.1.01
+    else
+      override JAVA_HOME := $(call UNIXDIR_FUNC,$(JAVA_HOME))
+    endif
+  endif
+  CINCLUDES +=  -I$(STACKTRACE)\include
+  CINCLUDES := $(foreach dir,$(subst -I,,$(CINCLUDES)),-I$(call NATIVEDIR_FUNC,$(dir)))
+  
+  # VCINCDIRS should be defined in environment before starting build
+  #  if you do not have VC++ include dirs in system environment variables
+  VCINCLUDES=
+  ifdef VCINCDIRS
+    VCINCLUDES = $(foreach dir,$(subst -I,,$(VCINCDIRS)),-I$(call NATIVEDIR_FUNC,$(dir)))
+  endif
+
+  CC = cl
+  CXX = cl
+  ifeq ($(VCVER),vc8)
+    CFLAGSvc8 = /wd4996 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NON_CONFORMING_SWPRINTFS
+    MT_COMMAND = mt /nologo -manifest $(call NATIVEDIR_FUNC,$@).manifest -outputresource:$(call NATIVEDIR_FUNC,$@) 
+  else
+    ifeq ($(VCVER),vc7)
+      CFLAGSvc7slow = /Ge
+      CFLAGSvc7fast = /G6 /Zd
+    endif
+  endif
+  CFLAGS_COMMON += -nologo /GR /EHac /W3 $(CFLAGS$(VCVER)) /WX /WL\
+     /DWINVER=0x0500 /D_WIN32_WINNT=0x500 \
+     -Fd$(call NATIVEDIR_FUNC,$(OBJDIR)/vc60.pdb) \
+     '-DGEMFIRE_PRODUCTNAME="$(GEMFIRE_PRODUCTNAME)"' \
+     '-DGEMFIRE_VERSION="$(GEMFIRE_VERSION)"' \
+     '-DGEMFIRE_BITS="$(GEMFIRE_BITS)"' \
+     '-DGEMFIRE_BUILDID="$(GEMFIRE_BUILDID)"' \
+     '-DGEMFIRE_BUILDDATE="$(GEMFIRE_BUILDDATE)"' \
+     '-DGEMFIRE_BUILDOS="$(GEMFIRE_BUILDOS)"' \
+     '-DGEMFIRE_SOURCE_REVISION="$(GEMFIRE_SOURCE_REVISION)"' \
+     '-DGEMFIRE_SOURCE_REPOSITORY="$(GEMFIRE_SOURCE_REPOSITORY)"' \
+     '-DLICENSE_VERSION="$(LICENSE_VERSION)"'
+
+  CFLAGSfast = /MD /Ox $(CFLAGS$(VCVER)$(VARIANT))
+  CFLAGSslow = /MDd /Od /Zi $(CFLAGS$(VCVER)$(VARIANT)) /GS /RTC1 -DDEBUG -DGF_DEBUG_ASSERTS=1
+  CFLAGS += $(CFLAGS_COMMON) $(CFLAGS_OPT) $(CFLAGS$(VARIANT)) $(CINCLUDES)
+  LDFLAGSslow = -debug
+  LDFLAGSnoop = -debug
+  LDFLAGSfast = -debug -opt:ref
+
+  # VCLIBDIRS should be defined in environment before starting build
+  #  if you do not have VC++ lib dirs in system environment variables
+  LIBPATH=
+  ifdef VCLIBDIRS
+    LIBPATH += $(foreach dir,$(VCLIBDIRS),/LIBPATH:$(call NATIVEDIR_FUNC,$(dir)))
+  endif
+
+  LIBPATH += /LIBPATH:$(call NATIVEDIR_FUNC,$(STLPORT)/lib) /LIBPATH:$(call NATIVEDIR_FUNC,$(LIBDIR))
+
+  ifeq ($(VARIANT),slow)
+    LIBPATH += /LIBPATH:$(call NATIVEDIR_FUNC,$(LIBDIR)/..) 
+  endif
+
+  ifeq ($(VARIANT),slow)
+    ZZIPLIB=zziplibd.lib
+  else
+    ZZIPLIB=zziplib.lib
+  endif
+
+  LIBPATH +=/LIBPATH:$(call NATIVEDIR_FUNC,$(STACKTRACE)/LIB,$(XML)/lib)
+  LIBPATH +=/LIBPATH:$(call NATIVEDIR_FUNC,$(ZZIP)/product/lib)
+
+  ifdef TESTBUILD
+
+    LIB_LDFLAGS = -dll -entry:_DllMainCRTStartup@12 -OPT:REF -INCREMENTAL:NO -MAP $(LDFLAGS$(VARIANT)) $(LIBPATH)
+  else
+    LIB_LDFLAGS = -dll -entry:DLLMain@12 -OPT:REF -INCREMENTAL:NO -MAP $(LDFLAGS$(VARIANT)) $(LIBPATH)
+  endif
+  PROG_LDFLAGS = -INCREMENTAL:NO -MAP -STACK:1048576 $(LDFLAGS$(VARIANT)) $(EXTRA_PROGLDFLAGS) $(LIBPATH)
+  LOADLIBES = wsock32.lib netapi32.lib advapi32.lib \
+              comdlg32.lib user32.lib gdi32.lib kernel32.lib \
+              winspool.lib dbghelp.lib \
+              libxml2.lib $(ZZIPLIB) zlib.lib
+  
+  ifeq ($(VARIANT),slow)
+    ifeq ($(HOSTTYPE_OSTYPE),intel.Windows)
+      LOADLIBES += ACEd.lib
+    else
+      LOADLIBES += ACE.lib
+    endif
+  else
+    LOADLIBES += ACE.lib
+  endif
+
+  ifeq ($(LIBRARY),framework)
+    LOADLIBES += gfcppcache.lib
+  endif
+
+  COMPILE.cpp=$(COMPILE.c)
+  OUT.c = -Fo$(call NATIVEDIR_FUNC,$@)
+
+  OBJEXT=obj
+  ifeq ($(MAKE_MODE),unix)
+    MAKE_GENERATEDDIR=if [ ! -d $(GENERATEDDIR) ]; then mkdir -p $(GENERATEDDIR) ; fi
+    MAKE_OBJDIR=if [ ! -d $(OBJDIR) ]; then mkdir -p $(OBJDIR) ; fi
+    MAKE_LIBDIR=if [ ! -d $(LIBDIR) ]; then mkdir -p $(LIBDIR) ; fi
+    #MAKE_DELAYFILE=if [ ! -f $(LIBDIR)/delaycoredump.txt ]; then touch $(LIBDIR)/delaycoredump.txt ; fi
+    MAKE_BINDIR=if [ ! -d $(BINDIR) ]; then mkdir -p $(BINDIR) ; fi
+  else
+    MAKE_GENERATEDDIR=if not exist $(GENERATEDDIR) mkdir -p $(GENERATEDDIR)
+    MAKE_OBJDIR=if not exist $(OBJDIR) mkdir $(OBJDIR)
+    MAKE_LIBDIR=if not exist $(LIBDIR) mkdir $(LIBDIR)
+    MAKE_BINDIR=if not exist $(BINDIR) mkdir $(BINDIR)
+  endif
+  OBJLIB=$(LIBDIR)/$(LIBRARY).dll
+  PROGBIN=$(LOCALBINDIR)/$(PROGRAM).exe
+  #end Win2K
+endif
+endif
+
+JAVAH_CLASSES=$(JNI_files)
+JAVAH=$(JAVA_HOME)/bin/javah
+JAVAH_ACTION=$(JAVAH) $(JAVAH_ARGS) $(JAVAH_CLASSES)
+JAVAH_ARGS = -classpath $(call NATIVEPATH_FUNC,$(ENHANCEDDIR):$(CLASSESDIR)) -d $(call NATIVEDIR_FUNC,$(GENERATEDDIR))
+
+ifdef JNI_files
+
+jniheaders:
+	@echo running javah
+	$(MAKE_GENERATEDDIR)
+	$(JAVAH_ACTION)
+
+JAVAH_H = $(foreach class,$(JAVAH_CLASSES),$(GENERATEDDIR)/$(subst .,_,$(class)).h)
+$(JAVAH_H): jniheaders
+
+endif # JNI_files
+
+
+ifdef LIBRARY
+
+library: makedirectories jniheaders $(OBJLIB)
+
+makedirectories:
+	@$(MAKE_LIBDIR)
+	@$(MAKE_OBJDIR)
+	@mkdir -p $(OBJDIR)/admin/impl
+	@mkdir -p $(OBJDIR)/impl
+	@mkdir -p $(OBJDIR)/statistics
+
+
+$(OBJLIB): $(FILES_o) $(LAST_o)
+	$(MAKE_DELAYFILE)
+
+ifeq ($(OSNAME),SunOS)
+
+# the SolarisMapFile.mak consists of
+#  the global section from SolarisMapFile_global.mak
+#  and the local section from SolarisMapFile_local.mak
+
+ifeq ($(LIBRARY),gfcppcache)
+	@echo linking cppcache library $@
+	$(CXX) -G $(LIB_LDFLAGS) -KPIC -o $@ $(LIBS) $(FILES_o) $(LAST_o) $(THIRDPARTY_STATICS)
+#	@echo linking static $(OBJLIBA)
+#	cd $(TMPARDIR) && $(base)/buildfiles/composit-ar.sh rcs $(OBJLIBA) $(THIRDPARTY_STATICS) $(FILES_o) $(LAST_o) 
+endif # LIBRARY
+
+else  # not Solaris
+ifeq ($(HOSTTYPE_OSTYPE),intel.Linux)
+ifeq ($(LIBRARY),gfcppcache)
+	@echo linking cppcache library $@
+	$(CXX) -shared -Wl,--version-script=$(base)/makefiles/ver_script $(LIB_LDFLAGS) -o $@ $(LIBS) $(FILES_o) $(LAST_o) $(THIRDPARTY_STATICS) 
+#	@echo linking static $(OBJLIBA)
+#	cd $(TMPARDIR) && $(base)/buildfiles/composit-ar.sh rcs $(OBJLIBA) $(THIRDPARTY_STATICS) $(FILES_o) $(LAST_o)
+endif
+
+else  # not Linux , so it must be Windows
+	@echo linking dll $@
+	link -out:$(call NATIVEDIR_FUNC,$@) $(LIB_LDFLAGS) $(LOADLIBES) $(foreach obj,$^,$(call NATIVEDIR_FUNC,$(obj))) /MAP
+	$(MT_COMMAND)	
+endif # Linux
+endif # Solaris
+
+$(OBJDIR)/%.$(OBJEXT): %.cpp
+	@echo compiling $(VARIANT) $<
+	$(COMPILE.cpp) $(OUT.c) $(call NATIVEDIR_FUNC,$<)
+
+$(OBJDIR)/statistics/%.$(OBJEXT): statistics/%.cpp
+	@echo compiling $(VARIANT) $<
+	$(COMPILE.cpp) $(OUT.c) $(call NATIVEDIR_FUNC,$<)
+
+$(OBJDIR)/admin/%.$(OBJEXT): admin/%.cpp
+	@echo compiling $(VARIANT) $<
+	$(COMPILE.cpp) $(OUT.c) $(call NATIVEDIR_FUNC,$<)
+
+$(OBJDIR)/admin/impl/%.$(OBJEXT): admin/impl/%.cpp
+	@echo compiling $(VARIANT) $<
+	$(COMPILE.cpp) $(OUT.c) $(call NATIVEDIR_FUNC,$<)
+
+$(OBJDIR)/impl/%.$(OBJEXT): impl/%.cpp
+	@echo compiling $(VARIANT) $<
+	$(COMPILE.cpp) $(OUT.c) $(call NATIVEDIR_FUNC,$<)
+
+$(OBJDIR)/statistics/%.$(OBJEXT): statistics/%.c
+	@echo compiling C3 $<
+	$(COMPILE.c) $(nonCPPOpts) $(OUT.c) $(call NATIVEDIR_FUNC,$<)
+
+$(OBJDIR)/admin/%.$(OBJEXT): admin/%.c
+	@echo compiling C3 $<
+	$(COMPILE.c) $(nonCPPOpts) $(OUT.c) $(call NATIVEDIR_FUNC,$<)
+
+$(OBJDIR)/admin/impl/%.$(OBJEXT): admin/impl/%.c
+	@echo compiling C3 $<
+	$(COMPILE.c) $(nonCPPOpts) $(OUT.c) $(call NATIVEDIR_FUNC,$<)
+
+$(OBJDIR)/impl/%.$(OBJEXT): impl/%.c
+	@echo compiling C3 $<
+	$(COMPILE.c) $(nonCPPOpts) $(OUT.c) $(call NATIVEDIR_FUNC,$<)
+
+ifeq ($(OSNAME),SunOS)
+# Solaris 
+  asArch = $(CFLAGS_MODEL)
+
+  # TODO - Remove after upgrading as on build machine
+  ifeq ($(UNAME_P),sparc)
+    ifeq ($(GFLIB_MODEL),64bit)
+      asArch = -xarch=v9
+    else
+      asArch = -xarch=v8plus
+    endif
+  endif 
+
+$(OBJDIR)/%.$(OBJEXT): %.asm
+	@echo assembling $<
+	@as $(asArch)  -K PIC -L -s -P -o $@ $(call NATIVEDIR_FUNC,$<)
+else
+# Linux
+
+# for now linux asm is 32 bit <<< fix for AMD Opteron
+asArch = -32
+
+$(OBJDIR)/%.$(OBJEXT): %.asm
+	@echo assembling $<
+	@as $(asArch) -o $@ $(call NATIVEDIR_FUNC,$<)
+endif
+
+endif # LIBRARY
+
+showme:
+	@echo $(COMPILE.cpp)
+
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/makefiles/executable.gmk
----------------------------------------------------------------------
diff --git a/geode-client-native/makefiles/executable.gmk b/geode-client-native/makefiles/executable.gmk
new file mode 100644
index 0000000..8f51bef
--- /dev/null
+++ b/geode-client-native/makefiles/executable.gmk
@@ -0,0 +1,74 @@
+#=========================================================================
+# Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+# This product is protected by U.S. and international copyright
+# and intellectual property laws. Pivotal products are covered by
+# more patents listed at http://www.pivotal.io/patents.
+#========================================================================
+
+ifeq ($(HOSTTYPE_OSTYPE),intel.Windows)
+    EXE = .exe
+    OBJ = .obj
+else
+    EXE =
+    OBJ = .o
+endif
+
+PRODDIR_lib = $(PRODDIR)/lib
+
+ifeq ($(HOSTTYPE_OSTYPE),sparc.Solaris)
+  CFLAGS = -mt $(CFLAGS_MODEL) $(CINCL)
+  # TODO jbarrett - CFLAGS += -xmemalign=4s
+  LDFLAGS = $(LDFLAGSfast) $(CFLAGS_MODEL)
+  LIBS += $(ACE_DIR)/lib/libACE.a
+else
+ifeq ($(HOSTTYPE_OSTYPE),x86.Solaris)
+  CFLAGS = -mt $(CFLAGS_MODEL) $(CINCL)
+  LDFLAGS = $(LDFLAGSfast) $(CFLAGS_MODEL)
+  LIBS += $(ACE_DIR)/lib/libACE.a
+else
+ifeq ($(HOSTTYPE_OSTYPE),intel.Linux)
+  CFLAGS = $(CFLAGS_MODEL) $(FPIC) $(CINCL)
+  LDFLAGS = $(LDFLAGSfast) $(CFLAGS_MODEL)
+  LIBS += $(ACE_DIR)/lib/libACE.a
+else
+  CINCL := $(foreach dir,$(subst -I,,$(CINCL)),-I$(call NATIVEDIR_FUNC,$(dir)))
+  CFLAGS = $(CFLAGS_COMMON) $(CINCL)
+  LDFLAGS = $(LFLAGSfast) /LIBPATH:$(call NATIVEDIR_FUNC,$(PRODDIR_lib))
+  ifeq ($(VCVER),vc8)
+    MT_COMMAND = mt /nologo -manifest $(call NATIVEDIR_FUNC,$@).manifest -outputresource:$(call NATIVEDIR_FUNC,$@)
+  endif
+endif
+endif
+endif
+
+# Use CXX (C++ compiler) for all of these compiles to require prototypes 
+# for all functions.
+# Without prototypes, 64 bit code will not be compiled correctly because
+# default function result type of "int" is not the same size as "void*"
+
+$(DESTDIR)/%${OBJ} : %.cpp
+	@echo compiling 1 $<
+	$(CXX) $(CFLAGS) $(VCINCLUDES) -c $(OUT.c) $<
+
+$(DESTDIR)/%${OBJ} : %.c
+	@echo compiling 2 $<
+	$(CXX) $(CFLAGS) $(VCINCLUDES) -c $(OUT.c) $<
+
+$(DESTDIR)/%${OBJ} : $(DESTDIR)/%.c
+	@echo compiling 3 $<
+	$(CXX) $(CFLAGS) $(VCINCLUDES) -c $(OUT.c) $(call NATIVEDIR_FUNC,$<)
+
+$(DESTDIR)/%${EXE} : $(DESTDIR)/%${OBJ}
+	@echo linking $@
+ifeq ($(HOSTTYPE_OSTYPE),intel.Windows)
+	link $(LDFLAGS) $(LIBPATH) -out:$(call NATIVEDIR_FUNC,$@) $(foreach obj,$^,$(call NATIVEDIR_FUNC,$(obj))) $(LDLIBS)
+	$(MT_COMMAND)
+else
+	$(CXX) $(LDFLAGS) -o $@ $^ $(LDLIBS)
+endif
+
+KEEPOBJS= $(DESTDIR)/%${OBJ}
+
+.PRECIOUS: $(KEEPOBJS)
+
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/makefiles/makemapfile.sh
----------------------------------------------------------------------
diff --git a/geode-client-native/makefiles/makemapfile.sh b/geode-client-native/makefiles/makemapfile.sh
new file mode 100755
index 0000000..2459374
--- /dev/null
+++ b/geode-client-native/makefiles/makemapfile.sh
@@ -0,0 +1,23 @@
+#! /bin/bash
+#=========================================================================
+# Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+# This product is protected by U.S. and international copyright
+# and intellectual property laws. Pivotal products are covered by
+# more patents listed at http://www.pivotal.io/patents.
+#========================================================================
+
+GENERATED_DIR=$1
+INTERNAL_SRC_DIR=$2
+
+rm -f $GENERATED_DIR/SolarisMapFile.*
+
+cat $INTERNAL_SRC_DIR/SolarisMapFile_global.mak > $GENERATED_DIR/SolarisMapFile.map
+
+grep -h JNIEXPORT $GENERATED_DIR/*.h > $GENERATED_DIR/SolarisMapFile.jni
+
+sed -e '1,$s+JNIEXPORT.*JNICALL++' < $GENERATED_DIR/SolarisMapFile.jni > $GENERATED_DIR/SolarisMapFile.jni2
+
+sed -e '1,$s+$+;+' < $GENERATED_DIR/SolarisMapFile.jni2 >> $GENERATED_DIR/SolarisMapFile.map
+
+cat $INTERNAL_SRC_DIR/SolarisMapFile_local.mak >> $GENERATED_DIR/SolarisMapFile.map
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/makefiles/merge/README.txt
----------------------------------------------------------------------
diff --git a/geode-client-native/makefiles/merge/README.txt b/geode-client-native/makefiles/merge/README.txt
new file mode 100644
index 0000000..25dfa8b
--- /dev/null
+++ b/geode-client-native/makefiles/merge/README.txt
@@ -0,0 +1,24 @@
+
+# instructions for merging Sun hotspot sources into our VM sources
+
+1. edit mergesetup.csh for the locations of the old and new baselines, etc
+
+2. run do_diff.sh
+
+3. examine the resulting $mergeScript file for
+  unwanted or missing directory additions/removals
+  and unwanted or missing cvs add/remove 
+  edit as required.  You may want to also run dircomp.sh
+
+  for removed files, make sure entries are removed from these hotspot files:
+      includeDB* , vm.dsp
+
+4. chmod +x the file $mergeScript
+
+5. run  do_merge.sh
+
+6. edit vm/hotspot20/build/solaris/makefiles/vm.make  and
+        vm/hotspot20Win/build/win32_i486/makefiles/vm.make
+
+   for the HOTSPOT_BUILD_VERSION to match the output from  
+     java -version   run with Sun's binary release .

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/makefiles/merge/dircomp.pl
----------------------------------------------------------------------
diff --git a/geode-client-native/makefiles/merge/dircomp.pl b/geode-client-native/makefiles/merge/dircomp.pl
new file mode 100755
index 0000000..edabab9
--- /dev/null
+++ b/geode-client-native/makefiles/merge/dircomp.pl
@@ -0,0 +1,171 @@
+#! /usr/bin/perl
+
+# HSBASE is the current baseline
+
+$HSBASE=$ENV{'baselines'}$ENV{'old'}
+
+#  js is the new baseline
+$js=$ENV{'baselines'}$ENV{'new'}
+
+# not yet ready to use, don't know wher find.pl used to be 
+require "find.pl";
+
+# ---------------------------------------------------------------
+# Get the directories from the base release
+%jsNames = ();
+chdir($js) || die "cannot chdir to $js: $!";
+eval 'sub wanted {&wanted_js_dirs;}';
+&find('.');
+
+# Get the directories from our tree.
+%myNames = ();
+chdir("$HSBASE") || die "cannot chdir to $HSBASE : $!";
+eval 'sub wanted {&wanted_js_dirs;}';
+&find('.');
+
+# remove duplicates from both lists
+foreach $each (keys(%myNames)) {
+  next if !defined($jsNames{$each});
+  delete $jsNames{$each};
+  delete $myNames{$each};
+  }
+
+# Now report
+@jsNames = keys(%jsNames);
+@jsNames = sort(@jsNames);
+print "-- Directories in $js but not in $HSBASE :\n";
+if ($#jsNames >= 0) {
+  foreach $each (@jsNames) {
+    print "$each\n";
+    }
+  }
+else {
+  print "  (NONE) \n";
+  }
+@myNames = keys(%myNames);
+@myNames = sort(@myNames);
+print "-- Directories in $HSBASE but not in $js :\n";
+if ($#myNames >= 0) {
+  foreach $each (@myNames) {
+    print "$each\n";
+    }
+  }
+else {
+  print "  (NONE) \n";
+  }
+
+# ---------------------------------------------------------------
+# Now, for the common directories, scrutinize the files
+
+# Get the files from the base release
+%jsNames = ();
+chdir($js) || die "cannot chdir to $js: $!";
+eval 'sub wanted {&wanted_js_files;}';
+&find('.');
+
+# Get the files from our tree.
+%myNames = ();
+chdir("$HSBASE") || die "cannot chdir to $HSBASE $!";
+eval 'sub wanted {&wanted_js_files;}';
+&find('.');
+
+@jsNames = keys(%jsNames);
+@jsNames = sort(@jsNames);
+
+@myNames = keys(%myNames);
+@myNames = sort(@myNames);
+
+# remove duplicates from both lists
+foreach $each (keys(%myNames)) {
+  next if !defined($jsNames{$each});
+  delete $jsNames{$each};
+  delete $myNames{$each};
+  }
+
+# Now report
+print "-- Files in JavaSoft but not in $HSBASE \n";
+if ($#jsNames >= 0) {
+  foreach $each (@jsNames) {
+    print "$each\n";
+    }
+  }
+else {
+  print "  (NONE) \n" ;
+  }
+print "-- Files in $HSBASE but not in JavaSoft:\n";
+if ($#myNames >= 0) {
+  foreach $each (@myNames) {
+    print "$each\n";
+    }
+  }
+else {
+  print "  (NONE) \n" ;
+  }
+
+
+
+# ---------------------------------------------------------------
+
+exit 0;
+
+sub wanted_js_dirs {
+  return if !(($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_));
+  return if ! -d _;
+  $jsNames{$name} = 1;
+  }
+ 
+sub wanted_archbase_dirs {
+  return if !(($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_));
+  return if ! -d _;
+
+  # only CVS directories
+  return if ! -d "$_/CVS";
+
+  # Recognize GemStone specific directories (
+  return if $name =~ m#^\./build/adlc\b#;
+  return if $name =~ m#^\./build/bin\b#;
+  return if $name =~ m#^\./build/debug\b#;
+  return if $name =~ m#^\./build/incls\b#;
+  return if $name =~ m#^\./build/release\b#;
+
+  $myNames{$name} = 1;
+  }
+
+sub wanted_js_files {
+  return if !(($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_));
+  return if ! -f _;
+
+  $jsNames{$name} = 1;
+  }
+
+sub wanted_archbase_files {
+  return if !(($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_));
+  return if ! -f _;
+
+  return if $name =~ m#^.*/CVS/.*#;
+  return if $name =~ m#^.*/CClassHeaders/.*#;
+
+  return if $name =~ m%/\.#.*%;
+  return if $name =~ m%/\.class\.headers\.sparc%;
+  return if $name =~ m#/\.cvsignore\b#;
+  return if $name =~ m#/\.bin\.dirs\b#;
+  return if $name =~ m#/\.classes\.list\b#;
+  return if $name =~ m#/\.lib\.dirs\b#;
+
+  return if $name =~ m#^\./build/ADLCompiler.*#;
+  return if $name =~ m#^\./build/Dependencies*#;
+  return if $name =~ m#^\./build/i486.ad*#;
+  return if $name =~ m#^\./build/includeDB*#;
+  return if $name =~ m#^\./build/includeDB.*#;
+  return if $name =~ m#^\./build/grep*#;
+  return if $name =~ m#^\./build/Makefile*#;
+  return if $name =~ m#^\./build/vm.*#;
+  return if $name =~ m#^\./build/*.txt#;
+
+  return if $name =~ m#^\./src/grep*#;
+  return if $name =~ m#^\./src/*.txt#;
+  return if $name =~ m#^\./src/share/vm/prims/gri*#;
+
+  $myNames{$name} = 1;
+  }
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/makefiles/merge/dircomp.sh
----------------------------------------------------------------------
diff --git a/geode-client-native/makefiles/merge/dircomp.sh b/geode-client-native/makefiles/merge/dircomp.sh
new file mode 100644
index 0000000..e3a6b2f
--- /dev/null
+++ b/geode-client-native/makefiles/merge/dircomp.sh
@@ -0,0 +1,5 @@
+#! /bin/csh
+
+source mergesetup.csh
+
+perl dircomp.pl > dircomp.log

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/makefiles/merge/do_diff.sh
----------------------------------------------------------------------
diff --git a/geode-client-native/makefiles/merge/do_diff.sh b/geode-client-native/makefiles/merge/do_diff.sh
new file mode 100755
index 0000000..99b5e29
--- /dev/null
+++ b/geode-client-native/makefiles/merge/do_diff.sh
@@ -0,0 +1,20 @@
+#! /bin/csh
+
+source mergesetup.csh
+
+pushd $baselines
+gdiff -wBrc $old $new > $gdiffLog
+if ( $status > 1) then
+  echo "gdiff failed";
+  exit 1
+endif
+echo "gdiff ok"
+popd
+
+perl scanHs.pl > $mergeScript
+if ( $status != 0) then
+ echo "perl scanHs.pl failed"
+ exit 1
+endif
+echo "perl scanHs.pl ok"
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/makefiles/merge/do_merge.sh
----------------------------------------------------------------------
diff --git a/geode-client-native/makefiles/merge/do_merge.sh b/geode-client-native/makefiles/merge/do_merge.sh
new file mode 100755
index 0000000..7be416c
--- /dev/null
+++ b/geode-client-native/makefiles/merge/do_merge.sh
@@ -0,0 +1,11 @@
+#! /bin/csh
+
+source mergesetup.csh
+
+$mergeScript >& $mergeScript.log
+chmod -x $mergeScript
+
+egrep -e ': conflicts$' $mergeScript.log > $mergeScript.conflicts
+
+cat $mergeScript.conflicts
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/makefiles/merge/mergeOneFile.sh
----------------------------------------------------------------------
diff --git a/geode-client-native/makefiles/merge/mergeOneFile.sh b/geode-client-native/makefiles/merge/mergeOneFile.sh
new file mode 100755
index 0000000..28e0545
--- /dev/null
+++ b/geode-client-native/makefiles/merge/mergeOneFile.sh
@@ -0,0 +1,20 @@
+#! /bin/sh
+
+old=$1
+new=$2
+target=$3
+f=$4
+
+merge $target/$f $old/$f $new/$f
+status=$?
+
+if [ $status -eq 0 ]; then
+  echo "$f: success"
+fi
+if [ $status -eq 1 ]; then
+  echo "$f: conflicts"
+fi
+if [ $status -eq 2 ]; then
+  echo "$f: trouble"
+fi
+exit $status

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/makefiles/merge/mergesetup.csh
----------------------------------------------------------------------
diff --git a/geode-client-native/makefiles/merge/mergesetup.csh b/geode-client-native/makefiles/merge/mergesetup.csh
new file mode 100644
index 0000000..01c4016
--- /dev/null
+++ b/geode-client-native/makefiles/merge/mergesetup.csh
@@ -0,0 +1,21 @@
+
+# parent of two baselines from JavaSoft
+setenv baselines /avocet2/users/otisa/results/gemfireSrc
+
+# current baseline
+setenv old gemfireLinuxBase
+
+# new baseline 
+setenv new gemfire10maint_21nov
+
+# directory for tools (such as this file) 
+setenv tools $cwd
+
+#  target of the merge ; we will merge changes between old and new into target
+setenv target $cwd/../../
+
+# name of log file produced by gdiff
+setenv gdiffLog $cwd/gdiff_nov21.log
+
+# name of script file produced by scanHs.pl
+setenv mergeScript $cwd/merge_nov21.sh

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/makefiles/merge/scanHs.pl
----------------------------------------------------------------------
diff --git a/geode-client-native/makefiles/merge/scanHs.pl b/geode-client-native/makefiles/merge/scanHs.pl
new file mode 100755
index 0000000..c53c275
--- /dev/null
+++ b/geode-client-native/makefiles/merge/scanHs.pl
@@ -0,0 +1,173 @@
+#! /usr/bin/perl
+#
+#   for removed files, make sure entries are removed from these files:
+#       includeDB* , vm.dsp
+#   then remove all src/* files from the PC and re-copy everything from unix,
+#   on the pc remove all .obj files and incls to ensure full rebuild.
+#
+
+$tools=$ENV{'tools'}; 
+$baselines = $ENV{'baselines'};
+$old = $ENV{'old'};		# existing JavaSoft baseline
+$new = $ENV{'new'};		# new JavaSoft baseline
+$gdiffLog = $ENV{'gdiffLog'};
+
+$target = $ENV{'target'};
+
+open(F, "< $gdiffLog ") || die "cannot open diff log";
+
+# ------------- end of stuff to edit for setup of the merge
+
+select(STDOUT); $| = 1;
+
+#print "#! /usr/bin/bash -xv\n";
+print "#! /usr/bin/bash\n";
+print "old=$baselines/$old\n";
+print "new=$baselines/$new\n";
+print "target=$target\n";
+
+($oldPat = $old) =~ s/\./\\./g;
+($newPat = $new) =~ s/\./\\./g;
+
+%removed_dirs = ();
+
+for (;;) {
+  $line = <F>;
+  last if !defined($line);
+  chop($line);
+
+  if ($line =~ m@^diff -wBrc $oldPat/(\S+).*@) {
+    # exists in both; do a merge
+    $line = $1;
+    if (-l "$old/$line") {
+      print "# link: $line\n";
+      }
+    else {
+      print "echo \"merging $line\"\n";
+      print "$tools/mergeOneFile.sh $baselines/$old $baselines/$new $target $line\n";
+      }
+    next;
+    }
+
+  if ($line =~ m@Binary files $oldPat/(\S+) and .* differ@) {
+    # updated binary distribution
+    $line = $1;
+    if (-l "$old/$line") {
+      print "# link: $line\n";
+      }
+    else {
+      print "echo \"copying $line\"\n";
+      print "cp $baselines/$new/$line $target/$line\n";
+      }
+    next;
+    }
+
+  # created anew; copy over (recursively)
+  if ($line =~ m@^Only in $newPat/(\S*):\s*(.*)@) {
+    $dir = $1;
+    $f = $2;
+    if (-d "$baselines/$new/$dir/$f") {
+      print "echo \"creating directory $dir/$f\"\n";
+      &populate_new_dir("$baselines/$new/$dir", "$target/$dir", $f);
+      }
+    else {
+      print "echo \"creating file $dir/$f\"\n";
+      &create_new_file("$baselines/$new/$dir", "$target/$dir", $f);
+      }
+    next;
+    }
+  # only in old, delete
+  if ($line =~ m@^Only in $oldPat/(\S*):\s*(\S+).*@) {
+    $dir = $1;
+    $f = $2;
+
+    # This message can occur multiple times, we only want the first occurence.
+    next if $removed_dirs{"$dir/$f"};
+    $removed_dirs{"$dir/$f"} = 1;
+
+    print "echo \"SKIP removing $dir/$f\"\n";
+#     if (-d "$old/$dir/$f") {
+#       print "echo \"removing directory $dir/$f\"\n";
+#       print "pushd \$target/$dir\n";
+#       print "cvs remove -f $f\n";;
+#       print "popd\n";
+# 
+#       # directories don't remove very well under CVS.  This file
+#       # is some extra help.  More work needed here....
+#       open(F2, ">>$target/../fix.sh")
+# 	|| die "unable to open $target/../fix.sh: $!";
+#       print F2 "rm -rf jdk/$dir/$f\n";
+#       close F2;
+# 
+#       # these changes must be quickly, but only when we commit the merge.
+#       open(F2, ">>remove.sh") || die "unable to open remove.sh: $!";
+#       print F2 "pushd jdk/$dir; pushd `l2repos`\n";
+#       print F2 "mkdir Attic; chmod 777 Attic\n";
+#       $junk = $f;
+#       $junk =~ s#^([^/]*)/.*#$1#;
+#       print F2 "mv $junk Attic\n";
+#       print F2 "popd; popd\n";
+#       close F2;
+#       }
+#     else {
+#       print "echo \"removing file $dir/$f\"\n";
+#       print "pushd \$target/$dir\n";
+#       print "rm $f\n";
+#       print "cvs remove $f\n";
+#       print "popd\n";
+#       }
+    next;
+    }
+  }
+close F;
+
+sub populate_new_dir {
+  local($oldDir, $newDir, $newName) = @_;
+  local(@dirs, @files);
+
+  # create the new directory
+  print "pushd $newDir\n";
+  print "mkdir $newName\n";
+  print "cvs add $newName\n";
+  print "popd\n";
+
+  # create list of files and directories
+  opendir(THISDIR, "$oldDir/$newName")
+	|| die "opendir $oldDir/$newName failure: $!";
+  for (;;) {
+    $thisFile = readdir THISDIR;
+    last if !defined($thisFile);
+    next if $thisFile eq "." || $thisFile eq "..";
+    next if -l "$oldDir/$newName/$thisFile";	# ignore links
+    if (-d "$oldDir/$newName/$thisFile") {
+      push(@dirs, $thisFile);
+      }
+    else {
+      push(@files, $thisFile);
+      }
+    }
+  closedir(THISDIR);
+
+  foreach (sort(@files)) {
+    &create_new_file("$oldDir/$newName", "$newDir/$newName", $_);
+    }
+  foreach (sort(@dirs)) {
+    &populate_new_dir("$oldDir/$newName", "$newDir/$newName", $_);
+    }
+  }
+
+sub create_new_file {
+  local ($fromDir, $toDir, $newName) = @_;
+
+  ($dev,$ino,$mode,@junk) = stat("$fromDir/$newName");
+  print "cp $fromDir/$newName $toDir/$newName\n";
+  print "pushd $toDir\n";
+  print "chmod u+w $newName\n";
+  if (-B "$fromDir/$newName") {
+    print "cvs add -kb $newName\n";
+    }
+  else {
+    print "cvs add $newName\n";
+    }
+  print "popd\n";
+  }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac967000/geode-client-native/makefiles/platform.gmk
----------------------------------------------------------------------
diff --git a/geode-client-native/makefiles/platform.gmk b/geode-client-native/makefiles/platform.gmk
new file mode 100755
index 0000000..0097153
--- /dev/null
+++ b/geode-client-native/makefiles/platform.gmk
@@ -0,0 +1,98 @@
+# Determine platform
+ifdef WINDIR
+  HOSTTYPE_OSTYPE=intel.Windows
+  WINDOWS = true
+else
+  UNAME := $(shell uname)
+  ifeq ($(UNAME),Linux)
+    HOSTTYPE_OSTYPE=intel.Linux
+    LINUX = true
+  else
+    ifeq ($(UNAME),SunOS)
+	    UNAME_P := $(shell uname -p)
+	    ifeq ($(UNAME_P),sparc)
+        HOSTTYPE_OSTYPE=sparc.Solaris
+        SOLARIS = true
+	    else
+	      HOSTTYPE_OSTYPE=x86.Solaris
+		    SOLARIS = true
+	    endif
+    endif
+  endif
+endif
+
+# common
+
+NATIVEDIR_FUNC = $(1)
+UNIXDIR_FUNC = $(1)
+NATIVEPATH_FUNC = $(1)
+CURRENTDIR := $(shell pwd)
+
+# branch on platform
+
+ifdef WINDOWS
+
+###################
+# WINDOWS
+ifeq ($(VCVER),vc8)
+    CFLAGSvc8 = /wd4996 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NON_CONFORMING_SWPRINTFS
+    MT_COMMAND = mt /nologo -manifest $(call NATIVEDIR_FUNC,$@).manifest -outputresource:$(call NATIVEDIR_FUNC,$@) 
+endif
+NATIVEDIR_FUNC = '$(strip $(shell cygpath -w "$(1)"))'
+UNIXDIR_FUNC = $(shell cygpath -u '$(1)')
+NATIVEPATH_FUNC = '$(strip $(shell cygpath -p -w "$(1)"))'
+
+CURRENTDIR := $(call NATIVEDIR_FUNC,$(CURRENTDIR))
+OBJ = .obj
+libPrefix =
+libSuffix = .dll
+
+# END WINDOWS
+###################
+
+else
+  ifdef LINUX
+
+###################
+# LINUX
+
+OBJ = .o
+libPrefix = lib
+libSuffix = .so
+
+ifeq ($(GFLIB_MODEL),64bit)
+    CFLAGS_MODEL = -m64
+    FPIC = -fPIC
+else
+    CFLAGS_MODEL = -m32
+    FPIC =
+endif
+
+# END LINUX
+###################
+
+  else
+    ifdef SOLARIS
+
+###################
+# SOLARIS
+
+OBJ = .o
+libPrefix = lib
+libSuffix = .so
+
+ifeq ($(GFLIB_MODEL),64bit)
+    CFLAGS_MODEL = -m64
+else
+    CFLAGS_MODEL = -m32
+endif
+
+# END SOLARIS
+###################
+
+    endif
+  endif
+endif
+
+# end of platform branches
+