[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)
|
---|
| 41 | ACCENTFOLD_LIBS = $(INDEXERS_DIR)/packages/unac/libunac.a
|
---|
| 42 | else
|
---|
| 43 | ACCENTFOLD_LIBS =
|
---|
| 44 | endif
|
---|
| 45 |
|
---|
[15833] | 46 | USE_SQLITE = @USE_SQLITE@
|
---|
| 47 | ifeq ($(USE_SQLITE), 1)
|
---|
[18026] | 48 | SQLITE_LIBS = $(COMMON_PACKAGES_DIR)/sqlite/lib/libsqlite3.a -ldl -lpthread
|
---|
[15833] | 49 | else
|
---|
| 50 | SQLITE_LIBS =
|
---|
| 51 | endif
|
---|
| 52 |
|
---|
[15463] | 53 | MICO_DIR = @MICO_DIR@
|
---|
[15576] | 54 | MICO_VER = @MICO_VER@
|
---|
[15463] | 55 | ifeq ($(MICO_DIR), default)
|
---|
[18226] | 56 | MICO_INCLUDES = -I$(RUNTIME_PACKAGES_DIR)/mico/mico/include
|
---|
| 57 | MICO_PATH = $(RUNTIME_PACKAGES_DIR)/mico/bin/
|
---|
[15463] | 58 | else
|
---|
| 59 | ifeq ($(MICO_DIR), yes)
|
---|
[15563] | 60 | MICO_INCLUDES =
|
---|
[15463] | 61 | else
|
---|
[15563] | 62 | MICO_INCLUDES = -I$(MICO_DIR)
|
---|
[15463] | 63 | endif
|
---|
| 64 | MICO_PATH =
|
---|
| 65 | endif
|
---|
| 66 |
|
---|
[15578] | 67 | USE_CORBA = @USE_CORBA@
|
---|
| 68 | ifeq ($(USE_CORBA), 1)
|
---|
[15563] | 69 | AR = ar
|
---|
| 70 | CC = @CC@
|
---|
| 71 | CFLAGS = @CFLAGS@
|
---|
| 72 | DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER
|
---|
[18233] | 73 | INCLUDES = -I$(COMMON_DIR)/src/lib -I$(COLSERVR_DIR) -I$(PROTOCOL_DIR) -I$(RECPT_DIR) -I$(INDEXERS_DIR)/mgpp/text \
|
---|
[15578] | 74 | $(MICO_INCLUDES)
|
---|
[15563] | 75 | INSTALL = @INSTALL@
|
---|
| 76 | LDFLAGS = @LDFLAGS@
|
---|
[18226] | 77 | LIBS = @LIBS@ $(COMMON_PACKAGES_DIR)/gdbm/lib/libgdbm.a -L$(COMMON_PACKAGES_DIR)/expat/lib -lexpat \
|
---|
| 78 | $(ACCENTFOLD_LIBS) $(SQLITE_LIBS) -L$(RUNTIME_PACKAGES_DIR)/mico/lib -lmico$(MICO_VER)
|
---|
[15563] | 79 | RANLIB = @RANLIB@
|
---|
[15463] | 80 |
|
---|
| 81 |
|
---|
[15563] | 82 | COMPILE = $(MICO_PATH)mico-c++ -x c++ $(CFLAGS) $(DEFS) $(INCLUDES) -c
|
---|
[15576] | 83 | LINK = $(MICO_PATH)mico-ld $(LDFLAGS) -o $@
|
---|
[15463] | 84 |
|
---|
| 85 |
|
---|
[15459] | 86 | .SUFFIXES: .mpp .o
|
---|
| 87 | .mpp.o:
|
---|
[15563] | 88 | $(COMPILE) $<
|
---|
[15459] | 89 |
|
---|
| 90 |
|
---|
[15563] | 91 | SOURCES = \
|
---|
| 92 | corbaconv_text_t.mpp \
|
---|
| 93 | corbaiface.mpp \
|
---|
| 94 | corbaiface_skel.mpp \
|
---|
[15576] | 95 | corbaproto.mpp \
|
---|
[15563] | 96 | corbatext_t.mpp
|
---|
[15471] | 97 |
|
---|
[15563] | 98 | OBJECTS = \
|
---|
| 99 | corbaconv_text_t.o \
|
---|
| 100 | corbaiface.o \
|
---|
| 101 | corbaiface_skel.o \
|
---|
[15576] | 102 | corbaproto.o \
|
---|
[15563] | 103 | corbatext_t.o
|
---|
[15471] | 104 |
|
---|
[15578] | 105 | CORBASERVER_OBJECTS = \
|
---|
| 106 | corbaServer.o
|
---|
| 107 |
|
---|
| 108 | CORBARECPT_OBJECTS = \
|
---|
| 109 | corbaclient.o
|
---|
| 110 |
|
---|
[15576] | 111 | GSDL_LIBS = \
|
---|
[15578] | 112 | $(RECPT_DIR)/gsdlrecpt.a \
|
---|
[15576] | 113 | $(PROTOCOL_DIR)/gsdlprotocol.a \
|
---|
| 114 | $(COLSERVR_DIR)/gsdlcolservr.a \
|
---|
| 115 | $(INDEXERS_DIR)/mg/src/text/libmgtext.a \
|
---|
| 116 | $(INDEXERS_DIR)/mg/lib/libmglib.a \
|
---|
| 117 | $(INDEXERS_DIR)/mgpp/text/libmgpptext.a \
|
---|
| 118 | $(INDEXERS_DIR)/mgpp/lib/libmgpplib.a \
|
---|
[18233] | 119 | $(COMMON_DIR)/src/lib/gsdllib.a
|
---|
[15471] | 120 |
|
---|
[15578] | 121 | CORBASERVER_EXECUTABLE_OBJECTS = \
|
---|
[15576] | 122 | $(OBJECTS) \
|
---|
[15578] | 123 | $(CORBASERVER_OBJECTS) \
|
---|
[15576] | 124 | $(GSDL_LIBS)
|
---|
| 125 |
|
---|
[15578] | 126 | CORBARECPT_EXECUTABLE_OBJECTS = \
|
---|
| 127 | $(OBJECTS) \
|
---|
| 128 | $(CORBARECPT_OBJECTS) \
|
---|
| 129 | $(GSDL_LIBS)
|
---|
[15576] | 130 |
|
---|
[15578] | 131 | EXECUTABLES = corbaserver corbarecptldd
|
---|
[15576] | 132 |
|
---|
[15471] | 133 |
|
---|
[15578] | 134 | # Default target: make both corbaserver and corbarecptldd
|
---|
| 135 | all: $(EXECUTABLES)
|
---|
[15472] | 136 |
|
---|
[15578] | 137 | corbaserver: $(CORBASERVER_EXECUTABLE_OBJECTS)
|
---|
| 138 | $(LINK) $(CORBASERVER_EXECUTABLE_OBJECTS) $(LIBS)
|
---|
[15472] | 139 |
|
---|
[15578] | 140 | corbarecptldd: $(CORBARECPT_EXECUTABLE_OBJECTS)
|
---|
| 141 | $(LINK) $(CORBARECPT_EXECUTABLE_OBJECTS) $(LIBS)
|
---|
[15471] | 142 |
|
---|
[16586] | 143 | depend:
|
---|
| 144 | makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
|
---|
| 145 |
|
---|
[15578] | 146 | install:
|
---|
[15471] | 147 |
|
---|
[15578] | 148 | clean:
|
---|
| 149 | rm -f $(OBJECTS) $(CORBASERVER_OBJECTS) $(CORBARECPT_OBJECTS) $(EXECUTABLES)
|
---|
[15471] | 150 |
|
---|
[15549] | 151 | else
|
---|
| 152 | all:
|
---|
[16586] | 153 | depend:
|
---|
[15549] | 154 | install:
|
---|
| 155 | clean:
|
---|
[15548] | 156 | endif
|
---|
[16586] | 157 |
|
---|
| 158 | # Want to do distclean regardless of whether or not been compiled
|
---|
| 159 | # distclean needs to get rid of anything produced by ./configure such
|
---|
| 160 | # as this makefile!
|
---|
| 161 |
|
---|
| 162 |
|
---|
| 163 | distclean: clean
|
---|
| 164 | rm -f Makefile
|
---|
| 165 |
|
---|