Fix compiler warnings.
[beanstalkd.git] / Makefile.am
blob0198c0130c8798d3308669ff069dd927a238dec6
1 AUTOMAKE_OPTIONS = foreign no-dependencies subdir-objects
3 program = beanstalkd
5 bin_PROGRAMS = $(program)
6 aux_sources = \
7         binlog.c \
8         conn.c \
9         job.c \
10         ms.c \
11         net.c \
12         pq.c \
13         primes.c \
14         prot.c \
15         tube.c \
16         util.c
17 beanstalkd_SOURCES = beanstalkd.c $(aux_sources)
19 tests = \
20         tests/test_job.c \
21         tests/test_pq.c
23 EXTRA_DIST = cut.c cutgen.c $(tests) cut.h sh-tests check.sh check-one.sh \
24         binlog.h \
25         conn.h \
26         job.h \
27         ms.h \
28         net.h \
29         pq.h \
30         primes.h \
31         prot.h \
32         stat.h \
33         tube.h \
34         util.h
36 dist_doc_DATA = doc/protocol.txt
37 dist_man_MANS = doc/beanstalkd.1
39 check-cut: tests/cutcheck 
40         tests/cutcheck
42 check-shell: $(program)
43         $(srcdir)/check.sh $(srcdir)/sh-tests/*.commands
45 check: check-cut check-shell
47 cutgen: cutgen.c
49 tests/cutcheck.c: $(tests) cutgen
50         mkdir -p tests
51         ./cutgen -o tests/cutcheck.c $(tests:%=$(srcdir)/%)
53 tests/cutcheck: tests/cutcheck.o cut.o $(aux_sources:.c=.o) $(tests:.c=.o)
54         $(LINK) $^ $(beanstalkd_LDADD) $(LIBS)
56 CLEANFILES = cutgen tests/cutcheck* tests/*.o
58 DISTCLEANFILES = core core.* gmon.out $(program)-*.tar.gz
60 dist-hook:
61         echo -e '#!/bin/sh\n\n# This file was generated by "make dist".\necho $(VERSION)' > $(distdir)/version.sh
62         chmod +x $(distdir)/version.sh