1 AUTOMAKE_OPTIONS = foreign no-dependencies
5 bin_PROGRAMS = $(program)
6 beanstalkd_SOURCES = beanstalkd.c \
17 cutgen_CFLAGS = -D__LINUX__
19 EXTRA_DIST = conn.h job.h ms.h net.h pq.h primes.h prot.h stat.h tube.h util.h
21 tests = $(abs_srcdir)/tests/test_conn.c \
22 $(abs_srcdir)/tests/test_job.c \
23 $(abs_srcdir)/tests/test_ms.c \
24 $(abs_srcdir)/tests/test_net.c \
25 $(abs_srcdir)/tests/test_pq.c \
26 $(abs_srcdir)/tests/test_prot.c \
27 $(abs_srcdir)/tests/test_reserve.c \
28 $(abs_srcdir)/tests/test_tube.c \
29 $(abs_srcdir)/tests/test_util.c
31 check: $(program) tests/cutcheck
35 tests/cutcheck.c: $(tests) tests/cutgen
36 tests/cutgen -o tests/cutcheck.c $(tests)
38 tests/cutcheck.o: tests/cutcheck.c
39 $(CC) $(CFLAGS) -I$(abs_srcdir)/tests/ -c tests/cutcheck.c -o tests/cutcheck.o
41 tests/cutcheck: tests/cutcheck.o
42 for file in `ls $(abs_srcdir)/tests/test_*.c`; do cd $(abs_builddir)/tests/ && $(CC) $(CFLAGS) -I$(abs_srcdir)/tests/ -c $$file; done;
43 $(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
45 tests/cutgen: $(abs_srcdir)/tests/cutgen.c
46 @if ! test -d tests; then mkdir tests; fi
47 $(CC) $(CFLAGS) $(cutgen_CFLAGS) -I$(abs_srcdir)/tests/ $(LDFLAGS) $(abs_srcdir)/tests/cutgen.c -o tests/cutgen
50 rm -f *.o tests/*.o tests/cutgen tests/cutcheck*
51 rm -f $(program) .*.d core core.* gmon.out
52 rm -f $(program)-*.tar.gz