This repository has been archived by the owner on Apr 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile.in
97 lines (69 loc) · 2.69 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#================================================================
# Setting Variables
#================================================================
SHELL = @SHELL@
# Package information
PACKAGE = @PACKAGE_NAME@
VERSION = @PACKAGE_VERSION@
LIBVER = @MYLIBVER@
LIBREV = @MYLIBREV@
# Targets
LIBRARYFILES = @MYLIBRARYFILES@
# Install destinations
prefix = @prefix@
exec_prefix = @exec_prefix@
INCLUDEDIR = @includedir@
LIBDIR = ${exec_prefix}/lib
DESTDIR =
# Directories
SRCDIR = ./src/cpp/
# Building configuration
CC = @CC@
CPPFLAGS = @MYCPPFLAGS@
CFLAGS = @MYCFLAGS@
LDFLAGS = @MYLDFLAGS@
LIBS = @LIBS@
#================================================================
# Actions
#================================================================
all: $(LIBRARYFILES) jejdb
@printf '\n'
@printf '#================================================================\n'
@printf '# Ready to install.\n'
@printf '#================================================================\n'
compile-native : $(LIBRARYFILES)
jejdb:
ant build.and.test
tests:
ant build.and.test
doc:
ant build.doc
install:
install -d $(DESTDIR)$(LIBDIR)
cp -Rf $(LIBRARYFILES) $(DESTDIR)$(LIBDIR)
for f in $(LIBRARYFILES); do chmod 755 $(DESTDIR)$(LIBDIR)/`basename $$f`; done
@printf '\n'
@printf '#================================================================\n'
@printf '# Java Bindinig binaries installed to %s.\n' "$(DESTDIR)$(LIBDIR)"
@printf '# Ensure that LD_LIBRARY_PATH environment variable contains "%s".\n' "$(DESTDIR)$(LIBDIR)"
@printf '#================================================================\n'
@printf '# Thanks for using Java Binding of Tokyo Cabinet EJDB edition.\n'
@printf '#================================================================\n'
clean:
rm -rf $(LIBRARYFILES)
ant clean
#================================================================
# Building binaries
#================================================================
libjejdb.so.$(LIBVER).$(LIBREV).0 :
$(CC) $(CPPFLAGS) $(CFLAGS) -shared $(LDFLAGS) -o $@ $(SRCDIR)jejdb.c $(LIBS)
libjejdb.so.$(LIBVER) : libjejdb.so.$(LIBVER).$(LIBREV).0
ln -f -s libjejdb.so.$(LIBVER).$(LIBREV).0 $@
libjejdb.so : libjejdb.so.$(LIBVER).$(LIBREV).0
ln -f -s libjejdb.so.$(LIBVER).$(LIBREV).0 $@
libjejdb.$(LIBVER).$(LIBREV).0.dylib :
$(CC) $(CPPFLAGS) $(CFLAGS) -dynamiclib -install_name libjejdb.$(LIBVER).0.dylib -current_version $(LIBVER).$(LIBREV).0 -compatibility_version $(LIBVER) $(LDFLAGS) -o $@ $(SRCDIR)jejdb.c $(LIBS)
libjejdb.$(LIBVER).dylib : libjejdb.$(LIBVER).$(LIBREV).0.dylib
ln -f -s libjejdb.$(LIBVER).$(LIBREV).0.dylib $@
libjejdb.dylib : libjejdb.$(LIBVER).$(LIBREV).0.dylib
ln -f -s libjejdb.$(LIBVER).$(LIBREV).0.dylib $@