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

Last change on this file since 22058 was 22058, checked in by ak19, 14 years ago

Changes to makefiles to 1. incorporate USE_GDBM and USE_JDBM flags (and USE_SQLITE) in most places so that the DEFINES variable is set at all times. This is necessary to ensure that all classes that contain objects with gdbm and jdbm members are of a consistent size. Else we've had experience with Greenstone crashing with memory errors (to do with the similar ENABLE_indexer flags). 2. ENABLE_JDBM is now USE_JDBM. 3. Not everything works now. It still compiles the default way, but the disable-gdbm flag is causing trouble when compiling argdb in recpt since it uses that.

File size: 4.7 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
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
51else
52MG_INDEXERS_LIBS =
53endif
54
55ENABLE_MGPP = @ENABLE_MGPP@
56ifeq ($(ENABLE_MGPP), 1)
57MGPP_INDEXERS_LIBS = $(INDEXERS_DIR)/mgpp/text/libmgpptext.a \
58 $(INDEXERS_DIR)/mgpp/lib/libmgpplib.a
59MGPP_INCLUDES = -I$(INDEXERS_DIR)/mgpp/text
60else
61MGPP_INDEXERS_LIBS =
62MGPP_INCLUDES =
63endif
64
65USE_GDBM = @USE_GDBM@
66ifeq ($(USE_GDBM), 1)
67GDBM_DEFINES = -DUSE_GDBM
68else
69GDBM_DEFINES =
70endif
71
72USE_JDBM = @USE_JDBM@
73ifeq ($(USE_JDBM), 1)
74JDBM_DEFINES = -DUSE_JDBM
75else
76JDBM_DEFINES =
77endif
78
79USE_SQLITE = @USE_SQLITE@
80ifeq ($(USE_SQLITE), 1)
81SQLITE_LIBS = $(COMMON_PACKAGES_DIR)/sqlite/lib/libsqlite3.a -ldl -lpthread
82SQLITE_DEFINES = -DUSE_SQLITE
83else
84SQLITE_LIBS =
85SQLITE_DEFINES =
86endif
87
88MICO_DIR = @MICO_DIR@
89MICO_VER = @MICO_VER@
90ifeq ($(MICO_DIR), default)
91MICO_INCLUDES = -I$(RUNTIME_PACKAGES_DIR)/mico/mico/include
92MICO_PATH = $(RUNTIME_PACKAGES_DIR)/mico/bin/
93else
94MICO_INCLUDES = -I$(MICO_DIR)
95MICO_PATH =
96endif
97
98USE_CORBA = @USE_CORBA@
99ifeq ($(USE_CORBA), 1)
100AR = ar
101CC = @CC@
102CFLAGS = @CFLAGS@
103DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES)
104INCLUDES = -I$(COMMON_DIR)/src/lib -I$(COLSERVR_DIR) -I$(PROTOCOL_DIR) -I$(RECPT_DIR) $(MGPP_INCLUDES) \
105 $(MICO_INCLUDES)
106INSTALL = @INSTALL@
107LDFLAGS = @LDFLAGS@
108LIBS = @LIBS@ $(COMMON_PACKAGES_DIR)/gdbm/lib/libgdbm.a -L$(COMMON_PACKAGES_DIR)/expat/lib -lexpat \
109 $(ACCENTFOLD_LIBS) $(SQLITE_LIBS) -L$(RUNTIME_PACKAGES_DIR)/mico/lib -lmico$(MICO_VER)
110RANLIB = @RANLIB@
111
112
113COMPILE = $(MICO_PATH)mico-c++ -x c++ $(CFLAGS) $(DEFS) $(INCLUDES) -c
114LINK = $(MICO_PATH)mico-ld $(LDFLAGS) -o $@
115
116
117.SUFFIXES: .mpp .o
118.mpp.o:
119 $(COMPILE) $<
120
121
122SOURCES = \
123 corbaconv_text_t.mpp \
124 corbaiface.mpp \
125 corbaiface_skel.mpp \
126 corbaproto.mpp \
127 corbatext_t.mpp
128
129OBJECTS = \
130 corbaconv_text_t.o \
131 corbaiface.o \
132 corbaiface_skel.o \
133 corbaproto.o \
134 corbatext_t.o
135
136CORBASERVER_OBJECTS = \
137 corbaServer.o
138
139CORBARECPT_OBJECTS = \
140 corbaclient.o
141
142GSDL_LIBS = \
143 $(RECPT_DIR)/gsdlrecpt.a \
144 $(PROTOCOL_DIR)/gsdlprotocol.a \
145 $(COLSERVR_DIR)/gsdlcolservr.a \
146 $(MG_INDEXERS_LIBS) \
147 $(MGPP_INDEXERS_LIBS) \
148 $(COMMON_DIR)/src/lib/gsdllib.a
149
150CORBASERVER_EXECUTABLE_OBJECTS = \
151 $(OBJECTS) \
152 $(CORBASERVER_OBJECTS) \
153 $(GSDL_LIBS)
154
155CORBARECPT_EXECUTABLE_OBJECTS = \
156 $(OBJECTS) \
157 $(CORBARECPT_OBJECTS) \
158 $(GSDL_LIBS)
159
160EXECUTABLES = corbaserver corbarecptldd
161
162
163# Default target: make both corbaserver and corbarecptldd
164all: $(EXECUTABLES)
165
166corbaserver: $(CORBASERVER_EXECUTABLE_OBJECTS)
167 $(LINK) $(CORBASERVER_EXECUTABLE_OBJECTS) $(LIBS)
168
169corbarecptldd: $(CORBARECPT_EXECUTABLE_OBJECTS)
170 $(LINK) $(CORBARECPT_EXECUTABLE_OBJECTS) $(LIBS)
171
172depend:
173 makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
174
175install:
176
177clean:
178 rm -f $(OBJECTS) $(CORBASERVER_OBJECTS) $(CORBARECPT_OBJECTS) $(EXECUTABLES)
179
180else
181all:
182depend:
183install:
184clean:
185endif
186
187# Want to do distclean regardless of whether or not been compiled
188# distclean needs to get rid of anything produced by ./configure such
189# as this makefile!
190
191
192distclean: clean
193 rm -f Makefile
194
Note: See TracBrowser for help on using the repository browser.