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 |
|
---|
27 | GSDL_DIR = ../../..
|
---|
28 | COMMON_DIR = $(GSDL_DIR)/common-src
|
---|
29 | RUNTIME_DIR = $(GSDL_DIR)/runtime-src
|
---|
30 |
|
---|
31 | INDEXERS_DIR = $(COMMON_DIR)/indexers
|
---|
32 | COMMON_PACKAGES_DIR = $(COMMON_DIR)/packages
|
---|
33 | RUNTIME_PACKAGES_DIR = $(RUNTIME_DIR)/packages
|
---|
34 | COLSERVR_DIR = $(RUNTIME_DIR)/src/colservr
|
---|
35 | PROTOCOL_DIR = $(RUNTIME_DIR)/src/protocol
|
---|
36 | RECPT_DIR = $(RUNTIME_DIR)/src/recpt
|
---|
37 |
|
---|
38 |
|
---|
39 | ENABLE_ACCENTFOLD = @ENABLE_ACCENTFOLD@
|
---|
40 | ifeq ($(ENABLE_ACCENTFOLD), 1)
|
---|
41 | ACCENTFOLD_LIBS = $(INDEXERS_DIR)/packages/unac/libunac.a $(COMMON_PACKAGES_DIR)/iconv/lib/libiconv.a
|
---|
42 | else
|
---|
43 | ACCENTFOLD_LIBS =
|
---|
44 | endif
|
---|
45 |
|
---|
46 |
|
---|
47 | ENABLE_MG = @ENABLE_MG@
|
---|
48 | ifeq ($(ENABLE_MG), 1)
|
---|
49 | MG_INDEXERS_LIBS = $(INDEXERS_DIR)/mg/src/text/libmgtext.a \
|
---|
50 | $(INDEXERS_DIR)/mg/lib/libmglib.a
|
---|
51 | MG_INCLUDES = -I$(INDEXERS_DIR)/mg/lib
|
---|
52 | else
|
---|
53 | MG_INDEXERS_LIBS =
|
---|
54 | MG_INCLUDES =
|
---|
55 | endif
|
---|
56 |
|
---|
57 | ENABLE_MGPP = @ENABLE_MGPP@
|
---|
58 | ifeq ($(ENABLE_MGPP), 1)
|
---|
59 | MGPP_INDEXERS_LIBS = $(INDEXERS_DIR)/mgpp/text/libmgpptext.a \
|
---|
60 | $(INDEXERS_DIR)/mgpp/lib/libmgpplib.a
|
---|
61 | MGPP_INCLUDES = -I$(INDEXERS_DIR)/mgpp/text -I$(INDEXERS_DIR)/mgpp/lib
|
---|
62 | else
|
---|
63 | MGPP_INDEXERS_LIBS =
|
---|
64 | MGPP_INCLUDES =
|
---|
65 | endif
|
---|
66 |
|
---|
67 | USE_GDBM = @USE_GDBM@
|
---|
68 | ifeq ($(USE_GDBM), 1)
|
---|
69 | GDBM_DEFINES = -DUSE_GDBM
|
---|
70 | else
|
---|
71 | GDBM_DEFINES =
|
---|
72 | endif
|
---|
73 |
|
---|
74 | USE_JDBM = @USE_JDBM@
|
---|
75 | ifeq ($(USE_JDBM), 1)
|
---|
76 | JDBM_DEFINES = -DUSE_JDBM
|
---|
77 | else
|
---|
78 | JDBM_DEFINES =
|
---|
79 | endif
|
---|
80 |
|
---|
81 | USE_SQLITE = @USE_SQLITE@
|
---|
82 | ifeq ($(USE_SQLITE), 1)
|
---|
83 | SQLITE_LIBS = $(COMMON_PACKAGES_DIR)/sqlite/lib/libsqlite3.a -ldl -lpthread
|
---|
84 | SQLITE_DEFINES = -DUSE_SQLITE
|
---|
85 | else
|
---|
86 | SQLITE_LIBS =
|
---|
87 | SQLITE_DEFINES =
|
---|
88 | endif
|
---|
89 |
|
---|
90 | MICO_DIR = @MICO_DIR@
|
---|
91 | MICO_VER = @MICO_VER@
|
---|
92 | ifeq ($(MICO_DIR), default)
|
---|
93 | MICO_INCLUDES = -I. -I$(RUNTIME_PACKAGES_DIR)/mico/mico/include
|
---|
94 | MICO_PATH = $(RUNTIME_PACKAGES_DIR)/mico/bin/
|
---|
95 | else
|
---|
96 | MICO_INCLUDES = -I. -I$(MICO_DIR)
|
---|
97 | MICO_PATH =
|
---|
98 | endif
|
---|
99 |
|
---|
100 | USE_CORBA = @USE_CORBA@
|
---|
101 | ifeq ($(USE_CORBA), 1)
|
---|
102 | AR = ar
|
---|
103 | CC = @CC@
|
---|
104 | CFLAGS = -I. @CFLAGS@
|
---|
105 | CXXFLAGS = -I. @CXXFLAGS@
|
---|
106 | DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES)
|
---|
107 | INCLUDES = -I$(COMMON_DIR)/src/lib -I$(COLSERVR_DIR) -I$(PROTOCOL_DIR) -I$(RECPT_DIR) $(MG_INCLUDES) $(MGPP_INCLUDES) \
|
---|
108 | $(MICO_INCLUDES)
|
---|
109 | INSTALL = @INSTALL@
|
---|
110 | LDFLAGS = @LDFLAGS@
|
---|
111 | LIBS = @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)
|
---|
113 | RANLIB = @RANLIB@
|
---|
114 |
|
---|
115 |
|
---|
116 | COMPILE = $(MICO_PATH)mico-c++ -x c++ $(CFLAGS) $(DEFS) $(INCLUDES) -c
|
---|
117 | LINK = $(MICO_PATH)mico-ld $(LDFLAGS) -o $@
|
---|
118 |
|
---|
119 |
|
---|
120 | .SUFFIXES: .mpp .o
|
---|
121 | .mpp.o:
|
---|
122 | $(COMPILE) $<
|
---|
123 |
|
---|
124 |
|
---|
125 | SOURCES = \
|
---|
126 | corbaconv_text_t.mpp \
|
---|
127 | corbaiface.mpp \
|
---|
128 | corbaproto.mpp \
|
---|
129 | corbatext_t.mpp
|
---|
130 | # corbaiface_skel.mpp \
|
---|
131 |
|
---|
132 | OBJECTS = \
|
---|
133 | corbaconv_text_t.o \
|
---|
134 | corbaiface.o \
|
---|
135 | corbaproto.o \
|
---|
136 | corbatext_t.o
|
---|
137 | # corbaiface_skel.o \
|
---|
138 |
|
---|
139 | CORBASERVER_OBJECTS = \
|
---|
140 | corbaServer.o
|
---|
141 |
|
---|
142 | CORBARECPT_OBJECTS = \
|
---|
143 | corbaclient.o
|
---|
144 |
|
---|
145 | GSDL_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 |
|
---|
153 | CORBASERVER_EXECUTABLE_OBJECTS = \
|
---|
154 | $(OBJECTS) \
|
---|
155 | $(CORBASERVER_OBJECTS) \
|
---|
156 | $(GSDL_LIBS)
|
---|
157 |
|
---|
158 | CORBARECPT_EXECUTABLE_OBJECTS = \
|
---|
159 | $(OBJECTS) \
|
---|
160 | $(CORBARECPT_OBJECTS) \
|
---|
161 | $(GSDL_LIBS)
|
---|
162 |
|
---|
163 | EXECUTABLES = corbaserver corbarecptldd
|
---|
164 |
|
---|
165 |
|
---|
166 | # Default target: make both corbaserver and corbarecptldd
|
---|
167 | all: $(EXECUTABLES)
|
---|
168 |
|
---|
169 | corbaserver: $(CORBASERVER_EXECUTABLE_OBJECTS)
|
---|
170 | $(LINK) $(CORBASERVER_EXECUTABLE_OBJECTS) $(LIBS)
|
---|
171 |
|
---|
172 | corbarecptldd: $(CORBARECPT_EXECUTABLE_OBJECTS)
|
---|
173 | $(LINK) $(CORBARECPT_EXECUTABLE_OBJECTS) $(LIBS)
|
---|
174 |
|
---|
175 | depend:
|
---|
176 | makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
|
---|
177 |
|
---|
178 | install:
|
---|
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 |
|
---|
184 | clean:
|
---|
185 | rm -f $(OBJECTS) $(CORBASERVER_OBJECTS) $(CORBARECPT_OBJECTS) $(EXECUTABLES)
|
---|
186 |
|
---|
187 | else
|
---|
188 | all:
|
---|
189 | depend:
|
---|
190 | install:
|
---|
191 | clean:
|
---|
192 | endif
|
---|
193 |
|
---|
194 | corbaiface.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 |
|
---|
208 | distclean: clean
|
---|
209 | rm -f Makefile
|
---|
210 |
|
---|