########################################################################### # # Makefile -- lib # 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 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. # ########################################################################### AR = ar CC = @CC@ CPP = @CXX@ #CCFLAGS = @CFLAGS@ -Wall -Wunused -pedantic -W -Woverloaded-virtual CCFLAGS = @CFLAGS@ MCFLAGS = -Wall -Wunused DEFS = @DEFS@ INCLUDES = -I../packages/mg/lib -I.. MICO_DIR = @MICO_DIR@ ifeq ($(MICO_DIR), default) MICO_INC = -I../packages/mico/mico/include MICO_PATH = ../bin/linux/ else ifeq ($(MICO_DIR), yes) MICO_INC = else MICO_INC = -I$(MICO_DIR) endif MICO_PATH = endif MINCLUDES = -I/usr/include/g++-2/ -I/usr/lib/gcc-lib/i386-slackware-linux/egcs-2.91.66/include/ -I/usr/include -I. -I../packages/mg/lib $(MICO_INC) -I.. RANLIB = @RANLIB@ USE_CORBA = @USE_CORBA@ COMPILE = $(CC) -c $(CCFLAGS) $(DEFS) $(INCLUDES) CPPCOMPILE = $(CPP) -c $(CCFLAGS) $(DEFS) $(INCLUDES) ifneq ($(USE_CORBA), 0) MCOMPILE = $(MICO_PATH)mico-c++ -x c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c else MCOMPILE = $(COMPILE) endif .SUFFIXES: .SUFFIXES: .c .o .c.o: $(COMPILE) $< .SUFFIXES: .cpp .o .cpp.o: $(CPPCOMPILE) $< .SUFFIXES: .mpp .o .mpp.o: $(MCOMPILE) $< ifneq ($(USE_CORBA), 0) CORBAHEADERS = \ corbaconv_text_t.h corbatext_t.h CORBASOURCES = \ corbaiface.mpp corbatext_t.mpp corbaconv_text_t.mpp corbaiface_skel.mpp CORBAOBJECTS = \ corbaiface.o corbatext_t.o corbaconv_text_t.o corbaiface_skel.o else CORBAHEADERS = CORBASOURCE = CORBAOBJECTS = endif HEADERS = \ cfgread.h fileutil.h gsdlunicode.h gsdltools.h text_t.h \ display.h gsdlconf.h gsdltimes.h cnfgable.h cnfgator.h \ $(CORBAHEADERS) SOURCES = \ cfgread.cpp fileutil.cpp text_t.cpp cnfgable.cpp \ display.cpp gsdlunicode.cpp gsdltimes.cpp gsdltools.cpp \ cnfgator.cpp $(CORBASOURCES) OBJECTS = \ cfgread.o fileutil.o text_t.o cnfgable.o \ display.o gsdlunicode.o gsdltimes.o gsdltools.o \ cnfgator.o $(CORBAOBJECTS) all: gsdllib.a corbaiface_skel.h: corbaiface.idl idl --boa --no-poa --c++-skel --c++-suffix=mpp $? corbaiface_skel.mpp: corbaiface.idl idl --boa --no-poa --c++-skel --c++-suffix=mpp $? corbaiface.mpp: corbaiface.idl idl --boa --no-poa --c++-skel --c++-suffix=mpp $? GSDLLIBOBJECTS = $(OBJECTS) gsdllib.a: $(GSDLLIBOBJECTS) rm -f gsdllib.a $(AR) cru gsdllib.a $(GSDLLIBOBJECTS) $(RANLIB) gsdllib.a clean: rm -f $(OBJECTS) gsdllib.a corbaiface_skel.mpp corbaiface.h corbaiface.mpp distclean: clean rm -f Makefile install: depend: makedepend -Y -- $(DEFS) $(INCLUDES) $(CCFLAGS) -- $(SOURCES)