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

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

Changes to makefiles to 1. incorporate USE_GDBM and USE_JDBM flags (and USE_SQLITE) in most places so that the DEFINES variable is set at all times. This is necessary to ensure that all classes that contain objects with gdbm and jdbm members are of a consistent size. Else we've had experience with Greenstone crashing with memory errors (to do with the similar ENABLE_indexer flags). 2. ENABLE_JDBM is now USE_JDBM. 3. Not everything works now. It still compiles the default way, but the disable-gdbm flag is causing trouble when compiling argdb in recpt since it uses that.

  • 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_DEFINES = -DUSE_GDBM
52else
53GDBM_SOURCES =
54GDBM_OBJECTS =
55GDBM_DEFINES =
56endif
57
58USE_JDBM=@USE_JDBM@
59ifeq ($(USE_JDBM), 1)
60JDBM_SOURCES = jdbmnaiveclass.cpp
61JDBM_OBJECTS = jdbmnaiveclass.o
62JDBM_DEFINES = -DUSE_JDBM
63else
64JDBM_SOURCES =
65JDBM_OBJECTS =
66JDBM_DEFINES =
67endif
68
69AR = ar
70CXX = @CXX@
71CXXFLAGS = @CXXFLAGS@ @COMPAT32BITFLAGS@
72DEFS = @DEFS@ $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES)
73INCLUDES = -I. -I$(COMMON_DIR) -I$(COMMON_PACKAGES_DIR)/gdbm/include $(SQLITE_INCLUDES)
74RANLIB = @RANLIB@
75
76
77CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
78
79
80.SUFFIXES:
81.SUFFIXES: .cpp .o
82.cpp.o:
83    $(CXXCOMPILE) $<
84
85
86SOURCES = \
87    cfgread.cpp \
88    cnfgable.cpp \
89    cnfgator.cpp \
90    dbclass.cpp \
91    display.cpp \
92    fileutil.cpp \
93    $(GDBM_SOURCES) \
94    $(JDBM_SOURCES) \
95    gsdlsitecfg.cpp \
96    gsdltimes.cpp \
97    gsdltools.cpp \
98    gsdlunicode.cpp \
99    infodbclass.cpp \
100    md5.cpp \
101    OIDtools.cpp \
102    phrases.cpp \
103    sqldbclass.cpp \
104    $(SQLITE_SOURCES) \
105    text_t.cpp \
106    unitool.cpp
107
108OBJECTS = \
109    cfgread.o \
110    cnfgable.o \
111    cnfgator.o \
112    dbclass.o \
113    display.o \
114    fileutil.o \
115    $(GDBM_OBJECTS) \
116    $(JDBM_OBJECTS) \
117    gsdlsitecfg.o \
118    gsdltimes.o \
119    gsdltools.o \
120    gsdlunicode.o \
121    infodbclass.o \
122    md5.o \
123    OIDtools.o \
124    phrases.o \
125    sqldbclass.o \
126    $(SQLITE_OBJECTS) \
127    text_t.o \
128    unitool.o
129
130LIBRARY = gsdllib.a
131
132
133# Default target: make gsdllib.a
134all: $(LIBRARY)
135
136gsdllib.a: $(OBJECTS)
137    rm -f $(LIBRARY)
138    $(AR) cru $(LIBRARY) $(OBJECTS)
139    $(RANLIB) $(LIBRARY)
140
141install:
142
143clean:
144    rm -f $(OBJECTS) $(LIBRARY)
145
146distclean:
147    rm -f $(OBJECTS) $(LIBRARY) Makefile
148
149depend:
150    makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Note: See TracBrowser for help on using the browser.