-
Notifications
You must be signed in to change notification settings - Fork 25
/
Makefile.in
148 lines (118 loc) · 4.08 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# vim:ts=2:sw=2:noet:
.SUFFIXES: .lo
CC=@CC@
LN_S=@LN_S@
CPPFLAGS=@CPPFLAGS@
CFLAGS=@CFLAGS@ -D_REENTRANT
LDFLAGS=@LDFLAGS@
LD_LIBJLOG_VERSION=@LD_LIBJLOG_VERSION@
AR=@AR@
RANLIB=@RANLIB@
LIBS=@LIBS@
INSTALL=@INSTALL@
SHLD=@SHLD@
PERL=@PERL@
SHCFLAGS=@SHCFLAGS@
DOTSO=@DOTSO@
JAVAC=@JAVAC@
JAVAH=@JAVAH@
JAR=@JAR@
JAVA_BITS=@JAVA_BITS@
MAJOR_VERSION=2
MINOR_VERSION=6
PATCH_VERSION=0
VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_VERSION)
LIBSHORT=@LIBSHORT@
LIBMAJOR=@LIBMAJOR@
LIBLONG=@LIBLONG@
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
sbindir=@sbindir@
libdir=@libdir@
includedir=@includedir@
libexecdir=@libexecdir@
datarootdir = @datarootdir@
mandir=@mandir@
mansubdir=@mansubdir@
docdir=${prefix}/@docdir@
sysconfdir=@sysconfdir@
srcdir=@srcdir@
top_srcdir=@top_srcdir@
AOBJS= \
jlog.o jlog_hash.o jlog_io.o jlog_compress.o
SOOBJS= \
jlog.lo jlog_hash.lo jlog_io.lo jlog_compress.lo
all: libjlog.$(DOTSO) libjlog.a jlogctl jlogtail
.c.o:
$(CC) $(CPPFLAGS) $(CFLAGS) -c $<
.c.lo:
$(CC) $(CPPFLAGS) $(CFLAGS) $(SHCFLAGS) -c $< -o $@
test: jthreadtest jtest
perl/Makefile: perl/Makefile.PL
cd perl && $(PERL) Makefile.PL
jlogperl: perl/Makefile
@cd perl && make
jlogpython:
cd python && make
jlogctl: libjlog.a jlogctl.o getopt_long.o
$(CC) $(CFLAGS) -o jlogctl jlogctl.o getopt_long.o libjlog.a $(LDFLAGS) $(LIBS)
jthreadtest: libjlog.a jthreadtest.o getopt_long.o
$(CC) $(CFLAGS) -o jthreadtest jthreadtest.o getopt_long.o libjlog.a $(LDFLAGS) $(LIBS)
jtest: libjlog.a jtest.o
$(CC) $(CFLAGS) -o jtest jtest.o libjlog.a $(LDFLAGS) $(LIBS)
jlogtail: libjlog.a jlogtail.o
$(CC) $(CFLAGS) -o jlogtail jlogtail.o libjlog.a $(LDFLAGS) $(LIBS)
libjlog.$(DOTSO): $(SOOBJS)
$(SHLD) $(LD_LIBJLOG_VERSION) -o libjlog.$(DOTSO) $(SOOBJS) $(CFLAGS) $(LDFLAGS) $(LIBS)
libjlog.a: $(AOBJS)
$(AR) cr libjlog.a $(AOBJS)
$(RANLIB) libjlog.a
java-bits: java/jlog.jar java/libjnijlog.so java/jlogTest.class
#
# It should be the case that the bridge include file is
# autogenerated using javah
#
java/jlog.jar: java/jlog.java
$(JAVAC) -d java java/jlog.java && \
$(JAVAH) -d java -classpath java com.omniti.labs.jlog && \
$(JAR) -cf $@ -C java com && \
rm -rf java/com
java/jlogTest.class: java/jlogTest.java java/jlog.jar
cd java && $(JAVAC) -cp jlog.jar jlogTest.java
java/com_omniti_labs_jlog.lo: java/com_omniti_labs_jlog.c
$(CC) -I. $(CPPFLAGS) $(CFLAGS) $(SHCFLAGS) $(LDFLAGS) -c $< -o $@
java/libjnijlog.so: java/com_omniti_labs_jlog.lo $(SOOBJS)
$(SHLD) -o $@ java/com_omniti_labs_jlog.lo $(SOOBJS) $(CFLAGS) $(LDFLAGS) $(LIBS)
install: all
$(srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
$(srcdir)/mkinstalldirs $(DESTDIR)$(libdir)
$(srcdir)/mkinstalldirs $(DESTDIR)$(includedir)
$(INSTALL) -m 0755 jlogctl $(DESTDIR)$(bindir)/jlogctl
$(INSTALL) -m 0755 jlogtail $(DESTDIR)$(bindir)/jlogtail
$(INSTALL) -m 0755 jlog_change_endian.pl $(DESTDIR)$(bindir)/jlog_change_endian
$(INSTALL) -m 0755 jlog_sanity_check.pl $(DESTDIR)$(bindir)/jlog_sanity_check
$(INSTALL) -m 0755 libjlog.a $(DESTDIR)$(libdir)/libjlog.a
$(INSTALL) -m 0755 libjlog.$(DOTSO) $(DESTDIR)$(libdir)/$(LIBLONG)
$(LN_S) -f $(LIBLONG) $(DESTDIR)$(libdir)/$(LIBSHORT)
$(LN_S) -f $(LIBLONG) $(DESTDIR)$(libdir)/$(LIBMAJOR)
$(INSTALL) -m 0644 jlog.h $(DESTDIR)$(includedir)/jlog.h
$(INSTALL) -m 0644 jlog_private.h $(DESTDIR)$(includedir)/jlog_private.h
$(INSTALL) -m 0644 jlog_io.h $(DESTDIR)$(includedir)/jlog_io.h
$(INSTALL) -m 0644 jlog_config.h $(DESTDIR)$(includedir)/jlog_config.h
java-bits-install:
$(srcdir)/mkinstalldirs $(DESTDIR)$(libdir)/java
$(INSTALL) -m 0644 java/jlog.jar $(DESTDIR)$(libdir)/java/jlog.jar
$(INSTALL) -m 0755 java/libjnijlog.so $(DESTDIR)$(libdir)/java/libjnijlog.so
install-perl:
cd perl ; make install DESTDIR=$(DESTDIR) INSTALLDIRS=vendor
install-python:
cd python && make install
clean:
rm -f *.o *.lo *.$(DOTSO) *.a jthreadtest jtest jlogctl jlogtail
rm -f java/*.jar java/*.jnilib java/*.lo
-if test -f perl/Makefile ; then cd perl ; make clean ; fi
-if test -f python/Makefile ; then cd python ; make clean ; fi
distclean: clean
rm -f Makefile jlog_config.h perl/Makefile.PL
.SUFFIXES: .c .o .lo