1 | ###########################################################################
|
---|
2 | #
|
---|
3 | # Makefile -- parallel-building/src/db2txtl-src
|
---|
4 | #
|
---|
5 | # Standard db2txt (GDBM) executable but augmented with file locking so as
|
---|
6 | # to support parallel reads/writes
|
---|
7 | #
|
---|
8 | # A component of the Greenstone digital library software
|
---|
9 | # from the New Zealand Digital Library Project at the
|
---|
10 | # University of Waikato, New Zealand.
|
---|
11 | #
|
---|
12 | # Copyright (C) 1999-2008 The New Zealand Digital Library Project
|
---|
13 | #
|
---|
14 | #
|
---|
15 | # This program is free software; you can redistribute it and/or modify
|
---|
16 | # it under the terms of the GNU General Public License as published by
|
---|
17 | # the Free Software Foundation; either version 2 of the License, or
|
---|
18 | # (at your option) any later version.
|
---|
19 | #
|
---|
20 | # This program is distributed in the hope that it will be useful,
|
---|
21 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
22 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
23 | # GNU General Public License for more details.
|
---|
24 | #
|
---|
25 | # You should have received a copy of the GNU General Public License
|
---|
26 | # along with this program; if not, write to the Free Software
|
---|
27 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
28 | #
|
---|
29 | ###########################################################################
|
---|
30 |
|
---|
31 | ifndef GSDL3SRCHOME
|
---|
32 | GSDL_DIR = ../../../..
|
---|
33 | else
|
---|
34 | GSDL_DIR = ${GSDL3SRCHOME}/gs2build
|
---|
35 | endif
|
---|
36 | COMMON_DIR = $(GSDL_DIR)/common-src
|
---|
37 | COMMON_PACKAGES_DIR = $(COMMON_DIR)/packages
|
---|
38 |
|
---|
39 | CXX = @CXX@
|
---|
40 | CXXFLAGS = @CXXFLAGS@
|
---|
41 | DEFS = @DEFS@ $(JDBM_DEFINES) $(SQLITE_DEFINES)
|
---|
42 | INCLUDES = -I. -I$(COMMON_PACKAGES_DIR)/gdbm/include -I$(COMMON_DIR)/src/lib -I${GEXTPARALLELBUILDING_INSTALLED}/include
|
---|
43 | INSTALL = @INSTALL@
|
---|
44 | LDFLAGS = @LDFLAGS@ -L${GEXTPARALLELBUILDING_INSTALLED}/lib
|
---|
45 | LIBS = -lm -lg @LIBS@ -L$(COMMON_PACKAGES_DIR)/gdbm/lib -lgdbm $(COMMON_DIR)/src/lib/gsdllib.a
|
---|
46 |
|
---|
47 |
|
---|
48 | CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
|
---|
49 | CXXLINK = $(CXX) $(LDFLAGS) -o $@
|
---|
50 |
|
---|
51 |
|
---|
52 | .SUFFIXES:
|
---|
53 | .SUFFIXES: .cpp .o
|
---|
54 | .cpp.o:
|
---|
55 | $(CXXCOMPILE) $<
|
---|
56 |
|
---|
57 |
|
---|
58 | SOURCES = \
|
---|
59 | db2txtl.cpp
|
---|
60 |
|
---|
61 | OBJECTS = \
|
---|
62 | db2txtl.o
|
---|
63 |
|
---|
64 | EXECUTABLE_OBJECTS = \
|
---|
65 | $(OBJECTS)
|
---|
66 |
|
---|
67 | EXECUTABLE = db2txtl
|
---|
68 |
|
---|
69 |
|
---|
70 | # Default target: make the db2txt executable
|
---|
71 | all: $(EXECUTABLE)
|
---|
72 |
|
---|
73 | db2txtl: $(EXECUTABLE_OBJECTS)
|
---|
74 | $(CXXLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
|
---|
75 |
|
---|
76 | install: $(EXECUTABLE)
|
---|
77 | $(INSTALL) -d ${GEXTPARALLELBUILDING_INSTALLED}/bin
|
---|
78 | $(INSTALL) -m 755 -s $(EXECUTABLE) ${GEXTPARALLELBUILDING_INSTALLED}/bin
|
---|
79 |
|
---|
80 | clean:
|
---|
81 | rm -f $(OBJECTS) $(EXECUTABLE)
|
---|
82 |
|
---|
83 | distclean:
|
---|
84 | rm -f $(OBJECTS) $(EXECUTABLE) Makefile
|
---|
85 |
|
---|
86 | depend:
|
---|
87 | makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
|
---|