1 AUTOMAKE_OPTIONS = foreign no-dependencies
5 bin_PROGRAMS = $(program)
6 beanstalkd_SOURCES = beanstalkd.c \
18 cutgen_CFLAGS = -D__LINUX__
20 EXTRA_DIST = conn.h job.h ms.h net.h pq.h primes.h prot.h stat.h tube.h util.h binlog.h
22 tests = $(abs_srcdir)/tests/test_conn.c \
23 $(abs_srcdir)/tests/test_job.c \
24 $(abs_srcdir)/tests/test_ms.c \
25 $(abs_srcdir)/tests/test_net.c \
26 $(abs_srcdir)/tests/test_pq.c \
27 $(abs_srcdir)/tests/test_prot.c \
28 $(abs_srcdir)/tests/test_reserve.c \
29 $(abs_srcdir)/tests/test_tube.c \
30 $(abs_srcdir)/tests/test_util.c
32 check: $(program) tests/cutcheck
36 tests/cutcheck.c: $(tests) tests/cutgen
37 tests/cutgen -o tests/cutcheck.c $(tests)
39 tests/cutcheck.o: tests/cutcheck.c
40 $(CC) $(CFLAGS) -I$(abs_srcdir)/tests/ -c tests/cutcheck.c -o tests/cutcheck.o
42 tests/cutcheck: tests/cutcheck.o
43 for file in `ls $(abs_srcdir)/tests/test_*.c`; do cd $(abs_builddir)/tests/ && $(CC) $(CFLAGS) -I$(abs_srcdir)/tests/ -c $$file; done;
44 $(CC) $(CFLAGS) -I$(abs_srcdir)/tests/ $(LDFLAGS) $(LIBS) -pg `ls *.o | grep -v $(program)` `ls $(abs_builddir)/tests/test_*.o` tests/cutcheck.o -o tests/cutcheck
46 tests/cutgen: $(abs_srcdir)/tests/cutgen.c
47 @if ! test -d tests; then mkdir tests; fi
48 $(CC) $(CFLAGS) $(cutgen_CFLAGS) -I$(abs_srcdir)/tests/ $(LDFLAGS) $(abs_srcdir)/tests/cutgen.c -o tests/cutgen
51 rm -f *.o tests/*.o tests/cutgen tests/cutcheck*
52 rm -f $(program) .*.d core core.* gmon.out
53 rm -f $(program)-*.tar.gz