[1076] | 1 | ###########################################################################
|
---|
| 2 | #
|
---|
[18224] | 3 | # Makefile -- common-src/src/lib
|
---|
[1076] | 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 | #
|
---|
[15465] | 8 | # Copyright (C) 1999-2008 The New Zealand Digital Library Project
|
---|
[1076] | 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 |
|
---|
[19875] | 27 | #GSDL_DIR = ../../..
|
---|
[19966] | 28 | COMMON_DIR = ../..
|
---|
[1076] | 29 |
|
---|
[18224] | 30 | INDEXERS_DIR = $(COMMON_DIR)/indexers
|
---|
| 31 | COMMON_PACKAGES_DIR = $(COMMON_DIR)/packages
|
---|
[15473] | 32 |
|
---|
[18224] | 33 |
|
---|
[15599] | 34 | USE_SQLITE = @USE_SQLITE@
|
---|
| 35 | ifeq ($(USE_SQLITE), 1)
|
---|
[18224] | 36 | SQLITE_INCLUDES = -I$(COMMON_PACKAGES_DIR)/sqlite/include
|
---|
[15640] | 37 | SQLITE_OBJECTS = sqlitedbclass.o
|
---|
| 38 | SQLITE_SOURCES = sqlitedbclass.cpp
|
---|
[15599] | 39 | else
|
---|
| 40 | SQLITE_INCLUDES =
|
---|
| 41 | SQLITE_OBJECTS =
|
---|
| 42 | SQLITE_SOURCES =
|
---|
| 43 | endif
|
---|
| 44 |
|
---|
| 45 |
|
---|
[1076] | 46 | AR = ar
|
---|
[15552] | 47 | CXX = @CXX@
|
---|
| 48 | CXXFLAGS = @CXXFLAGS@ @COMPAT32BITFLAGS@
|
---|
[1076] | 49 | DEFS = @DEFS@
|
---|
[21325] | 50 | INCLUDES = -I. -I$(COMMON_DIR) -I$(COMMON_PACKAGES_DIR)/gdbm/include $(SQLITE_INCLUDES)
|
---|
[1076] | 51 | RANLIB = @RANLIB@
|
---|
| 52 |
|
---|
[15464] | 53 |
|
---|
[15552] | 54 | CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
|
---|
[1076] | 55 |
|
---|
[15464] | 56 |
|
---|
[1076] | 57 | .SUFFIXES:
|
---|
| 58 | .SUFFIXES: .cpp .o
|
---|
| 59 | .cpp.o:
|
---|
[15552] | 60 | $(CXXCOMPILE) $<
|
---|
[1076] | 61 |
|
---|
| 62 |
|
---|
| 63 | SOURCES = \
|
---|
[15464] | 64 | cfgread.cpp \
|
---|
| 65 | cnfgable.cpp \
|
---|
| 66 | cnfgator.cpp \
|
---|
| 67 | dbclass.cpp \
|
---|
| 68 | display.cpp \
|
---|
| 69 | fileutil.cpp \
|
---|
| 70 | gdbmclass.cpp \
|
---|
| 71 | gsdlsitecfg.cpp \
|
---|
| 72 | gsdltimes.cpp \
|
---|
| 73 | gsdltools.cpp \
|
---|
| 74 | gsdlunicode.cpp \
|
---|
| 75 | infodbclass.cpp \
|
---|
| 76 | md5.cpp \
|
---|
| 77 | OIDtools.cpp \
|
---|
| 78 | phrases.cpp \
|
---|
[15599] | 79 | text_t.cpp \
|
---|
[21325] | 80 | unitool.cpp \
|
---|
[15599] | 81 | $(SQLITE_SOURCES)
|
---|
[1076] | 82 |
|
---|
| 83 | OBJECTS = \
|
---|
[15464] | 84 | cfgread.o \
|
---|
| 85 | cnfgable.o \
|
---|
| 86 | cnfgator.o \
|
---|
| 87 | dbclass.o \
|
---|
| 88 | display.o \
|
---|
| 89 | fileutil.o \
|
---|
| 90 | gdbmclass.o \
|
---|
| 91 | gsdlsitecfg.o \
|
---|
| 92 | gsdltimes.o \
|
---|
| 93 | gsdltools.o \
|
---|
| 94 | gsdlunicode.o \
|
---|
| 95 | infodbclass.o \
|
---|
| 96 | md5.o \
|
---|
| 97 | OIDtools.o \
|
---|
| 98 | phrases.o \
|
---|
[15599] | 99 | text_t.o \
|
---|
[21325] | 100 | unitool.o \
|
---|
[15599] | 101 | $(SQLITE_OBJECTS)
|
---|
[1076] | 102 |
|
---|
[15464] | 103 | LIBRARY = gsdllib.a
|
---|
[1076] | 104 |
|
---|
| 105 |
|
---|
[15579] | 106 | # Default target: make gsdllib.a
|
---|
| 107 | all: $(LIBRARY)
|
---|
| 108 |
|
---|
[15464] | 109 | gsdllib.a: $(OBJECTS)
|
---|
[15579] | 110 | rm -f $(LIBRARY)
|
---|
| 111 | $(AR) cru $(LIBRARY) $(OBJECTS)
|
---|
| 112 | $(RANLIB) $(LIBRARY)
|
---|
[1076] | 113 |
|
---|
[15580] | 114 | install:
|
---|
[15464] | 115 |
|
---|
[1076] | 116 | clean:
|
---|
[15579] | 117 | rm -f $(OBJECTS) $(LIBRARY)
|
---|
[1076] | 118 |
|
---|
[15464] | 119 | distclean:
|
---|
[15579] | 120 | rm -f $(OBJECTS) $(LIBRARY) Makefile
|
---|
[1076] | 121 |
|
---|
| 122 | depend:
|
---|
[15552] | 123 | makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
|
---|