[17496] | 1 | ###########################################################################
|
---|
| 2 | #
|
---|
| 3 | # Makefile for search4j used by Greenstone
|
---|
| 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 |
|
---|
[19989] | 27 | prefix = @prefix@
|
---|
| 28 | exec_prefix = @exec_prefix@
|
---|
[17496] | 29 | bindir = @bindir@
|
---|
[35457] | 30 | libdir = @libdir@
|
---|
[17496] | 31 |
|
---|
| 32 | CXX = @CXX@
|
---|
| 33 | CXXFLAGS = @CXXFLAGS@
|
---|
| 34 | DEFS = @DEFS@
|
---|
| 35 | GSDLOS = @gsdlos@
|
---|
| 36 | INCLUDES =
|
---|
[26817] | 37 | STRIP = @STRIP@
|
---|
[17496] | 38 | INSTALL = @INSTALL@
|
---|
[29357] | 39 | LDFLAGS = @LDFLAGS@
|
---|
[17496] | 40 | LIBS = @LIBS@
|
---|
| 41 |
|
---|
[35457] | 42 | JAVAC = @JAVAC@
|
---|
| 43 | JAR = jar
|
---|
| 44 | JAVACFLAGS = @JAVACFLAGS@
|
---|
[17496] | 45 |
|
---|
| 46 | CXXCOMPILE = $(CXX) -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
|
---|
| 47 | CXXLINK = $(CXX) $(LDFLAGS) -o $@
|
---|
| 48 |
|
---|
| 49 |
|
---|
| 50 | .SUFFIXES:
|
---|
| 51 | .SUFFIXES: .cpp .o
|
---|
| 52 | .cpp.o:
|
---|
| 53 | $(CXXCOMPILE) $<
|
---|
| 54 |
|
---|
| 55 |
|
---|
| 56 | SOURCES = \
|
---|
| 57 | libsearch4j.cpp \
|
---|
| 58 | search4j.cpp
|
---|
| 59 |
|
---|
| 60 | OBJECTS = \
|
---|
| 61 | libsearch4j.o \
|
---|
| 62 | search4j.o
|
---|
| 63 |
|
---|
| 64 | EXECUTABLE_OBJECTS = \
|
---|
| 65 | $(OBJECTS)
|
---|
| 66 |
|
---|
| 67 | EXECUTABLE = search4j
|
---|
| 68 |
|
---|
| 69 |
|
---|
| 70 | # Default target: make the search4j executable
|
---|
[35457] | 71 | all: $(EXECUTABLE) compile-java install-java
|
---|
[17496] | 72 |
|
---|
| 73 | search4j: $(EXECUTABLE_OBJECTS)
|
---|
| 74 | $(CXXLINK) $(EXECUTABLE_OBJECTS) $(LIBS)
|
---|
| 75 |
|
---|
| 76 | install: $(EXECUTABLE)
|
---|
| 77 | $(INSTALL) -d $(bindir)
|
---|
[26817] | 78 | # $(STRIP) $(EXECUTABLE)
|
---|
| 79 | $(INSTALL) -m 755 $(EXECUTABLE) $(bindir)
|
---|
[17496] | 80 |
|
---|
| 81 | clean:
|
---|
| 82 | rm -f $(OBJECTS) $(EXECUTABLE)
|
---|
[35457] | 83 | rm -f DisplayJavaVersion.class
|
---|
| 84 | rm -f DisplayJavaBitness.class
|
---|
[17496] | 85 |
|
---|
| 86 | distclean:
|
---|
| 87 | rm -f $(OBJECTS) $(EXECUTABLE) Makefile
|
---|
| 88 |
|
---|
| 89 | depend:
|
---|
| 90 | makedepend -Y -- $(DEFS) $(INCLUDES) $(CXXFLAGS) -- $(SOURCES)
|
---|
[35457] | 91 |
|
---|
| 92 | compile-java:
|
---|
[35471] | 93 | $(JAVAC) $(JAVACFLAGS) -cp jna.jar DisplayJavaVersion.java
|
---|
| 94 | $(JAVAC) $(JAVACFLAGS) -cp jna.jar DisplayJavaBitness.java
|
---|
[35457] | 95 | $(JAR) cvfm display-java-version.jar Manifest-version.txt DisplayJavaVersion.class
|
---|
| 96 | $(JAR) cvfm display-java-bitness.jar Manifest-bitness.txt DisplayJavaBitness.class
|
---|
| 97 |
|
---|
| 98 | install-java:
|
---|
| 99 | $(INSTALL) -d $(libdir)
|
---|
| 100 | $(INSTALL) -d $(libdir)/java
|
---|
| 101 | $(INSTALL) display-java-version.jar $(libdir)/java
|
---|
| 102 | $(INSTALL) jna.jar $(libdir)/java
|
---|
| 103 | $(INSTALL) display-java-bitness.jar $(libdir)/java
|
---|