summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Traut <manut@mecka.net>2014-02-18 23:24:52 +0100
committerManuel Traut <manut@mecka.net>2014-02-18 23:24:52 +0100
commit21e79c833fcbd2d7c43380a2f74b5c0173c6c1a0 (patch)
treecb891fd384c7ccaf73c1cc957dfbd2e57130d2dc
parent751dc5e4abec89bddf8260d6756d9db8eb72a0c3 (diff)
corba example: switch to autotools
ace/tao is now packaged in debian/experimental. it's definitely easier to use the packaged stuff instead of building ace/tao by your own. the mwc packaging of debian is currently a pain. it is shipped without config files for tao.., but the tao debian packages provide pkg-config support so this patch converts the project into a autotools project :) Signed-off-by: Manuel Traut <manut@mecka.net>
-rw-r--r--frameworks/middleware/examples/corba/AUTHORS0
-rw-r--r--frameworks/middleware/examples/corba/ChangeLog0
-rw-r--r--frameworks/middleware/examples/corba/Makefile.am29
-rw-r--r--frameworks/middleware/examples/corba/NEWS0
-rw-r--r--frameworks/middleware/examples/corba/README12
-rwxr-xr-xframeworks/middleware/examples/corba/autogen.sh3
-rw-r--r--frameworks/middleware/examples/corba/configure.ac28
-rw-r--r--frameworks/middleware/examples/corba/ping_I.cpp1
8 files changed, 72 insertions, 1 deletions
diff --git a/frameworks/middleware/examples/corba/AUTHORS b/frameworks/middleware/examples/corba/AUTHORS
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/frameworks/middleware/examples/corba/AUTHORS
diff --git a/frameworks/middleware/examples/corba/ChangeLog b/frameworks/middleware/examples/corba/ChangeLog
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/frameworks/middleware/examples/corba/ChangeLog
diff --git a/frameworks/middleware/examples/corba/Makefile.am b/frameworks/middleware/examples/corba/Makefile.am
new file mode 100644
index 0000000..72a6a67
--- /dev/null
+++ b/frameworks/middleware/examples/corba/Makefile.am
@@ -0,0 +1,29 @@
+IDL_COMPILER=tao_idl
+IDL_COMPILER_OPT=-GI
+
+IDL_GEN_H_SRV = pingI.h pingS.h
+IDL_GEN_S_SRV = pingS.cpp
+IDL_GEN_H_CLT = pingC.h pingC.inl
+IDL_GEN_S_CLT = pingC.cpp
+
+pingI.h: ping.idl
+ $(IDL_COMPILER) $(IDL_COMPILER_OPT) ping.idl
+
+noinst_HEADERS = $(IDL_GEN_H_SRV) $(IDL_GEN_H_CLT)
+
+CLEANFILES = $(IDL_GEN_H_SRV) $(IDL_GEN_S_SRV) \
+ $(IDL_GEN_H_CLT) $(IDL_GEN_S_CLT) pingI.cpp
+
+CORBA_CFLAGS = $(TAO_CFLAGS) $(TAO_CosNaming_CFLAGS) \
+ $(TAO_PortableServer_CFLAGS) $(TAO_RTCORBA_CFLAGS)
+CORBA_LIBS = $(TAO_LIBS) $(TAO_CosNaming_LIBS) $(TAO_PortableServer_LIBS) \
+ $(TAO_RTCORBA_LIBS)
+
+bin_PROGRAMS = receiver supplier
+receiver_SOURCES = ping_I.cpp $(IDL_GEN_S_SRV) $(IDL_GEN_S_CLT) Receiver.cpp
+receiver_CFLAGS = $(CORBA_CFLAGS)
+receiver_LDADD = $(CORBA_LIBS)
+
+supplier_SOURCES = Supplier.cpp $(IDL_GEN_S_CLT)
+supplier_CFLAGS = $(CORBA_CFLAGS)
+supplier_LDADD = $(CORBA_LIBS)
diff --git a/frameworks/middleware/examples/corba/NEWS b/frameworks/middleware/examples/corba/NEWS
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/frameworks/middleware/examples/corba/NEWS
diff --git a/frameworks/middleware/examples/corba/README b/frameworks/middleware/examples/corba/README
new file mode 100644
index 0000000..74ca9bb
--- /dev/null
+++ b/frameworks/middleware/examples/corba/README
@@ -0,0 +1,12 @@
+apt-get install -t experimental libtao-dev mpc-ace libtao-orbsvcs-dev \
+tao-cosnaming tao-idl tao-utils
+
+./autogen.sh
+./configure
+make
+
+Naming_Service -ORBEndpoint iiop://localhost:55555
+
+
+./receiver -ORBInitRef NameService=corbaloc:iiop:localhost:55555/NameService
+./supplier -ORBInitRef NameService=corbaloc:iiop:localhost:55555/NameService
diff --git a/frameworks/middleware/examples/corba/autogen.sh b/frameworks/middleware/examples/corba/autogen.sh
new file mode 100755
index 0000000..58c0175
--- /dev/null
+++ b/frameworks/middleware/examples/corba/autogen.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+automake --add-missing
+autoreconf -sif
diff --git a/frameworks/middleware/examples/corba/configure.ac b/frameworks/middleware/examples/corba/configure.ac
new file mode 100644
index 0000000..6127c33
--- /dev/null
+++ b/frameworks/middleware/examples/corba/configure.ac
@@ -0,0 +1,28 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.69])
+AC_INIT([corba-example], [1.0], [manut@linutronix.de])
+AC_CONFIG_SRCDIR([Receiver.cpp])
+AM_INIT_AUTOMAKE([dist-bzip2])
+AC_CONFIG_HEADERS([config.h])
+
+# Checks for programs.
+AC_PROG_CXX
+
+# Checks for libraries.
+PKG_CHECK_MODULES([TAO], [TAO])
+PKG_CHECK_MODULES([TAO_CosNaming], [TAO_CosNaming])
+PKG_CHECK_MODULES([TAO_PortableServer], [TAO_PortableServer])
+PKG_CHECK_MODULES([TAO_RTCORBA], [TAO_RTCORBA])
+
+# Checks for header files.
+
+# Checks for typedefs, structures, and compiler characteristics.
+
+# Checks for library functions.
+AC_CHECK_FUNCS([clock_gettime])
+
+AC_CONFIG_FILES([Makefile])
+
+AC_OUTPUT
diff --git a/frameworks/middleware/examples/corba/ping_I.cpp b/frameworks/middleware/examples/corba/ping_I.cpp
index 309d1e8..e02924f 100644
--- a/frameworks/middleware/examples/corba/ping_I.cpp
+++ b/frameworks/middleware/examples/corba/ping_I.cpp
@@ -21,4 +21,3 @@ void Linutronix_Ping_i::send (
clock_gettime(CLOCK_MONOTONIC, &time_rx);
std::cout<<time_rx.tv_sec<<":"<<time_rx.tv_nsec/1000<<": "<<payload<<"\n";
}
-