[sword-svn] r1944 - in trunk/bindings/corba: java/src/org/crosswire/sword/orb orbitcpp
scribe at crosswire.org
scribe at crosswire.org
Mon Jul 10 10:32:02 MST 2006
Author: scribe
Date: 2006-07-10 10:32:00 -0700 (Mon, 10 Jul 2006)
New Revision: 1944
Modified:
trunk/bindings/corba/java/src/org/crosswire/sword/orb/SwordOrb.java
trunk/bindings/corba/orbitcpp/Makefile
Log:
Updated to make things easier to relocate
Modified: trunk/bindings/corba/java/src/org/crosswire/sword/orb/SwordOrb.java
===================================================================
--- trunk/bindings/corba/java/src/org/crosswire/sword/orb/SwordOrb.java 2006-07-07 18:02:01 UTC (rev 1943)
+++ trunk/bindings/corba/java/src/org/crosswire/sword/orb/SwordOrb.java 2006-07-10 17:32:00 UTC (rev 1944)
@@ -13,6 +13,7 @@
import java.util.Date;
public class SwordOrb extends Object implements HttpSessionBindingListener {
+ public static final String ORBEXE = "swordorbserver";
public static final int MAX_REMOTE_ADDR_CONNECTIONS = 20;
public static final int MAX_ACCESS_COUNT_PER_INTERVAL = 10;
public static final long MAX_ACCESS_COUNT_INTERVAL = 10 * 1000; // milliseconds
@@ -85,7 +86,7 @@
private void startOrb() {
try {
// start external process
- java.lang.Process p = Runtime.getRuntime().exec("swordorbserver");
+ java.lang.Process p = Runtime.getRuntime().exec(ORBEXE);
InputStream is = p.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
BufferedReader input = new BufferedReader(isr);
Modified: trunk/bindings/corba/orbitcpp/Makefile
===================================================================
--- trunk/bindings/corba/orbitcpp/Makefile 2006-07-07 18:02:01 UTC (rev 1943)
+++ trunk/bindings/corba/orbitcpp/Makefile 2006-07-10 17:32:00 UTC (rev 1944)
@@ -1,55 +1,66 @@
all: server testclient
-#comment these out if you didn't compile sword with lucene support
-#LIBS += -lclucene
+PREFIX = $(shell grep ^prefix ../../../Makefile|cut -f3 -d' ')
-#comment these out if you didn't compile sword with ICU support
-#LIBS += -licui18n -licuuc -licudata -lpthread -licuio
+#sword stuff
+CXXFLAGS += $(shell PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig pkg-config --cflags sword)
+CFLAGS += $(shell PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig pkg-config --cflags sword)
+LIBS += $(shell PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig pkg-config --libs sword)
-LIBS = `pkg-config --libs sword`
-CXXFLAGS += `pkg-config --cflags sword`
-CFLAGS += `pkg-config --cflags sword`
+#orbit stuff
+CFLAGS += $(shell orbit2-config --cflags)
+CXXFLAGS += $(shell orbit2-config --cflags)
+LIBS += $(shell orbit2-config --libs)
+#orbitcpp stuff-- this is silly. Is there really NOT a way to derive this?
+CFLAGS += -I/usr/local/include/orbitcpp-2.0
+CXXFLAGS += -I/usr/local/include/orbitcpp-2.0
+LIBS += -L/usr/local/lib -lORBit-2-cpp
+
#comment out for release
CXXFLAGS += -g -O0
CFLAGS += -g -O0
LDFLAGS += -g -O0
-#----------------------------------
+#-----------------------------------------------------------------------------
+
server: swordorb-common.o server.cpp swordorb-impl.o swordorb-cpp.o swordorb-cpp-common.o swordorb-stubs.o swordorb-cpp-stubs.o swordorb-cpp-skels.o swordorb-skels.o swordorb-cpp.o
- $(CXX) $(CXXFLAGS) -I. -I/usr/include/orbitcpp-2.0/ -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -o server server.cpp swordorb-impl.o swordorb-common.o swordorb-cpp-common.o swordorb-stubs.o swordorb-cpp-stubs.o swordorb-cpp-skels.o swordorb-skels.o `orbit2-config --libs` -lORBit-2-cpp ${LIBS}
+ $(CXX) $(CXXFLAGS) -I. -o server server.cpp swordorb-impl.o swordorb-common.o swordorb-cpp-common.o swordorb-stubs.o swordorb-cpp-stubs.o swordorb-cpp-skels.o swordorb-skels.o $(LIBS)
testclient: testclient.cpp swordorb-impl.cpp swordorb-common.o swordorb-cpp-common.o swordorb-stubs.o swordorb-cpp-stubs.o swordorb-skels.o swordorb-cpp-skels.o
- $(CXX) $(CXXFLAGS) -I. -I/usr/include/orbitcpp-2.0/ -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -o testclient testclient.cpp swordorb-common.o swordorb-cpp-common.o swordorb-stubs.o swordorb-cpp-stubs.o swordorb-skels.o swordorb-cpp-skels.o `orbit2-config --libs` -lORBit-2-cpp
+ $(CXX) $(CXXFLAGS) -I. -o testclient testclient.cpp swordorb-common.o swordorb-cpp-common.o swordorb-stubs.o swordorb-cpp-stubs.o swordorb-skels.o swordorb-cpp-skels.o $(LIBS)
swordorb-cpp.o: swordorb-cpp.cc
- $(CXX) $(CXXFLAGS) -I. -I/usr/include/orbitcpp-2.0/ -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -c swordorb-cpp.cc
+ $(CXX) $(CXXFLAGS) -I. -c swordorb-cpp.cc
swordorb-impl.o: swordorb-impl.cpp
- $(CXX) $(CXXFLAGS) -I. -I/usr/include/orbitcpp-2.0/ -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -c swordorb-impl.cpp
+ $(CXX) $(CXXFLAGS) -I. -c swordorb-impl.cpp
swordorb-common.o: swordorb-common.c
- $(CC) $(CFLAGS) -I. -I/usr/include/orbitcpp-2.0/ -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -c swordorb-common.c
+ $(CC) $(CFLAGS) -I. -c swordorb-common.c
swordorb-common.c: ./../swordorb.idl
orbit-idl-2 -l c ./../swordorb.idl
orbit-idl-2 -l cpp ./../swordorb.idl
swordorb-cpp-common.o: swordorb-cpp-common.cc
- $(CXX) $(CXXFLAGS) -I. -I/usr/include/orbitcpp-2.0/ -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -c swordorb-cpp-common.cc
+ $(CXX) $(CXXFLAGS) -I. -c swordorb-cpp-common.cc
swordorb-stubs.o: swordorb-stubs.c
- $(CC) $(CFLAGS) -I. -I/usr/include/orbitcpp-2.0/ -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -c swordorb-stubs.c
+ $(CC) $(CFLAGS) -I. -c swordorb-stubs.c
swordorb-cpp-stubs.o: swordorb-cpp-stubs.cc
- $(CXX) $(CXXFLAGS) -I. -I/usr/include/orbitcpp-2.0/ -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -c swordorb-cpp-stubs.cc
+ $(CXX) $(CXXFLAGS) -I. -c swordorb-cpp-stubs.cc
swordorb-skels.o: swordorb-skels.c
- $(CC) $(CFLAGS) -I. -I/usr/include/orbitcpp-2.0/ -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -c swordorb-skels.c
+ $(CC) $(CFLAGS) -I. -c swordorb-skels.c
swordorb-cpp-skels.o: swordorb-cpp-skels.cc
- $(CXX) $(CXXFLAGS) -I. -I/usr/include/orbitcpp-2.0/ -I/usr/local/include/orbitcpp-2.0/ `orbit2-config --cflags` -c swordorb-cpp-skels.cc
+ $(CXX) $(CXXFLAGS) -I. -c swordorb-cpp-skels.cc
clean:
rm -f *.h *.cc *.o *.c server testclient
+install:
+ mkdir -p $(PREFIX)/bin
+ cp -f server $(PREFIX)/bin/swordorbserver
More information about the sword-cvs
mailing list