root/main/trunk/greenstone2/common-src/src/lib/Makefile.in @ 22079

Revision 22079, 3.2 KB (checked in by ak19, 10 years ago)

1. Missing conditional LIBS or INCLUDES or DIR declaration for when USE_GDBM is switched on. Previously it used to always put these in the includes/libs, not it only does so on USE_GDBM.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1###########################################################################
2#
3# Makefile -- common-src/src/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-2008  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#GSDL_DIR = ../../..
28COMMON_DIR = ../..
29
30INDEXERS_DIR = $(COMMON_DIR)/indexers
31COMMON_PACKAGES_DIR = $(COMMON_DIR)/packages
32
33
34USE_SQLITE = @USE_SQLITE@
35ifeq ($(USE_SQLITE), 1)
36SQLITE_INCLUDES = -I$(COMMON_PACKAGES_DIR)/sqlite/include
37SQLITE_SOURCES = sqlitedbclass.cpp
38SQLITE_OBJECTS = sqlitedbclass.o
39SQLITE_DEFINES = -DUSE_SQLITE
40else
41SQLITE_INCLUDES =
42SQLITE_SOURCES =
43SQLITE_OBJECTS =
44SQLITE_DEFINES =
45endif
46
47USE_GDBM=@USE_GDBM@
48ifeq ($(USE_GDBM), 1)
49GDBM_SOURCES = gdbmclass.cpp
50GDBM_OBJECTS = gdbmclass.o
51GDBM_INCLUDES = -I$(COMMON_PACKAGES_DIR)/gdbm/include
52GDBM_DEFINES = -DUSE_GDBM
53else
54GDBM_SOURCES =
55GDBM_OBJECTS =
56GDBM_INCLUDES =
57GDBM_DEFINES =
58endif
59
60USE_JDBM=@USE_JDBM@
61ifeq ($(USE_JDBM), 1)
62JDBM_SOURCES = jdbmnaiveclass.cpp
63JDBM_OBJECTS = jdbmnaiveclass.o
64JDBM_DEFINES = -DUSE_JDBM
65else
66JDBM_SOURCES =
67JDBM_OBJECTS =
68JDBM_DEFINES =
69endif
70
71AR = ar
72CXX = @CXX@
73CXXFLAGS = @CXXFLAGS@ @COMPAT32BITFLAGS@
74DEFS = @DEFS@ $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES)
75INCLUDES = -I. -I$(COMMON_DIR) $(GDBM_INCLUDES) $(SQLITE_INCLUDES)
76RANLIB = @RANLIB@
77
78
79CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
80
81
82.SUFFIXES:
83.SUFFIXES: .cpp .o
84.cpp.o:
85    $(CXXCOMPILE) $<
86
87
88SOURCES = \
89    cfgread.cpp \
90    cnfgable.cpp \
91    cnfgator.cpp \
92    dbclass.cpp \
93    display.cpp \
94    fileutil.cpp \
95    $(GDBM_SOURCES) \
96    $(JDBM_SOURCES) \
97    gsdlsitecfg.cpp \
98    gsdltimes.cpp \
99    gsdltools.cpp \
100    gsdlunicode.cpp \
101    infodbclass.cpp \
102    md5.cpp \
103    OIDtools.cpp \
104    phrases.cpp \
105    sqldbclass.cpp \
106    $(SQLITE_SOURCES) \
107    text_t.cpp \
108    unitool.cpp
109
110OBJECTS = \
111    cfgread.o \
112    cnfgable.o \
113    cnfgator.o \
114    dbclass.o \
115    display.o \
116    fileutil.o \
117    $(GDBM_OBJECTS) \
118    $(JDBM_OBJECTS) \
119    gsdlsitecfg.o \
120    gsdltimes.o \
121    gsdltools.o \
122    gsdlunicode.o \
123    infodbclass.o \
124    md5.o \
125    OIDtools.o \
126    phrases.o \
127    sqldbclass.o \
128    $(SQLITE_OBJECTS) \
129    text_t.o \
130    unitool.o
131
132LIBRARY = gsdllib.a
133
134
135# Default target: make gsdllib.a
136all: $(LIBRARY)
137
138gsdllib.a: $(OBJECTS)
139    rm -f $(LIBRARY)
140    $(AR) cru $(LIBRARY) $(OBJECTS)
141    $(RANLIB) $(LIBRARY)
142
143install:
144
145clean:
146    rm -f $(OBJECTS) $(LIBRARY)
147
148distclean:
149    rm -f $(OBJECTS) $(LIBRARY) Makefile
150
151depend:
152    makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Note: See TracBrowser for help on using the browser.