source: main/trunk/greenstone2/runtime-src/src/corba/Makefile.in@ 28762

Last change on this file since 28762 was 25231, checked in by ak19, 12 years ago

Many changes to get corba working again ever since the addition of RSS support meant that the method get_rss_items needed to be mirrored in the corba code. The corba code was not compiling then and it turned out we needed a later version of Mico's corba implementation (2.3.13 up from 2.3.5). Therefore the current commit not only corrects some errors in the recently added getRssItems() method but includes further changes: 1. namespaced use of iostream functions were required in some mpp files. 2. New types and member variables added to the corbaiface.idl interface file, to mirror the presence of equivalent variables in comtools.h which hadn't been ported over yet. (Such as the complex corba data type equivalent of collectionmetamap used in comtools.h.) This required (de)serialisation methods to be declared and implemented in corbatext_t.h and corbatext_t.mpp. The additional member variables for the corbaColInfoResponse in corbaiface.idl are now also unpacked in corbaproto.mpp along with the rest of the data structure. 3. Having changed from mico version 2.3.5 to 2.3.13 required code to changed to use POA instead of BOA. This also meant that skeleton files were no longer to be generated when running idl over corbaiface.idl. corbaserver inherits from a POA related object now instead of from the skeleton. 4. Makefile.in was updated to reflect these changes (absence of skeleton), includes a target to run IDL over the corbaiface.idl file to generate the necessary helper files, and corrects earlier oversights in updating the corba makefile with the rest of the changes made over time to runtime-src.

