source: gs2-extensions/parallel-building/trunk/src/src/txt2dbl-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: 2.5 KB
Line 
1###########################################################################
2#
3# Makefile -- parallel-building/src/txt2dbl-src
4#
5# Standard txt2db (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
31ifndef GSDL3SRCHOME
32 GSDL_DIR = ../../../..
33else
34 GSDL_DIR = ${GSDL3SRCHOME}/gs2build
35endif
36COMMON_DIR = $(GSDL_DIR)/common-src
37
38COMMON_PACKAGES_DIR = $(COMMON_DIR)/packages
39
40CXX = @CXX@
41CXXFLAGS = @CXXFLAGS@
42DEFS = @DEFS@ $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES)
43INCLUDES = -I. -I$(COMMON_PACKAGES_DIR)/gdbm/include -I$(COMMON_DIR)/src/lib -I${GEXTPARALLELBUILDING_INSTALLED}/include
44INSTALL = @INSTALL@
45LDFLAGS = @LDFLAGS@ -L${GEXTPARALLELBUILDING_INSTALLED}/lib
46LIBS = -lm -lg @LIBS@ -L$(COMMON_PACKAGES_DIR)/gdbm/lib -lgdbm $(COMMON_DIR)/src/lib/gsdllib.a
47
48
49CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
50CXXLINK = $(CXX) $(LDFLAGS) -o $@
51
52
53.SUFFIXES:
54.SUFFIXES: .cpp .o
55.cpp.o:
56 $(CXXCOMPILE) $<
57
58
59SOURCES = \
60 txt2dbl.cpp
61
62OBJECTS = \
63 txt2dbl.o
64
65EXECUTABLE_OBJECTS = \
66 $(OBJECTS)
67
68EXECUTABLE = txt2dbl
69
70
71# Default target: make the txt2tdb executable
72all: $(EXECUTABLE)
73
74txt2dbl: $(EXECUTABLE_OBJECTS)
75 $(CXXLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
76
77install: $(EXECUTABLE)
78 $(INSTALL) -d ${GEXTPARALLELBUILDING_INSTALLED}/bin
79 $(INSTALL) -m 755 -s $(EXECUTABLE) ${GEXTPARALLELBUILDING_INSTALLED}/bin
80
81clean:
82 rm -f $(OBJECTS) $(EXECUTABLE)
83
84distclean:
85 rm -f $(OBJECTS) $(EXECUTABLE) Makefile
86
87depend:
88 makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
Note: See TracBrowser for help on using the repository browser.