forked from edenhill/kcat
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
executable file
·46 lines (32 loc) · 1.02 KB
/
Makefile
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
include Makefile.config
BIN= kcat
SRCS_y= kcat.c format.c tools.c input.c base64.c
SRCS_$(ENABLE_JSON) += json.c
SRCS_$(ENABLE_AVRO) += avro.c
OBJS= $(SRCS_y:.c=.o)
.PHONY:
all: $(BIN) TAGS
include mklove/Makefile.base
# librdkafka must be compiled with -gstrict-dwarf, but kcat must not,
# due to some clang bug on OSX 10.9
CPPFLAGS := $(subst strict-dwarf,,$(CPPFLAGS))
install: bin-install install-man
install-man:
echo $(INSTALL) -d $$DESTDIR$(man1dir) && \
echo $(INSTALL) kcat.1 $$DESTDIR$(man1dir)
clean: bin-clean
test:
$(MAKE) -C tests
TAGS: .PHONY
@(if which etags >/dev/null 2>&1 ; then \
echo "Using etags to generate $@" ; \
git ls-tree -r --name-only HEAD | egrep '\.(c|cpp|h)$$' | \
etags -f $@.tmp - ; \
cmp $@ $@.tmp || mv $@.tmp $@ ; rm -f $@.tmp ; \
elif which ctags >/dev/null 2>&1 ; then \
echo "Using ctags to generate $@" ; \
git ls-tree -r --name-only HEAD | egrep '\.(c|cpp|h)$$' | \
ctags -e -f $@.tmp -L- ; \
cmp $@ $@.tmp || mv $@.tmp $@ ; rm -f $@.tmp ; \
fi)
-include $(DEPS)