File size: 5.6 KB
Line 
1###########################################################################
2#
3# Makefile -- runtime-src/src/corba
4# A component of the Greenstone digital library software
5# from the New Zealand Digital Library Project at the
6# University of Waikato, New Zealand.
7#
8# Copyright (C) 1999-2008 The New Zealand Digital Library Project
9#
10#
11# This program is free software; you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation; either version 2 of the License, or
14# (at your option) any later version.
15#
16# This program is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with this program; if not, write to the Free Software
23# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24#
25###########################################################################
26
27GSDL_DIR = ../../..
28COMMON_DIR = $(GSDL_DIR)/common-src
29RUNTIME_DIR = $(GSDL_DIR)/runtime-src
30
31INDEXERS_DIR = $(COMMON_DIR)/indexers
32COMMON_PACKAGES_DIR = $(COMMON_DIR)/packages
33RUNTIME_PACKAGES_DIR = $(RUNTIME_DIR)/packages
34COLSERVR_DIR = $(RUNTIME_DIR)/src/colservr
35PROTOCOL_DIR = $(RUNTIME_DIR)/src/protocol
36RECPT_DIR = $(RUNTIME_DIR)/src/recpt
37
38
39ENABLE_ACCENTFOLD = @ENABLE_ACCENTFOLD@
40ifeq ($(ENABLE_ACCENTFOLD), 1)
41ACCENTFOLD_LIBS = $(INDEXERS_DIR)/packages/unac/libunac.a $(COMMON_PACKAGES_DIR)/iconv/lib/libiconv.a
42else
43ACCENTFOLD_LIBS =
44endif
45
46
47ENABLE_MG = @ENABLE_MG@
48ifeq ($(ENABLE_MG), 1)
49MG_INDEXERS_LIBS = $(INDEXERS_DIR)/mg/src/text/libmgtext.a \
50 $(INDEXERS_DIR)/mg/lib/libmglib.a
51MG_INCLUDES = -I$(INDEXERS_DIR)/mg/lib
52else
53MG_INDEXERS_LIBS =
54MG_INCLUDES =
55endif
56
57ENABLE_MGPP = @ENABLE_MGPP@
58ifeq ($(ENABLE_MGPP), 1)
59MGPP_INDEXERS_LIBS = $(INDEXERS_DIR)/mgpp/text/libmgpptext.a \
60 $(INDEXERS_DIR)/mgpp/lib/libmgpplib.a
61MGPP_INCLUDES = -I$(INDEXERS_DIR)/mgpp/text -I$(INDEXERS_DIR)/mgpp/lib
62else
63MGPP_INDEXERS_LIBS =
64MGPP_INCLUDES =
65endif
66
67USE_GDBM = @USE_GDBM@
68ifeq ($(USE_GDBM), 1)
69GDBM_DEFINES = -DUSE_GDBM
70else
71GDBM_DEFINES =
72endif
73
74USE_JDBM = @USE_JDBM@
75ifeq ($(USE_JDBM), 1)
76JDBM_DEFINES = -DUSE_JDBM
77else
78JDBM_DEFINES =
79endif
80
81USE_SQLITE = @USE_SQLITE@
82ifeq ($(USE_SQLITE), 1)
83SQLITE_LIBS = $(COMMON_PACKAGES_DIR)/sqlite/lib/libsqlite3.a -ldl -lpthread
84SQLITE_DEFINES = -DUSE_SQLITE
85else
86SQLITE_LIBS =
87SQLITE_DEFINES =
88endif
89
90MICO_DIR = @MICO_DIR@
91MICO_VER = @MICO_VER@
92ifeq ($(MICO_DIR), default)
93MICO_INCLUDES = -I. -I$(RUNTIME_PACKAGES_DIR)/mico/mico/include
94MICO_PATH = $(RUNTIME_PACKAGES_DIR)/mico/bin/
95else
96MICO_INCLUDES = -I. -I$(MICO_DIR)
97MICO_PATH =
98endif
99
100USE_CORBA = @USE_CORBA@
101ifeq ($(USE_CORBA), 1)
102AR = ar
103CC = @CC@
104CFLAGS = -I. @CFLAGS@
105CXXFLAGS = -I. @CXXFLAGS@
106DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES)
107INCLUDES = -I$(COMMON_DIR)/src/lib -I$(COLSERVR_DIR) -I$(PROTOCOL_DIR) -I$(RECPT_DIR) $(MG_INCLUDES) $(MGPP_INCLUDES) \
108 $(MICO_INCLUDES)
109INSTALL = @INSTALL@
110LDFLAGS = @LDFLAGS@
111LIBS = @LIBS@ $(COMMON_PACKAGES_DIR)/gdbm/lib/libgdbm.a -L$(COMMON_PACKAGES_DIR)/expat/lib -lexpat \
112 $(ACCENTFOLD_LIBS) $(SQLITE_LIBS) -L$(RUNTIME_PACKAGES_DIR)/mico/lib -lmico$(MICO_VER)
113RANLIB = @RANLIB@
114
115
116COMPILE = $(MICO_PATH)mico-c++ -x c++ $(CFLAGS) $(DEFS) $(INCLUDES) -c
117LINK = $(MICO_PATH)mico-ld $(LDFLAGS) -o $@
118
119
120.SUFFIXES: .mpp .o
121.mpp.o:
122 $(COMPILE) $<
123
124
125SOURCES = \
126 corbaconv_text_t.mpp \
127 corbaiface.mpp \
128 corbaproto.mpp \
129 corbatext_t.mpp
130# corbaiface_skel.mpp \
131
132OBJECTS = \
133 corbaconv_text_t.o \
134 corbaiface.o \
135 corbaproto.o \
136 corbatext_t.o
137# corbaiface_skel.o \
138
139CORBASERVER_OBJECTS = \
140 corbaServer.o
141
142CORBARECPT_OBJECTS = \
143 corbaclient.o
144
145GSDL_LIBS = \
146 $(RECPT_DIR)/gsdlrecpt.a \
147 $(PROTOCOL_DIR)/gsdlprotocol.a \
148 $(COLSERVR_DIR)/gsdlcolservr.a \
149 $(MG_INDEXERS_LIBS) \
150 $(MGPP_INDEXERS_LIBS) \
151 $(COMMON_DIR)/src/lib/gsdllib.a
152
153CORBASERVER_EXECUTABLE_OBJECTS = \
154 $(OBJECTS) \
155 $(CORBASERVER_OBJECTS) \
156 $(GSDL_LIBS)
157
158CORBARECPT_EXECUTABLE_OBJECTS = \
159 $(OBJECTS) \
160 $(CORBARECPT_OBJECTS) \
161 $(GSDL_LIBS)
162
163EXECUTABLES = corbaserver corbarecptldd
164
165
166# Default target: make both corbaserver and corbarecptldd
167all: $(EXECUTABLES)
168
169corbaserver: $(CORBASERVER_EXECUTABLE_OBJECTS)
170 $(LINK) $(CORBASERVER_EXECUTABLE_OBJECTS) $(LIBS)
171
172corbarecptldd: $(CORBARECPT_EXECUTABLE_OBJECTS)
173 $(LINK) $(CORBARECPT_EXECUTABLE_OBJECTS) $(LIBS)
174
175depend:
176 makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
177
178install:
179# We're in a linux makefile, so we know what the GSDLOS is if this
180# Makefile is run:
181 cp corbaserver ../../../cgi-bin/linux/.
182 if test -e corbarecptldd; then cp corbarecptldd ../../../cgi-bin/linux/.; fi
183
184clean:
185 rm -f $(OBJECTS) $(CORBASERVER_OBJECTS) $(CORBARECPT_OBJECTS) $(EXECUTABLES)
186
187else
188all:
189depend:
190install:
191clean:
192endif
193
194corbaiface.h corbaiface.mpp: corbaiface.idl
195
196# Because sequential commands are independent (each line seems to be run in its own shell),
197# need to set the path env vars and run the IDL command in the same cmd, so it remembers
198# the env vars when running the idl executable
199# (NOTE: In the past, before BOA changed to POA in corba code, skeleton files were
200# required. If needed again, generate them with the --c++-skel option to idl.)
201 export PATH=$(RUNTIME_PACKAGES_DIR)/mico/bin:${PATH};export LD_LIBRARY_PATH=$(RUNTIME_PACKAGES_DIR)/mico/lib:${LD_LIBRARY_PATH};idl --c++-suffix mpp corbaiface.idl;
202
203# Want to do distclean regardless of whether or not been compiled
204# distclean needs to get rid of anything produced by ./configure such
205# as this makefile!
206
207
208distclean: clean
209 rm -f Makefile
210
Note: See TracBrowser for help on using the repository browser.