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