1 | # Makefile for the native parts of the au.com.pharos.gdbm
|
---|
2 | # Java package.
|
---|
3 | # Modified by kjdon 2005
|
---|
4 |
|
---|
5 | # Copyright (C) 1997 by Pharos IP Pty Ltd
|
---|
6 | #
|
---|
7 | # This program is free software; you can redistribute it and/or modify
|
---|
8 | # it under the terms of the GNU General Public License as published by
|
---|
9 | # the Free Software Foundation; either version 2 of the License, or
|
---|
10 | # (at your option) any later version.
|
---|
11 | #
|
---|
12 | # This program is distributed in the hope that it will be useful,
|
---|
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
15 | # GNU General Public License for more details.
|
---|
16 | #
|
---|
17 | # You should have received a copy of the GNU General Public License
|
---|
18 | # along with this program; if not, write to the Free Software
|
---|
19 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
20 |
|
---|
21 | #srcdir=@srcdir@
|
---|
22 | libdir=@libdir@
|
---|
23 |
|
---|
24 | CC=@CC@
|
---|
25 | CFLAGS=-c @CFLAGS@ @ARCH_DEP_FLAGS@ $(INC) -DWRAPPER_VERSION=\"$(WRAPPER_VERSION)\"
|
---|
26 | #PKG=@PKG@
|
---|
27 | GDBM_LIBS=@GDBM_LIBPATH@ -lgdbm
|
---|
28 | LIBS= $(GDBM_LIBS) @LIBS@
|
---|
29 | LDFLAGS = @LDFLAGS@ @ARCH_DEP_FLAGS@
|
---|
30 | JNIFLAGS=@JNIFLAGS@
|
---|
31 | JNISUFFIX=@JNISUFFIX@
|
---|
32 | JNIINC=@JNIINC@
|
---|
33 | INC=-I. -I$(JAVA_HOME)/include @GDBM_INCLUDE@ @JNIINC@
|
---|
34 |
|
---|
35 |
|
---|
36 | # TODO: Build versioned shared libraries?
|
---|
37 |
|
---|
38 | # TODO: Build shared libraries in a way that will work on different
|
---|
39 | # platforms -- mbp
|
---|
40 |
|
---|
41 | WRAPPER_VERSION=0005
|
---|
42 | NATIVE_LIB=libgdbmjava.$(JNISUFFIX)
|
---|
43 |
|
---|
44 | all: $(NATIVE_LIB)
|
---|
45 |
|
---|
46 | $(NATIVE_LIB): GdbmFile.h gdbmjava.o Makefile
|
---|
47 | $(CC) $(LDFLAGS) $(JNIFLAGS) -o $(NATIVE_LIB) gdbmjava.o $(LIBS)
|
---|
48 |
|
---|
49 | gdbmjava.o: gdbmjava.c
|
---|
50 | $(CC) $(INC) $(CFLAGS) $?
|
---|
51 |
|
---|
52 | # no easy way to tell if a class file has changed or not
|
---|
53 | #GdbmFile.h:
|
---|
54 | # $(javah) -o GdbmFile.h -jni $(PKG).GdbmFile
|
---|
55 |
|
---|
56 | clean:
|
---|
57 | rm -f *.o $(NATIVE_LIB)
|
---|
58 |
|
---|
59 | distclean: clean
|
---|
60 | rm -f Makefile
|
---|
61 |
|
---|
62 | install:
|
---|
63 | cp $(NATIVE_LIB) $(libdir)/
|
---|