summaryrefslogtreecommitdiff
path: root/bindings/corba/omniorbcpp/Makefile
blob: 24e12208108a5c03e72f6eaa42d8cecf7dc6a935 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
all: server testclient

PREFIX = $(shell grep ^prefix ../../../Makefile|cut -f3 -d' ')

#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)

#orbit stuff
CFLAGS += $(shell orbit2-config --cflags)
CFLAGS += $(shell PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig pkg-config --cflags omniORB4)
CXXFLAGS += $(shell PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig pkg-config --cflags omniORB4)
LIBS += $(shell PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig pkg-config --libs omniORB4)

LIBS += -L/usr/lib64 

#comment out for release
#CXXFLAGS += -g -O0
#CFLAGS += -g -O0
#LDFLAGS += -g -O0
CXXFLAGS += -O3
CFLAGS += -O3
#-----------------------------------------------------------------------------


server: server.cpp swordorb-impl.o swordorb-stubs.o 
	$(CXX) $(CXXFLAGS) -I. -o server server.cpp swordorb-impl.o swordorb-stubs.o $(LIBS)

testclient: testclient.cpp swordorb-impl.cpp swordorb-stubs.o 
	$(CXX) $(CXXFLAGS) -I. -o testclient testclient.cpp swordorb-stubs.o $(LIBS)

swordorb-impl.o: swordorb.h swordorb-impl.cpp 
	$(CXX) $(CXXFLAGS) -I. -c swordorb-impl.cpp


swordorb.h: ./../swordorb.idl
	omniidl -bcxx -Wbh=.h -Wbs=-stubs.cpp ./../swordorb.idl

swordorb-stubs.o: swordorb-stubs.cpp
	$(CC) $(CFLAGS) -I. -c swordorb-stubs.cpp

clean:
	rm -f *.h *-stubs.cpp *.cc *.o *.c server testclient

install:
	mkdir -p $(PREFIX)/bin
	cp -f server $(PREFIX)/bin/swordorbserver