[15549] | 1 | ###########################################################################
|
---|
| 2 | #
|
---|
| 3 | # Makefile -- 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 | ###########################################################################
|
---|
[15548] | 26 |
|
---|
[15549] | 27 | GSDL_DIR = ../..
|
---|
| 28 | INDEXERS_DIR = $(GSDL_DIR)/indexers
|
---|
| 29 | PACKAGES_DIR = $(GSDL_DIR)/packages
|
---|
| 30 | COLSERVR_DIR = $(GSDL_DIR)/src/colservr
|
---|
| 31 | PROTOCOL_DIR = $(GSDL_DIR)/src/protocol
|
---|
[15548] | 32 |
|
---|
| 33 |
|
---|
[15549] | 34 | USE_CORBA = @USE_CORBA@
|
---|
| 35 | ifeq ($(USE_CORBA), 1)
|
---|
| 36 |
|
---|
[15463] | 37 | MICO_DIR = @MICO_DIR@
|
---|
| 38 | ifeq ($(MICO_DIR), default)
|
---|
[15563] | 39 | MICO_INCLUDES = -I$(PACKAGES_DIR)/mico/mico/include
|
---|
| 40 | MICO_PATH = $(PACKAGES_DIR)/mico/bin/
|
---|
[15463] | 41 | else
|
---|
| 42 | ifeq ($(MICO_DIR), yes)
|
---|
[15563] | 43 | MICO_INCLUDES =
|
---|
[15463] | 44 | else
|
---|
[15563] | 45 | MICO_INCLUDES = -I$(MICO_DIR)
|
---|
[15463] | 46 | endif
|
---|
| 47 | MICO_PATH =
|
---|
| 48 | endif
|
---|
| 49 |
|
---|
| 50 |
|
---|
[15563] | 51 | AR = ar
|
---|
| 52 | CC = @CC@
|
---|
| 53 | CFLAGS = @CFLAGS@
|
---|
| 54 | DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER
|
---|
| 55 | # Do NOT add the "recpt" directory here: the CORBA code should be independent of the receptionist!
|
---|
| 56 | INCLUDES = -I$(GSDL_DIR)/lib -I$(COLSERVR_DIR) -I$(PROTOCOL_DIR) -I$(INDEXERS_DIR)/mgpp/text $(MICO_INCLUDES)
|
---|
| 57 | INSTALL = @INSTALL@
|
---|
| 58 | LDFLAGS = @LDFLAGS@
|
---|
| 59 | LIBS = @LIBS@ @GDBM_LIBPATH@ -lgdbm -L$(PACKAGES_DIR)/expat/lib -lexpat $(ACCENTFOLD_LIBS) \
|
---|
| 60 | $(PACKAGES_DIR)/yaz/lib/libyaz.a $(PACKAGES_DIR)/d2m/libd2m.a -lxml2
|
---|
| 61 | RANLIB = @RANLIB@
|
---|
[15463] | 62 |
|
---|
| 63 |
|
---|
[15563] | 64 | COMPILE = $(MICO_PATH)mico-c++ -x c++ $(CFLAGS) $(DEFS) $(INCLUDES) -c
|
---|
[15463] | 65 |
|
---|
| 66 |
|
---|
[15459] | 67 | .SUFFIXES: .mpp .o
|
---|
| 68 | .mpp.o:
|
---|
[15563] | 69 | $(COMPILE) $<
|
---|
[15459] | 70 |
|
---|
| 71 |
|
---|
[15563] | 72 | SOURCES = \
|
---|
| 73 | corbaconv_text_t.mpp \
|
---|
| 74 | corbaiface.mpp \
|
---|
| 75 | corbaiface_skel.mpp \
|
---|
| 76 | corbaServer.mpp \
|
---|
| 77 | corbatext_t.mpp
|
---|
[15471] | 78 |
|
---|
[15563] | 79 | OBJECTS = \
|
---|
| 80 | corbaconv_text_t.o \
|
---|
| 81 | corbaiface.o \
|
---|
| 82 | corbaiface_skel.o \
|
---|
| 83 | corbaServer.o \
|
---|
| 84 | corbatext_t.o
|
---|
[15471] | 85 |
|
---|
[15563] | 86 | EXECUTABLE = corbaserver corbarecptldd
|
---|
[15471] | 87 |
|
---|
[15563] | 88 | all: $(EXECUTABLE)
|
---|
[15471] | 89 |
|
---|
[15472] | 90 | MSTATIC = @STATIC@
|
---|
| 91 | MLINK = $(MICO_PATH)mico-ld $(MSTATIC) $(LDFLAGS) $(MICO_LIB) -o $@
|
---|
| 92 | MLIBS = $(LIBS) -L../../lib/ -lmico$(MICO_VER) -lmicoaux$(MICO_VER)
|
---|
| 93 |
|
---|
[15563] | 94 | # .SUFFIXES: .mpp .o
|
---|
| 95 | # .mpp.o:
|
---|
| 96 | # $(MCOMPILE) $< -o $@
|
---|
[15472] | 97 |
|
---|
| 98 |
|
---|
[15563] | 99 | corbaserver: $(OBJECTS)
|
---|
[15471] | 100 | @echo -e building corbaserver
|
---|
[15563] | 101 | $(MLINK) $(OBJECTS) $(MLIBS)
|
---|
[15471] | 102 | # stripping symbols was a cunning plan, but caused difficulties when
|
---|
| 103 | # it came to debugging ...
|
---|
| 104 | # non GNU strips might not like these options - check autoconf?
|
---|
| 105 | # strip --strip-all --discard-all corbaserver
|
---|
| 106 | # strip corbaserver
|
---|
| 107 | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
---|
| 108 |
|
---|
| 109 | CORBARECPT_OBJECTS = corbaproto.o corbaclient.o
|
---|
| 110 |
|
---|
| 111 | CORBARECPT_OBJS = $(COMMONOBJECTS) $(CORBARECPT_OBJECTS) $(COLSERVROBJECTS) \
|
---|
| 112 | ../../lib/corbaiface.o \
|
---|
| 113 | ../../lib/corbaiface_skel.o \
|
---|
| 114 | ../../lib/corbaconv_text_t.o \
|
---|
| 115 | ../../lib/corbatext_t.o \
|
---|
| 116 | ../../lib/gsdllib.a \
|
---|
| 117 | $(INDEXERS_DIR)/mg/src/text/libmgtext.a \
|
---|
| 118 | $(INDEXERS_DIR)/mg/lib/libmglib.a \
|
---|
| 119 | $(FASTCGI_OBJS) \
|
---|
| 120 | $(INDEXERS_DIR)/mgpp/text/libmgpptext.a \
|
---|
| 121 | $(INDEXERS_DIR)/mgpp/lib/libmgpplib.a
|
---|
| 122 |
|
---|
| 123 |
|
---|
| 124 | corbarecptldd: $(CORBARECPT_OBJS)
|
---|
| 125 | @echo -e building corbarecptldd:
|
---|
| 126 | $(MLINK) $(CORBARECPT_OBJS) $(MLIBS)
|
---|
[15548] | 127 |
|
---|
[15549] | 128 | else
|
---|
| 129 | all:
|
---|
| 130 | install:
|
---|
| 131 | clean:
|
---|
| 132 | distclean:
|
---|
| 133 | depend:
|
---|
[15548] | 134 | endif
|
---|