root/Makefile.in

Revision 2401d94b5a05c88595a40be7243941c14fab55c3, 1.3 kB (checked in by Wez Furlong <wez.furlong@messagesystems.com>, 6 years ago)

allow building as shared object, wire up perl module build

  • Property mode set to 100644
Line 
1 # vim:ts=2:sw=2:noet:
2 CC=@CC@
3 CPPFLAGS=@CPPFLAGS@
4 CFLAGS=@CFLAGS@
5 LDFLAGS=@LDFLAGS@
6 AR=@AR@
7 RANLIB=@RANLIB@
8 LIBS=@LIBS@
9 INSTALL=@INSTALL@
10 SHLD=@SHLD@
11
12 prefix=@prefix@
13 exec_prefix=@exec_prefix@
14 bindir=@bindir@
15 sbindir=@sbindir@
16 libdir=@libdir@
17 includedir=${prefix}/include
18 libexecdir=@libexecdir@
19 datarootdir = @datarootdir@
20 mandir=@mandir@
21 mansubdir=@mansubdir@
22 docdir=${prefix}/@docdir@
23 sysconfdir=@sysconfdir@
24 srcdir=@srcdir@
25 top_srcdir=@top_srcdir@
26
27 LIBOBJS= \
28         jlog.o jlog_hash.o jlog_io.o
29
30 all:    libjlog.so libjlog.a jlogctl test
31
32 test:   jthreadtest
33
34 jlogctl:        libjlog.a jlogctl.o
35         $(CC) $(CFLAGS) -o jlogctl jlogctl.o libjlog.a $(LDFLAGS) $(LIBS)
36
37 jthreadtest:    libjlog.a jthreadtest.o
38         $(CC) $(CFLAGS) -o jthreadtest jthreadtest.o libjlog.a $(LDFLAGS) $(LIBS)
39
40 libjlog.so: $(LIBOBJS)
41         $(SHLD) -o libjlog.so $(LIBOBJS) $(LIBS)
42
43 libjlog.a:      $(LIBOBJS)
44         $(AR) cq libjlog.a $(LIBOBJS)
45         $(RANLIB) libjlog.a
46
47 .c.o:
48         $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
49
50 install:
51         $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
52         $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir)
53         $(srcdir)/mkinstalldirs $(DESTDIR)$(includedir)
54         $(INSTALL) -m 0755 jlogctl $(DESTDIR)$(bindir)/jlogctl
55         $(INSTALL) -m 0755 libjlog.a $(DESTDIR)$(libdir)/libjlog.a
56         $(INSTALL) -m 0644 jlog.h $(DESTDIR)$(includedir)/jlog.h
57
58 clean:
59         rm -f *.o libjlog.a jthreadtest
60         -if test -f perl/Makefile ; then cd perl ; make clean ; fi
Note: See TracBrowser for help on using the browser.