Crosscompiling ORBit2



Hello collisters:

I'm quite new in the ORBit world, so sorry if this is not the correct
way of asking things.

I wanted to compile an ORBit program (server, client, skelimp...)
using RTAI flags (Real Time Aplication Interface) and includes, since
I'm using this last to communicate ORBit with a real time process. I
thought it would be a matter of makefile edition but when I edited it
I realized how new I'm in this world. Indeed I don't know where ORBit2
compiles at all.

Is there any chance of somebody to light my path? (I include the
makefile's code)

By the way, is there any difference between using g_thread_create and
pthread_create?

Also, can I create a thread inside the skeleton implementation code?

Thanks a lot,

Guillermo



Makefile (modified code).
------------------------------------

prefix1 := $(shell rtai-config --prefix)
prefix2 := /usr

ifeq ($(prefix1),)
$(error Please add <rtai-install>/bin to your PATH variable)
endif

CC = $(shell rtai-config --cc)

LXRT_CFLAGS = $(shell rtai-config --lxrt-cflags)
LXRT_LDFLAGS = $(shell rtai-config --lxrt-ldflags)

ORBIT_IDL=$(prefix2)/bin/orbit-idl-2
CFLAGS=$(shell pkg-config ORBit-2.0 ORBit-CosNaming-2.0 --cflags)
LDFLAGS=$(shell pkg-config ORBit-2.0 ORBit-CosNaming-2.0 --libs)

TARGETS= Uneje-client Uneje-server
IDLOUT= Uneje-common.c Uneje-stubs.c Uneje-skels.c Uneje.h

all: $(IDLOUT) Uneje-client Uneje-server

Uneje-server.o: Uneje-server.c Uneje-skelimpl.c

Uneje-client : Uneje-client.o Uneje-stubs.o Uneje-common.o examples-toolkit.o
Uneje-server : Uneje-server.o Uneje-skels.o Uneje-common.o
examples-toolkit.o Uneje-skelimpl.o

$(IDLOUT): Uneje.idl
	$(ORBIT_IDL) Uneje.idl

%-skelimpl.c: %.idl
	$(ORBIT_IDL) --skeleton-impl $^

# This is how RTAI compiles:
# $(CC) $(LXRT_CFLAGS) -o $@ $< $(LXRT_LDFLAGS) -llxrt

# Possible Solution?:
# $(CC) $(LXRT_CFLAGS) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LXRT_LDFLAGS) -llxrt

clean:
	rm -rf *.o *~ $(IDLOUT) *.ior *.ref Uneje-client Uneje-server


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]