[1076] | 1 | ###########################################################################
|
---|
| 2 | #
|
---|
| 3 | # Makefile -- lib
|
---|
| 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 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 | ###########################################################################
|
---|
| 26 |
|
---|
| 27 |
|
---|
| 28 | AR = ar
|
---|
| 29 | CC = @CC@
|
---|
[1860] | 30 | CPP = @CXX@
|
---|
[1283] | 31 | #CCFLAGS = @CFLAGS@ -Wall -Wunused -pedantic -W -Woverloaded-virtual
|
---|
| 32 | CCFLAGS = @CFLAGS@
|
---|
[2113] | 33 | MCFLAGS = -Wall -Wunused
|
---|
[1076] | 34 | DEFS = @DEFS@
|
---|
[1860] | 35 | INCLUDES = -I../packages/mg/lib -I..
|
---|
| 36 | MICO_DIR = @MICO_DIR@
|
---|
| 37 | ifeq ($(MICO_DIR), default)
|
---|
[2173] | 38 | MICO_INC = -I../packages/mico/mico/include
|
---|
| 39 | MICO_PATH = ../bin/linux/
|
---|
[1860] | 40 | else
|
---|
| 41 | ifeq ($(MICO_DIR), yes)
|
---|
| 42 | MICO_INC =
|
---|
| 43 | else
|
---|
| 44 | MICO_INC = -I$(MICO_DIR)
|
---|
| 45 | endif
|
---|
[2173] | 46 | MICO_PATH =
|
---|
[1860] | 47 | endif
|
---|
[2173] | 48 | 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..
|
---|
[1076] | 49 | RANLIB = @RANLIB@
|
---|
[1860] | 50 | USE_CORBA = @USE_CORBA@
|
---|
[1076] | 51 |
|
---|
| 52 | COMPILE = $(CC) -c $(CCFLAGS) $(DEFS) $(INCLUDES)
|
---|
[1860] | 53 | CPPCOMPILE = $(CPP) -c $(CCFLAGS) $(DEFS) $(INCLUDES)
|
---|
[1076] | 54 |
|
---|
[1860] | 55 | ifneq ($(USE_CORBA), 0)
|
---|
[2173] | 56 | MCOMPILE = $(MICO_PATH)mico-c++ -x c++ $(MCFLAGS) $(DEFS) $(MINCLUDES) -c
|
---|
[1860] | 57 | else
|
---|
| 58 | MCOMPILE = $(COMPILE)
|
---|
| 59 | endif
|
---|
| 60 |
|
---|
[1076] | 61 | .SUFFIXES:
|
---|
| 62 | .SUFFIXES: .c .o
|
---|
| 63 | .c.o:
|
---|
| 64 | $(COMPILE) $<
|
---|
| 65 |
|
---|
| 66 | .SUFFIXES: .cpp .o
|
---|
| 67 | .cpp.o:
|
---|
[1860] | 68 | $(CPPCOMPILE) $<
|
---|
[1076] | 69 |
|
---|
[1860] | 70 | .SUFFIXES: .mpp .o
|
---|
| 71 | .mpp.o:
|
---|
| 72 | $(MCOMPILE) $<
|
---|
[1076] | 73 |
|
---|
[1860] | 74 |
|
---|
[2233] | 75 |
|
---|
| 76 |
|
---|
[1860] | 77 | ifneq ($(USE_CORBA), 0)
|
---|
| 78 | CORBAHEADERS = \
|
---|
| 79 | corbaconv_text_t.h corbatext_t.h
|
---|
| 80 | CORBASOURCES = \
|
---|
[2173] | 81 | corbaiface.mpp corbatext_t.mpp corbaconv_text_t.mpp corbaiface_skel.mpp
|
---|
[1860] | 82 | CORBAOBJECTS = \
|
---|
[2175] | 83 | corbaiface.o corbatext_t.o corbaconv_text_t.o corbaiface_skel.o
|
---|
[1860] | 84 | else
|
---|
| 85 | CORBAHEADERS =
|
---|
| 86 | CORBASOURCE =
|
---|
| 87 | CORBAOBJECTS =
|
---|
| 88 | endif
|
---|
| 89 |
|
---|
[1076] | 90 | HEADERS = \
|
---|
[1860] | 91 | cfgread.h fileutil.h gsdlunicode.h gsdltools.h text_t.h \
|
---|
| 92 | display.h gsdlconf.h gsdltimes.h cnfgable.h cnfgator.h \
|
---|
| 93 | $(CORBAHEADERS)
|
---|
[1076] | 94 |
|
---|
[1860] | 95 |
|
---|
[1076] | 96 | SOURCES = \
|
---|
[1860] | 97 | cfgread.cpp fileutil.cpp text_t.cpp cnfgable.cpp \
|
---|
| 98 | display.cpp gsdlunicode.cpp gsdltimes.cpp gsdltools.cpp \
|
---|
| 99 | cnfgator.cpp $(CORBASOURCES)
|
---|
[1076] | 100 |
|
---|
| 101 | OBJECTS = \
|
---|
[1860] | 102 | cfgread.o fileutil.o text_t.o cnfgable.o \
|
---|
| 103 | display.o gsdlunicode.o gsdltimes.o gsdltools.o \
|
---|
| 104 | cnfgator.o $(CORBAOBJECTS)
|
---|
[1076] | 105 |
|
---|
| 106 |
|
---|
| 107 | all: gsdllib.a
|
---|
[2233] | 108 | corbaiface_skel.h: corbaiface.idl
|
---|
[2907] | 109 | LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH PATH=$(MICO_PATH):$(PATH) idl --boa --no-poa --c++-skel --c++-suffix=mpp $?
|
---|
[2233] | 110 | corbaiface_skel.mpp: corbaiface.idl
|
---|
[2907] | 111 | LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH PATH=$(MICO_PATH):$(PATH) idl --boa --no-poa --c++-skel --c++-suffix=mpp $?
|
---|
[1860] | 112 | corbaiface.mpp: corbaiface.idl
|
---|
[2907] | 113 | LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH PATH=$(MICO_PATH):$(PATH) idl --boa --no-poa --c++-skel --c++-suffix=mpp $?
|
---|
[1076] | 114 |
|
---|
| 115 | GSDLLIBOBJECTS = $(OBJECTS)
|
---|
| 116 |
|
---|
| 117 | gsdllib.a: $(GSDLLIBOBJECTS)
|
---|
| 118 | rm -f gsdllib.a
|
---|
| 119 | $(AR) cru gsdllib.a $(GSDLLIBOBJECTS)
|
---|
| 120 | $(RANLIB) gsdllib.a
|
---|
| 121 |
|
---|
| 122 | clean:
|
---|
[2173] | 123 | rm -f $(OBJECTS) gsdllib.a corbaiface_skel.mpp corbaiface.h corbaiface.mpp
|
---|
[1076] | 124 |
|
---|
[1939] | 125 | distclean: clean
|
---|
| 126 | rm -f Makefile
|
---|
[1076] | 127 | install:
|
---|
| 128 |
|
---|
| 129 | depend:
|
---|
| 130 | makedepend -Y -- $(DEFS) $(INCLUDES) $(CCFLAGS) -- $(SOURCES)
|
---|
[1860] | 131 |
|
---|
| 132 |
|
---|
| 133 |
|
---|
| 134 |
|
---|