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

Last change on this file since 22058 was 22058, checked in by ak19, 14 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
File size: 3.2 KB
RevLine 
[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]28COMMON_DIR = ../..
[1076]29
[18224]30INDEXERS_DIR = $(COMMON_DIR)/indexers
31COMMON_PACKAGES_DIR = $(COMMON_DIR)/packages
[15473]32
[18224]33
[15599]34USE_SQLITE = @USE_SQLITE@
35ifeq ($(USE_SQLITE), 1)
[18224]36SQLITE_INCLUDES = -I$(COMMON_PACKAGES_DIR)/sqlite/include
[22058]37SQLITE_SOURCES = sqlitedbclass.cpp
[15640]38SQLITE_OBJECTS = sqlitedbclass.o
[22058]39SQLITE_DEFINES = -DUSE_SQLITE
[15599]40else
41SQLITE_INCLUDES =
[22058]42SQLITE_SOURCES =
[15599]43SQLITE_OBJECTS =
[22058]44SQLITE_DEFINES =
[15599]45endif
46
[22058]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)
[21447]60JDBM_SOURCES = jdbmnaiveclass.cpp
61JDBM_OBJECTS = jdbmnaiveclass.o
[22058]62JDBM_DEFINES = -DUSE_JDBM
[21447]63else
64JDBM_SOURCES =
65JDBM_OBJECTS =
[22058]66JDBM_DEFINES =
[21447]67endif
[15599]68
[1076]69AR = ar
[15552]70CXX = @CXX@
71CXXFLAGS = @CXXFLAGS@ @COMPAT32BITFLAGS@
[22058]72DEFS = @DEFS@ $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES)
[21325]73INCLUDES = -I. -I$(COMMON_DIR) -I$(COMMON_PACKAGES_DIR)/gdbm/include $(SQLITE_INCLUDES)
[1076]74RANLIB = @RANLIB@
75
[15464]76
[15552]77CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
[1076]78
[15464]79
[1076]80.SUFFIXES:
81.SUFFIXES: .cpp .o
82.cpp.o:
[15552]83 $(CXXCOMPILE) $<
[1076]84
85
86SOURCES = \
[15464]87 cfgread.cpp \
88 cnfgable.cpp \
89 cnfgator.cpp \
90 dbclass.cpp \
91 display.cpp \
92 fileutil.cpp \
[22058]93 $(GDBM_SOURCES) \
[21447]94 $(JDBM_SOURCES) \
[15464]95 gsdlsitecfg.cpp \
96 gsdltimes.cpp \
97 gsdltools.cpp \
98 gsdlunicode.cpp \
99 infodbclass.cpp \
100 md5.cpp \
101 OIDtools.cpp \
102 phrases.cpp \
[22058]103 sqldbclass.cpp \
104 $(SQLITE_SOURCES) \
[15599]105 text_t.cpp \
[22058]106 unitool.cpp
[1076]107
108OBJECTS = \
[15464]109 cfgread.o \
110 cnfgable.o \
111 cnfgator.o \
112 dbclass.o \
113 display.o \
114 fileutil.o \
[22058]115 $(GDBM_OBJECTS) \
[21447]116 $(JDBM_OBJECTS) \
[15464]117 gsdlsitecfg.o \
118 gsdltimes.o \
119 gsdltools.o \
120 gsdlunicode.o \
121 infodbclass.o \
122 md5.o \
123 OIDtools.o \
124 phrases.o \
[22058]125 sqldbclass.o \
126 $(SQLITE_OBJECTS) \
[15599]127 text_t.o \
[22058]128 unitool.o
[1076]129
[15464]130LIBRARY = gsdllib.a
[1076]131
132
[15579]133# Default target: make gsdllib.a
134all: $(LIBRARY)
135
[15464]136gsdllib.a: $(OBJECTS)
[15579]137 rm -f $(LIBRARY)
138 $(AR) cru $(LIBRARY) $(OBJECTS)
139 $(RANLIB) $(LIBRARY)
[1076]140
[15580]141install:
[15464]142
[1076]143clean:
[15579]144 rm -f $(OBJECTS) $(LIBRARY)
[1076]145
[15464]146distclean:
[15579]147 rm -f $(OBJECTS) $(LIBRARY) Makefile
[1076]148
149depend:
[15552]150 makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Note: See TracBrowser for help on using the repository browser.