74a5bbe2e5a81e5c0b0d6bb8ef1de0e0e64e52ba
[awesomized/libmemcached] / libmemcached / Makefile.am
1 EXTRA_DIST = libmemcached_probes.d memcached/README.txt
2
3 BUILT_SOURCES= @DTRACE_HEADER@
4
5 INCLUDES = -I$(top_builddir)
6 LIBS = @LIBS@
7
8 EXTRA_HEADERS =
9 DTRACE = @DTRACE@
10 DTRACEFLAGS = @DTRACEFLAGS@
11
12 noinst_HEADERS = libmemcached_probes.h \
13 memcached_io.h \
14 common.h \
15 memcached/protocol_binary.h @DTRACE_HEADER@
16
17 pkginclude_HEADERS= memcached.h \
18 memcached.hh \
19 libmemcached_config.h \
20 memcached_constants.h \
21 memcached_get.h \
22 memcached_result.h \
23 memcached_server.h \
24 memcached_storage.h \
25 memcached_string.h \
26 memcached_types.h \
27 memcached_watchpoint.h
28
29 lib_LTLIBRARIES = libmemcached.la
30
31 libmemcached_la_SOURCES = crc.c \
32 hsieh_hash.c \
33 memcached.c \
34 memcached_auto.c \
35 memcached_analyze.c \
36 memcached_behavior.c \
37 memcached_callback.c \
38 memcached_connect.c \
39 memcached_delete.c \
40 memcached_do.c \
41 memcached_fetch.c \
42 memcached_fetch_execute.c \
43 memcached_flush.c \
44 memcached_get.c \
45 memcached_hash.c \
46 memcached_hosts.c \
47 memcached_io.c \
48 memcached_purge.c \
49 memcached_flush_buffers.c \
50 md5.c \
51 memcached_key.c \
52 memcached_quit.c \
53 memcached_parse.c \
54 memcached_response.c \
55 memcached_result.c \
56 memcached_server.c \
57 memcached_storage.c \
58 memcached_string.c \
59 memcached_stats.c \
60 memcached_strerror.c \
61 memcached_verbosity.c \
62 memcached_version.c \
63 murmur_hash.c \
64 jenkins_hash.c
65
66 if BUILD_BYTEORDER
67 libmemcached_la_SOURCES += byteorder.c
68 endif
69
70 AM_CFLAGS = -DMEMCACHED_INTERNAL
71 libmemcached_la_DEPENDENCIES = @DTRACE_OBJ@
72 libmemcached_la_LIBADD = @DTRACE_OBJ@
73 libmemcached_la_LDFLAGS = -version-info $(MEMCACHED_LIBRARY_VERSION)
74
75 dtrace_probes.h: libmemcached_probes.d
76 $(DTRACE) $(DTRACEFLAGS) -o dtrace_probes.tmp -h -s libmemcached_probes.d
77 sed "s/#include <unistd.h>//g" dtrace_probes.tmp > dtrace_probes.h
78 rm dtrace_probes.tmp
79
80
81 # So libtool doesn't support dtrace, but just copy one of the existing
82 # lo-file and replace the file name ;-)
83 libmemcached_probes.lo: libmemcached_probes.o
84 sed "s,jenkins_hash,libmemcached_probes,g" jenkins_hash.lo > libmemcached_probes.lo
85
86 libmemcached_probes.o: $(libmemcached_la_OBJECTS)
87 $(DTRACE) $(DTRACEFLAGS) -o .libs/libmemcached_probes.o -G -s libmemcached_probes.d `grep pic_object *.lo | cut -f 2 -d\' | grep -v non_pic_object`
88 $(DTRACE) $(DTRACEFLAGS) -o libmemcached_probes.o -G -s libmemcached_probes.d `grep non_pic_object *.lo | cut -f 2 -d\' `
89