[omniORB] omniORB Environment
BadKnees
a.olsen at flatrate.fo
Mon Oct 1 15:39:56 BST 2007
> Perhaps some kind soul would post a simple makefile they're using...
Just in case someone else is wondering about how to get a quick start:
Copy the bd_client.cc bd_server and the echo_callback.idl to your workspace.
Lay it out like this:
./IDL/echo_callback.idl
./bd_server.cc
./bd_client.cc
And here's a simple Makefile:
PWD = $(shell pwd)
IDL = $(PWD)/IDL
STUB = $(PWD)/.stub
OBJ = $(PWD)/.obj
OMNIROOT = /usr/local/omniorb
IDLC = $(OMNIROOT)/bin/omniidl -bcxx
C++ = g++
CARGS = -c -O2 -Wall -Wno-unused -fexceptions -D__OMNIORB4__ -D_REENTRANT -D__OSVERSION__=2 -D__linux__ -D__x86__
LARGS = -O2 -Wall -Wno-unused -fexceptions
INC = -I$(OMNIROOT)/include/ -I. -I$(STUB)
LIB = -L$(OMNIROOT)/lib -L.
LDF = -lomniORB4 -lomniDynamic4 -lomnithread -lpthread
RM = rm -rf
all: bd_client bd_server
$(OBJ):
mkdir $(OBJ)
$(STUB):
mkdir $(STUB)
$(STUB)/echo_callbackSK.cc $(STUB)/echo_callback.hh: $(STUB) $(IDL)/echo_callback.idl
cd $(STUB) && $(IDLC) $(IDL)/echo_callback.idl
$(OBJ)/echo_callbackSK.o: $(OBJ) $(STUB)/echo_callbackSK.cc $(STUB)/echo_callback.hh
cd $(OBJ) && $(C++) $(CARGS) $(INC) -o $(OBJ)/echo_callbackSK.o $(STUB)/echo_callbackSK.cc
$(OBJ)/bd_server.o: $(OBJ) $(STUB)/echo_callback.hh bd_server.cc
$(C++) $(CARGS) $(INC) -o $(OBJ)/bd_server.o bd_server.cc
$(OBJ)/bd_client.o: $(OBJ) $(STUB)/echo_callback.hh bd_client.cc
$(C++) $(CARGS) $(INC) -o $(OBJ)/bd_client.o bd_client.cc
bd_server: $(OBJ)/echo_callbackSK.o $(OBJ)/bd_server.o
$(C++) $(LARGS) $(LIB) $(LDF) -o bd_server $(OBJ)/bd_server.o $(OBJ)/echo_callbackSK.o
bd_client: $(OBJ)/echo_callbackSK.o $(OBJ)/bd_client.o
$(C++) $(LARGS) $(LIB) $(LDF) -o bd_client $(OBJ)/bd_client.o $(OBJ)/echo_callbackSK.o
clean:
$(RM) $(OBJ) $(STUB) bd_server bd_client
More information about the omniORB-list
mailing list