source: gs2-extensions/parallel-building/trunk/src/src/gdbmcli-src/Makefile.in@ 30297

Last change on this file since 30297 was 30297, checked in by jmt12, 9 years ago

Altering the Makefile.in to determine whether it is in GSDL2 or GSDL3 and then setting appropriate paths to GDBM files. This replaces the configure stuff, which wasn't working and looked to tricky to make conditional

File size: 3.0 KB
Line 
1###########################################################################
2#
3# Makefile -- parallel-building/src/gdbmcli-src
4#
5# Similar to txt2db (GDBM) executable in that you open a pipe to it and
6# write commands to be applied to a GDBM database. However, unlike txt2db,
7# this executable allows bidirectional streams (so you need to open the
8# pipe for both reading and writing). It then supports commands of this
9# form:
10#
11# \[<key>\][+\-\?]
12# (<value>)?
13# -{70}
14#
15# where: + is for add or update
16# - is for delete
17# ? is for lookup
18#
19# The aim of this executable is to allow a single, persistent, connection
20# to a GDBM database, accessed through some kind of queued daemon, so as
21# to support multiple readers and writers and thus parallel collection
22# building.
23#
24# A component of the Greenstone digital library software
25# from the New Zealand Digital Library Project at the
26# University of Waikato, New Zealand.
27#
28# Copyright (C) 2011-2020 The New Zealand Digital Library Project
29#
30#
31# This program is free software; you can redistribute it and/or modify
32# it under the terms of the GNU General Public License as published by
33# the Free Software Foundation; either version 2 of the License, or
34# (at your option) any later version.
35#
36# This program is distributed in the hope that it will be useful,
37# but WITHOUT ANY WARRANTY; without even the implied warranty of
38# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
39# GNU General Public License for more details.
40#
41# You should have received a copy of the GNU General Public License
42# along with this program; if not, write to the Free Software
43# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
44#
45###########################################################################
46
47ifndef GSDL3SRCHOME
48 GSDL_DIR = ../../../..
49else
50 GSDL_DIR = ${GSDL3SRCHOME}/gs2build
51endif
52COMMON_DIR = $(GSDL_DIR)/common-src
53COMMON_PACKAGES_DIR = $(COMMON_DIR)/packages
54
55CXX = @CXX@
56CXXFLAGS = @CXXFLAGS@
57DEFS = @DEFS@ $(JDBM_DEFINES) $(SQLITE_DEFINES)
58INCLUDES = -I. -I$(COMMON_PACKAGES_DIR)/gdbm/include -I$(COMMON_DIR)/src/lib -I${GEXTPARALLELBUILDING_INSTALLED}/include
59INSTALL = @INSTALL@
60LDFLAGS = @LDFLAGS@ -L${GEXTPARALLELBUILDING_INSTALLED}/lib
61LIBS = -lm -lg @LIBS@ -L$(COMMON_PACKAGES_DIR)/gdbm/lib -lgdbm $(COMMON_DIR)/src/lib/gsdllib.a
62
63
64CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
65CXXLINK = $(CXX) $(LDFLAGS) -o $@
66
67
68.SUFFIXES:
69.SUFFIXES: .cpp .o
70.cpp.o:
71 $(CXXCOMPILE) $<
72
73
74SOURCES = \
75 gdbmcli.cpp
76
77OBJECTS = \
78 gdbmcli.o
79
80EXECUTABLE_OBJECTS = \
81 $(OBJECTS)
82
83EXECUTABLE = gdbmcli
84
85
86# Default target: make the executable
87all: $(EXECUTABLE)
88
89gdbmcli: $(EXECUTABLE_OBJECTS)
90 $(CXXLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
91
92install: $(EXECUTABLE)
93 $(INSTALL) -d ${GEXTPARALLELBUILDING_INSTALLED}/bin
94 $(INSTALL) -m 755 -s $(EXECUTABLE) ${GEXTPARALLELBUILDING_INSTALLED}/bin
95
96clean:
97 rm -f $(OBJECTS) $(EXECUTABLE)
98
99distclean:
100 rm -f $(OBJECTS) $(EXECUTABLE) Makefile
101
102depend:
103 makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Note: See TracBrowser for help on using the repository browser.