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

Last change on this file since 21447 was 21447, checked in by ak19, 14 years ago

Now compilation of jdbmnaiveclass only happens when ENABLE_JDBM is set.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 KB
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_OBJECTS = sqlitedbclass.o
38SQLITE_SOURCES = sqlitedbclass.cpp
39else
40SQLITE_INCLUDES =
41SQLITE_OBJECTS =
42SQLITE_SOURCES =
43endif
44
45ENABLE_JDBM=@ENABLE_JDBM@
46ifeq ($(ENABLE_JDBM), 1)
47JDBM_SOURCES = jdbmnaiveclass.cpp
48JDBM_OBJECTS = jdbmnaiveclass.o
49else
50JDBM_SOURCES =
51JDBM_OBJECTS =
52endif
53
54AR = ar
55CXX = @CXX@
56CXXFLAGS = @CXXFLAGS@ @COMPAT32BITFLAGS@
57DEFS = @DEFS@
58INCLUDES = -I. -I$(COMMON_DIR) -I$(COMMON_PACKAGES_DIR)/gdbm/include $(SQLITE_INCLUDES)
59RANLIB = @RANLIB@
60
61
62CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
63
64
65.SUFFIXES:
66.SUFFIXES: .cpp .o
67.cpp.o:
68 $(CXXCOMPILE) $<
69
70
71SOURCES = \
72 cfgread.cpp \
73 cnfgable.cpp \
74 cnfgator.cpp \
75 dbclass.cpp \
76 display.cpp \
77 fileutil.cpp \
78 gdbmclass.cpp \
79 $(JDBM_SOURCES) \
80 gsdlsitecfg.cpp \
81 gsdltimes.cpp \
82 gsdltools.cpp \
83 gsdlunicode.cpp \
84 infodbclass.cpp \
85 md5.cpp \
86 OIDtools.cpp \
87 phrases.cpp \
88 text_t.cpp \
89 unitool.cpp \
90 $(SQLITE_SOURCES)
91
92OBJECTS = \
93 cfgread.o \
94 cnfgable.o \
95 cnfgator.o \
96 dbclass.o \
97 display.o \
98 fileutil.o \
99 gdbmclass.o \
100 $(JDBM_OBJECTS) \
101 gsdlsitecfg.o \
102 gsdltimes.o \
103 gsdltools.o \
104 gsdlunicode.o \
105 infodbclass.o \
106 md5.o \
107 OIDtools.o \
108 phrases.o \
109 text_t.o \
110 unitool.o \
111 $(SQLITE_OBJECTS)
112
113LIBRARY = gsdllib.a
114
115
116# Default target: make gsdllib.a
117all: $(LIBRARY)
118
119gsdllib.a: $(OBJECTS)
120 rm -f $(LIBRARY)
121 $(AR) cru $(LIBRARY) $(OBJECTS)
122 $(RANLIB) $(LIBRARY)
123
124install:
125
126clean:
127 rm -f $(OBJECTS) $(LIBRARY)
128
129distclean:
130 rm -f $(OBJECTS) $(LIBRARY) Makefile
131
132depend:
133 makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Note: See TracBrowser for help on using the repository browser.