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