########################################################################### # # 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 = ../../.. COMMON_DIR = $(GSDL_DIR)/common-src RUNTIME_DIR = $(GSDL_DIR)/runtime-src INDEXERS_DIR = $(COMMON_DIR)/indexers COMMON_PACKAGES_DIR = $(COMMON_DIR)/packages PACKAGES_DIR = $(RUNTIME_DIR)/packages COLSERVR_DIR = $(RUNTIME_DIR)/src/colservr PROTOCOL_DIR = $(RUNTIME_DIR)/src/protocol RECPT_DIR = $(RUNTIME_DIR)/src/recpt ENABLE_ACCENTFOLD = @ENABLE_ACCENTFOLD@ ifeq ($(ENABLE_ACCENTFOLD), 1) ACCENTFOLD_LIBS = $(INDEXERS_DIR)/packages/unac/libunac.a else ACCENTFOLD_LIBS = endif USE_SQLITE = @USE_SQLITE@ ifeq ($(USE_SQLITE), 1) SQLITE_LIBS = $(COMMON_PACKAGES_DIR)/sqlite/lib/libsqlite3.a -ldl -lpthread else SQLITE_LIBS = endif MICO_DIR = @MICO_DIR@ MICO_VER = @MICO_VER@ 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 USE_CORBA = @USE_CORBA@ ifeq ($(USE_CORBA), 1) AR = ar CC = @CC@ CFLAGS = @CFLAGS@ DEFS = @DEFS@ -DNZDL -DQUIET -DSHORT_SUFFIX -DPARADOCNUM -DGSDLSERVER INCLUDES = -I$(GSDL_DIR)/src/lib -I$(COLSERVR_DIR) -I$(PROTOCOL_DIR) -I$(RECPT_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) \ $(SQLITE_LIBS) -L$(PACKAGES_DIR)/mico/lib -lmico$(MICO_VER) RANLIB = @RANLIB@ COMPILE = $(MICO_PATH)mico-c++ -x c++ $(CFLAGS) $(DEFS) $(INCLUDES) -c LINK = $(MICO_PATH)mico-ld $(LDFLAGS) -o $@ .SUFFIXES: .mpp .o .mpp.o: $(COMPILE) $< SOURCES = \ corbaconv_text_t.mpp \ corbaiface.mpp \ corbaiface_skel.mpp \ corbaproto.mpp \ corbatext_t.mpp OBJECTS = \ corbaconv_text_t.o \ corbaiface.o \ corbaiface_skel.o \ corbaproto.o \ corbatext_t.o CORBASERVER_OBJECTS = \ corbaServer.o CORBARECPT_OBJECTS = \ corbaclient.o GSDL_LIBS = \ $(RECPT_DIR)/gsdlrecpt.a \ $(PROTOCOL_DIR)/gsdlprotocol.a \ $(COLSERVR_DIR)/gsdlcolservr.a \ $(INDEXERS_DIR)/mg/src/text/libmgtext.a \ $(INDEXERS_DIR)/mg/lib/libmglib.a \ $(INDEXERS_DIR)/mgpp/text/libmgpptext.a \ $(INDEXERS_DIR)/mgpp/lib/libmgpplib.a \ $(GSDL_DIR)/src/lib/gsdllib.a CORBASERVER_EXECUTABLE_OBJECTS = \ $(OBJECTS) \ $(CORBASERVER_OBJECTS) \ $(GSDL_LIBS) CORBARECPT_EXECUTABLE_OBJECTS = \ $(OBJECTS) \ $(CORBARECPT_OBJECTS) \ $(GSDL_LIBS) EXECUTABLES = corbaserver corbarecptldd # Default target: make both corbaserver and corbarecptldd all: $(EXECUTABLES) corbaserver: $(CORBASERVER_EXECUTABLE_OBJECTS) $(LINK) $(CORBASERVER_EXECUTABLE_OBJECTS) $(LIBS) corbarecptldd: $(CORBARECPT_EXECUTABLE_OBJECTS) $(LINK) $(CORBARECPT_EXECUTABLE_OBJECTS) $(LIBS) depend: makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES) install: clean: rm -f $(OBJECTS) $(CORBASERVER_OBJECTS) $(CORBARECPT_OBJECTS) $(EXECUTABLES) else all: depend: install: clean: endif # Want to do distclean regardless of whether or not been compiled # distclean needs to get rid of anything produced by ./configure such # as this makefile! distclean: clean rm -f Makefile