[12844] | 1 | ###########################################################################
|
---|
| 2 | #
|
---|
[18224] | 3 | # Makefile -- common-src/src/gdbmedit/gdbmset
|
---|
[12844] | 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 | #
|
---|
[15932] | 8 | # Copyright (C) 1999-2008 The New Zealand Digital Library Project
|
---|
[12844] | 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 |
|
---|
[16603] | 27 | GSDL_DIR = ../../../..
|
---|
[16605] | 28 | COMMON_DIR = $(GSDL_DIR)/common-src
|
---|
[15932] | 29 |
|
---|
[18224] | 30 | COMMON_PACKAGES_DIR = $(COMMON_DIR)/packages
|
---|
| 31 |
|
---|
[22058] | 32 | USE_GDBM = @USE_GDBM@
|
---|
| 33 | ifeq ($(USE_GDBM), 1)
|
---|
| 34 | GDBM_DEFINES = -DUSE_GDBM
|
---|
| 35 | else
|
---|
| 36 | GDBM_DEFINES =
|
---|
| 37 | endif
|
---|
[18224] | 38 |
|
---|
[22058] | 39 | USE_JDBM = @USE_JDBM@
|
---|
| 40 | ifeq ($(USE_JDBM), 1)
|
---|
| 41 | JDBM_DEFINES = -DUSE_JDBM
|
---|
| 42 | else
|
---|
| 43 | JDBM_DEFINES =
|
---|
| 44 | endif
|
---|
| 45 |
|
---|
| 46 | USE_SQLITE = @USE_SQLITE@
|
---|
| 47 | ifeq ($(USE_SQLITE), 1)
|
---|
| 48 | SQLITE_DEFINES = -DUSE_SQLITE
|
---|
| 49 | else
|
---|
| 50 | SQLITE_DEFINES =
|
---|
| 51 | endif
|
---|
| 52 |
|
---|
[15551] | 53 | CXX = @CXX@
|
---|
[15932] | 54 | CXXFLAGS = @CXXFLAGS@ @COMPAT32BITFLAGS@
|
---|
[22058] | 55 | DEFS = @DEFS@ $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES)
|
---|
[15932] | 56 | GSDLOS = @gsdlos@
|
---|
[18224] | 57 | INCLUDES = -I$(COMMON_PACKAGES_DIR)/gdbm/include -I$(COMMON_DIR)/src/lib
|
---|
[15932] | 58 | INSTALL = @INSTALL@
|
---|
[15551] | 59 | LDFLAGS = @LDFLAGS@ @COMPAT32BITFLAGS@
|
---|
[18224] | 60 | LIBS = @LIBS@ $(COMMON_PACKAGES_DIR)/gdbm/lib/libgdbm.a
|
---|
[15932] | 61 |
|
---|
| 62 |
|
---|
| 63 | CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
|
---|
[15551] | 64 | CXXLINK = $(CXX) $(LDFLAGS) -o $@
|
---|
[15932] | 65 |
|
---|
| 66 |
|
---|
[12844] | 67 | .SUFFIXES:
|
---|
| 68 | .SUFFIXES: .cpp .o
|
---|
| 69 | .cpp.o:
|
---|
[15551] | 70 | $(CXXCOMPILE) $<
|
---|
[12844] | 71 |
|
---|
| 72 |
|
---|
[15932] | 73 | SOURCES = \
|
---|
| 74 | gdbmset.cpp
|
---|
[12844] | 75 |
|
---|
[15932] | 76 | OBJECTS = \
|
---|
[15936] | 77 | gdbmset.o
|
---|
[12844] | 78 |
|
---|
[15932] | 79 | EXECUTABLE_OBJECTS = \
|
---|
| 80 | $(OBJECTS)
|
---|
[12844] | 81 |
|
---|
[15932] | 82 | EXECUTABLE = gdbmset
|
---|
[12844] | 83 |
|
---|
| 84 |
|
---|
[15932] | 85 | # Default target: make the gdbmset executable
|
---|
| 86 | all: $(EXECUTABLE)
|
---|
[12844] | 87 |
|
---|
[15932] | 88 | gdbmset: $(EXECUTABLE_OBJECTS)
|
---|
| 89 | $(CXXLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
|
---|
[12844] | 90 |
|
---|
[15932] | 91 | install: $(EXECUTABLE)
|
---|
| 92 | $(INSTALL) -d $(GSDL_DIR)/bin/$(GSDLOS)
|
---|
| 93 | $(INSTALL) -m 755 -s $(EXECUTABLE) $(GSDL_DIR)/bin/$(GSDLOS)
|
---|
[12844] | 94 |
|
---|
[15932] | 95 | clean:
|
---|
| 96 | rm -f $(OBJECTS) $(EXECUTABLE)
|
---|
[12844] | 97 |
|
---|
[15932] | 98 | distclean:
|
---|
| 99 | rm -f $(OBJECTS) $(EXECUTABLE) Makefile
|
---|
| 100 |
|
---|
| 101 | depend:
|
---|
| 102 | makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
|
---|