[552] | 1 | ###########################################################################
|
---|
| 2 | #
|
---|
[18224] | 3 | # Makefile -- common-src/src/gdbmedit/txt2db
|
---|
[558] | 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.
|
---|
[552] | 7 | #
|
---|
[15931] | 8 | # Copyright (C) 1999-2008 The New Zealand Digital Library Project
|
---|
[558] | 9 | #
|
---|
[15931] | 10 | #
|
---|
[552] | 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 |
|
---|
[16603] | 27 | GSDL_DIR = ../../../..
|
---|
[16605] | 28 | COMMON_DIR = $(GSDL_DIR)/common-src
|
---|
[15931] | 29 |
|
---|
[18224] | 30 | COMMON_PACKAGES_DIR = $(COMMON_DIR)/packages
|
---|
| 31 |
|
---|
[15551] | 32 | CXX = @CXX@
|
---|
[25149] | 33 | CXXFLAGS = @CXXFLAGS@ @ARCH_DEP_FLAGS@
|
---|
[22058] | 34 | DEFS = @DEFS@ $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES)
|
---|
[558] | 35 | GSDLOS = @gsdlos@
|
---|
[18224] | 36 | INCLUDES = -I$(COMMON_PACKAGES_DIR)/gdbm/include -I$(COMMON_DIR)/src/lib
|
---|
[26821] | 37 |
|
---|
| 38 | STRIP = @STRIP@
|
---|
[2900] | 39 | INSTALL = @INSTALL@
|
---|
[25149] | 40 | LDFLAGS = @LDFLAGS@ @ARCH_DEP_FLAGS@
|
---|
[18224] | 41 | LIBS = @LIBS@ $(COMMON_PACKAGES_DIR)/gdbm/lib/libgdbm.a
|
---|
[15931] | 42 |
|
---|
| 43 |
|
---|
| 44 | CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
|
---|
[15551] | 45 | CXXLINK = $(CXX) $(LDFLAGS) -o $@
|
---|
[15931] | 46 |
|
---|
| 47 |
|
---|
[552] | 48 | .SUFFIXES:
|
---|
| 49 | .SUFFIXES: .cpp .o
|
---|
| 50 | .cpp.o:
|
---|
[15551] | 51 | $(CXXCOMPILE) $<
|
---|
[552] | 52 |
|
---|
| 53 |
|
---|
[15931] | 54 | SOURCES = \
|
---|
| 55 | txt2db.cpp
|
---|
[552] | 56 |
|
---|
[15931] | 57 | OBJECTS = \
|
---|
[15936] | 58 | txt2db.o
|
---|
[552] | 59 |
|
---|
[15931] | 60 | GSDL_LIBS = \
|
---|
[21325] | 61 | $(COMMON_DIR)/src/lib/gsdllib.a
|
---|
[552] | 62 |
|
---|
[15931] | 63 | EXECUTABLE_OBJECTS = \
|
---|
| 64 | $(OBJECTS) \
|
---|
| 65 | $(GSDL_LIBS)
|
---|
[552] | 66 |
|
---|
[15931] | 67 | EXECUTABLE = txt2db
|
---|
[992] | 68 |
|
---|
[552] | 69 |
|
---|
[15931] | 70 | # Default target: make the txt2db executable
|
---|
| 71 | all: $(EXECUTABLE)
|
---|
[552] | 72 |
|
---|
[15931] | 73 | txt2db: $(EXECUTABLE_OBJECTS)
|
---|
| 74 | $(CXXLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
|
---|
[552] | 75 |
|
---|
[15931] | 76 | install: $(EXECUTABLE)
|
---|
| 77 | $(INSTALL) -d $(GSDL_DIR)/bin/$(GSDLOS)
|
---|
[26821] | 78 | $(STRIP) $(EXECUTABLE)
|
---|
| 79 | $(INSTALL) -m 755 $(EXECUTABLE) $(GSDL_DIR)/bin/$(GSDLOS)
|
---|
[552] | 80 |
|
---|
[15931] | 81 | clean:
|
---|
| 82 | rm -f $(OBJECTS) $(EXECUTABLE)
|
---|
[552] | 83 |
|
---|
[15931] | 84 | distclean:
|
---|
| 85 | rm -f $(OBJECTS) $(EXECUTABLE) Makefile
|
---|
[579] | 86 |
|
---|
[15931] | 87 | depend:
|
---|
| 88 | makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
|
---|