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

Last change on this file since 30878 was 30878, checked in by ak19, 8 years ago

Modifications to get GS2 compiling to work again on Macs after the recent ElCapitan changes around libiconv for a GS3 release.

File size: 5.8 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
31GSDLOS = @gsdlos@
32GSLDARCH = @gsdlarch@
33
34INDEXERS_DIR = $(COMMON_DIR)/indexers
35COMMON_PACKAGES_DIR = $(COMMON_DIR)/packages
36RUNTIME_PACKAGES_DIR = $(RUNTIME_DIR)/packages
37COLSERVR_DIR = $(RUNTIME_DIR)/src/colservr
38PROTOCOL_DIR = $(RUNTIME_DIR)/src/protocol
39RECPT_DIR = $(RUNTIME_DIR)/src/recpt
40
41
42ENABLE_ACCENTFOLD = @ENABLE_ACCENTFOLD@
43ifeq ($(ENABLE_ACCENTFOLD), 1)
44ifeq ($(GSDLOS),darwin)
45ACCENTFOLD_LIBS = $(INDEXERS_DIR)/packages/unac/libunac.a -liconv
46else
47ACCENTFOLD_LIBS = $(INDEXERS_DIR)/packages/unac/libunac.a $(COMMON_PACKAGES_DIR)/iconv/lib/libiconv.a
48endif
49else
50ACCENTFOLD_LIBS =
51endif
52
53
54ENABLE_MG = @ENABLE_MG@
55ifeq ($(ENABLE_MG), 1)
56MG_INDEXERS_LIBS = $(INDEXERS_DIR)/mg/src/text/libmgtext.a \
57 $(INDEXERS_DIR)/mg/lib/libmglib.a
58MG_INCLUDES = -I$(INDEXERS_DIR)/mg/lib
59else
60MG_INDEXERS_LIBS =
61MG_INCLUDES =
62endif
63
64ENABLE_MGPP = @ENABLE_MGPP@
65ifeq ($(ENABLE_MGPP), 1)
66MGPP_INDEXERS_LIBS = $(INDEXERS_DIR)/mgpp/text/libmgpptext.a \
67 $(INDEXERS_DIR)/mgpp/lib/libmgpplib.a
68MGPP_INCLUDES = -I$(INDEXERS_DIR)/mgpp/text -I$(INDEXERS_DIR)/mgpp/lib
69else
70MGPP_INDEXERS_LIBS =
71MGPP_INCLUDES =
72endif
73
74USE_GDBM = @USE_GDBM@
75ifeq ($(USE_GDBM), 1)
76GDBM_DEFINES = -DUSE_GDBM
77else
78GDBM_DEFINES =
79endif
80
81USE_JDBM = @USE_JDBM@
82ifeq ($(USE_JDBM), 1)
83JDBM_DEFINES = -DUSE_JDBM
84else
85JDBM_DEFINES =
86endif
87
88USE_SQLITE = @USE_SQLITE@
89ifeq ($(USE_SQLITE), 1)
90SQLITE_LIBS = $(COMMON_PACKAGES_DIR)/sqlite/lib/libsqlite3.a -ldl -lpthread
91SQLITE_DEFINES = -DUSE_SQLITE
92else
93SQLITE_LIBS =
94SQLITE_DEFINES =
95endif
96
97MICO_DIR = @MICO_DIR@
98MICO_VER = @MICO_VER@
99ifeq ($(MICO_DIR), default)
100MICO_INCLUDES = -I. -I$(RUNTIME_PACKAGES_DIR)/mico/mico/include
101MICO_PATH = $(RUNTIME_PACKAGES_DIR)/mico/bin/
102else
103MICO_INCLUDES = -I. -I$(MICO_DIR)
104MICO_PATH =
105endif
106
107USE_CORBA = @USE_CORBA@
108ifeq ($(USE_CORBA), 1)
109AR = ar
110CC = @CC@
111CFLAGS = -I. @CFLAGS@
112CXXFLAGS = -I. @CXXFLAGS@
113DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES)
114INCLUDES = -I$(COMMON_DIR)/src/lib -I$(COLSERVR_DIR) -I$(PROTOCOL_DIR) -I$(RECPT_DIR) $(MG_INCLUDES) $(MGPP_INCLUDES) \
115 $(MICO_INCLUDES)
116INSTALL = @INSTALL@
117LDFLAGS = @LDFLAGS@
118LIBS = @LIBS@ $(COMMON_PACKAGES_DIR)/gdbm/lib/libgdbm.a -L$(COMMON_PACKAGES_DIR)/expat/lib -lexpat \
119 $(ACCENTFOLD_LIBS) $(SQLITE_LIBS) -L$(RUNTIME_PACKAGES_DIR)/mico/lib -lmico$(MICO_VER)
120RANLIB = @RANLIB@
121
122
123COMPILE = $(MICO_PATH)mico-c++ -x c++ $(CFLAGS) $(DEFS) $(INCLUDES) -c
124LINK = $(MICO_PATH)mico-ld $(LDFLAGS) -o $@
125
126
127.SUFFIXES: .mpp .o
128.mpp.o:
129 $(COMPILE) $<
130
131
132SOURCES = \
133 corbaconv_text_t.mpp \
134 corbaiface.mpp \
135 corbaproto.mpp \
136 corbatext_t.mpp
137# corbaiface_skel.mpp \
138
139OBJECTS = \
140 corbaconv_text_t.o \
141 corbaiface.o \
142 corbaproto.o \
143 corbatext_t.o
144# corbaiface_skel.o \
145
146CORBASERVER_OBJECTS = \
147 corbaServer.o
148
149CORBARECPT_OBJECTS = \
150 corbaclient.o
151
152GSDL_LIBS = \
153 $(RECPT_DIR)/gsdlrecpt.a \
154 $(PROTOCOL_DIR)/gsdlprotocol.a \
155 $(COLSERVR_DIR)/gsdlcolservr.a \
156 $(MG_INDEXERS_LIBS) \
157 $(MGPP_INDEXERS_LIBS) \
158 $(COMMON_DIR)/src/lib/gsdllib.a
159
160CORBASERVER_EXECUTABLE_OBJECTS = \
161 $(OBJECTS) \
162 $(CORBASERVER_OBJECTS) \
163 $(GSDL_LIBS)
164
165CORBARECPT_EXECUTABLE_OBJECTS = \
166 $(OBJECTS) \
167 $(CORBARECPT_OBJECTS) \
168 $(GSDL_LIBS)
169
170EXECUTABLES = corbaserver corbarecptldd
171
172
173# Default target: make both corbaserver and corbarecptldd
174all: $(EXECUTABLES)
175
176corbaserver: $(CORBASERVER_EXECUTABLE_OBJECTS)
177 $(LINK) $(CORBASERVER_EXECUTABLE_OBJECTS) $(LIBS)
178
179corbarecptldd: $(CORBARECPT_EXECUTABLE_OBJECTS)
180 $(LINK) $(CORBARECPT_EXECUTABLE_OBJECTS) $(LIBS)
181
182depend:
183 makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
184
185install:
186# We're in a linux makefile, so we know what the GSDLOS is if this
187# Makefile is run:
188 cp corbaserver ../../../cgi-bin/linux/.
189 if test -e corbarecptldd; then cp corbarecptldd ../../../cgi-bin/linux/.; fi
190
191clean:
192 rm -f $(OBJECTS) $(CORBASERVER_OBJECTS) $(CORBARECPT_OBJECTS) $(EXECUTABLES)
193
194else
195all:
196depend:
197install:
198clean:
199endif
200
201corbaiface.h corbaiface.mpp: corbaiface.idl
202
203# Because sequential commands are independent (each line seems to be run in its own shell),
204# need to set the path env vars and run the IDL command in the same cmd, so it remembers
205# the env vars when running the idl executable
206# (NOTE: In the past, before BOA changed to POA in corba code, skeleton files were
207# required. If needed again, generate them with the --c++-skel option to idl.)
208 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;
209
210# Want to do distclean regardless of whether or not been compiled
211# distclean needs to get rid of anything produced by ./configure such
212# as this makefile!
213
214
215distclean: clean
216 rm -f Makefile
217
Note: See TracBrowser for help on using the repository browser.