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