########################################################################### # # Makefile -- src/corba # A component of the Greenstone digital library software # from the New Zealand Digital Library Project at the # University of Waikato, New Zealand. # # Copyright (C) 1999-2008 The New Zealand Digital Library Project # # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # ########################################################################### GSDL_DIR = ../.. INDEXERS_DIR = $(GSDL_DIR)/indexers PACKAGES_DIR = $(GSDL_DIR)/packages COLSERVR_DIR = $(GSDL_DIR)/src/colservr PROTOCOL_DIR = $(GSDL_DIR)/src/protocol USE_CORBA = @USE_CORBA@ ifeq ($(USE_CORBA), 1) MICO_DIR = @MICO_DIR@ ifeq ($(MICO_DIR), default) MICO_INCLUDES = -I$(PACKAGES_DIR)/mico/mico/include MICO_PATH = $(PACKAGES_DIR)/mico/bin/ else ifeq ($(MICO_DIR), yes) MICO_INCLUDES = else MICO_INCLUDES = -I$(MICO_DIR) endif MICO_PATH = endif AR = ar CC = @CC@ CFLAGS = @CFLAGS@ DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER # Do NOT add the "recpt" directory here: the CORBA code should be independent of the receptionist! INCLUDES = -I$(GSDL_DIR)/lib -I$(COLSERVR_DIR) -I$(PROTOCOL_DIR) -I$(INDEXERS_DIR)/mgpp/text $(MICO_INCLUDES) INSTALL = @INSTALL@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ @GDBM_LIBPATH@ -lgdbm -L$(PACKAGES_DIR)/expat/lib -lexpat $(ACCENTFOLD_LIBS) \ $(PACKAGES_DIR)/yaz/lib/libyaz.a $(PACKAGES_DIR)/d2m/libd2m.a -lxml2 RANLIB = @RANLIB@ COMPILE = $(MICO_PATH)mico-c++ -x c++ $(CFLAGS) $(DEFS) $(INCLUDES) -c .SUFFIXES: .mpp .o .mpp.o: $(COMPILE) $< SOURCES = \ corbaconv_text_t.mpp \ corbaiface.mpp \ corbaiface_skel.mpp \ corbaServer.mpp \ corbatext_t.mpp OBJECTS = \ corbaconv_text_t.o \ corbaiface.o \ corbaiface_skel.o \ corbaServer.o \ corbatext_t.o EXECUTABLE = corbaserver corbarecptldd all: $(EXECUTABLE) MSTATIC = @STATIC@ MLINK = $(MICO_PATH)mico-ld $(MSTATIC) $(LDFLAGS) $(MICO_LIB) -o $@ MLIBS = $(LIBS) -L../../lib/ -lmico$(MICO_VER) -lmicoaux$(MICO_VER) # .SUFFIXES: .mpp .o # .mpp.o: # $(MCOMPILE) $< -o $@ corbaserver: $(OBJECTS) @echo -e building corbaserver $(MLINK) $(OBJECTS) $(MLIBS) # stripping symbols was a cunning plan, but caused difficulties when # it came to debugging ... # non GNU strips might not like these options - check autoconf? # strip --strip-all --discard-all corbaserver # strip corbaserver # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # CORBARECPT_OBJECTS = corbaproto.o corbaclient.o CORBARECPT_OBJS = $(COMMONOBJECTS) $(CORBARECPT_OBJECTS) $(COLSERVROBJECTS) \ ../../lib/corbaiface.o \ ../../lib/corbaiface_skel.o \ ../../lib/corbaconv_text_t.o \ ../../lib/corbatext_t.o \ ../../lib/gsdllib.a \ $(INDEXERS_DIR)/mg/src/text/libmgtext.a \ $(INDEXERS_DIR)/mg/lib/libmglib.a \ $(FASTCGI_OBJS) \ $(INDEXERS_DIR)/mgpp/text/libmgpptext.a \ $(INDEXERS_DIR)/mgpp/lib/libmgpplib.a corbarecptldd: $(CORBARECPT_OBJS) @echo -e building corbarecptldd: $(MLINK) $(CORBARECPT_OBJS) $(MLIBS) else all: install: clean: distclean: depend: endif