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