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
|
MAINTAINERCLEANFILES = Makefile.in
BUILT_SOURCES = cfg-options.h
CLEANFILES = cfg-options.h
cfg-options.h: Makefile
$(AM_V_GEN)echo '#define NC_CONF_PATH "$(sysconfdir)/nutcracker/nutcracker.yml"' >$@
@echo '#define NC_LOG_PATH "$(localstatedir)/log/nutcracker/nutcracker.log"' >>$@
@echo '#define NC_PID_FILE "/run/nutcracker/nutcracker.pid"' >>$@
AM_CPPFLAGS =
if !OS_SOLARIS
AM_CPPFLAGS += -D_GNU_SOURCE
endif
AM_CPPFLAGS += -I $(top_srcdir)/src/hashkit
AM_CPPFLAGS += -I $(top_srcdir)/src/proto
AM_CPPFLAGS += -I $(top_srcdir)/src/event
AM_CFLAGS =
# about -fno-strict-aliasing: https://github.com/twitter/twemproxy/issues/276
AM_CFLAGS += -fno-strict-aliasing
AM_CFLAGS += -Wall -Wshadow
AM_CFLAGS += -Wpointer-arith
AM_CFLAGS += -Winline
AM_CFLAGS += -Wunused-function -Wunused-variable -Wunused-value
AM_CFLAGS += -Wno-unused-parameter -Wno-unused-value
AM_CFLAGS += -Wconversion -Wsign-compare
AM_CFLAGS += -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations
AM_LDFLAGS =
AM_LDFLAGS += -lm -lpthread -lyaml -rdynamic
if OS_SOLARIS
AM_LDFLAGS += -lnsl -lsocket
endif
if OS_FREEBSD
AM_LDFLAGS += -lexecinfo
endif
SUBDIRS = hashkit proto event
sbin_PROGRAMS = nutcracker
nutcracker_SOURCES = \
nc_core.c nc_core.h \
nc_connection.c nc_connection.h \
nc_client.c nc_client.h \
nc_server.c nc_server.h \
nc_proxy.c nc_proxy.h \
nc_message.c nc_message.h \
nc_request.c \
nc_response.c \
nc_mbuf.c nc_mbuf.h \
nc_conf.c nc_conf.h \
nc_stats.c nc_stats.h \
nc_signal.c nc_signal.h \
nc_rbtree.c nc_rbtree.h \
nc_log.c nc_log.h \
nc_string.c nc_string.h \
nc_array.c nc_array.h \
nc_util.c nc_util.h \
nc_queue.h \
nc.c
nutcracker_LDADD = $(top_builddir)/src/hashkit/libhashkit.a
nutcracker_LDADD += $(top_builddir)/src/proto/libproto.a
nutcracker_LDADD += $(top_builddir)/src/event/libevent.a
|