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