Document stats-job values delay and ttr
[beanstalkd.git] / Makefile
blobeb28cee60f9b6e5726a3f87ae453995e99b86942
1 DESTDIR=
2 PREFIX=/usr/local
3 BINDIR=$(DESTDIR)$(PREFIX)/bin
4 CFLAGS=-Wall -Werror\
5 -Wformat=2\
6 -g\
8 LDFLAGS=
9 OS=$(shell uname|tr A-Z a-z)
10 INSTALL=install
12 VERS=$(shell ./vers.sh)
13 TARG=beanstalkd
14 MOFILE=main.o
15 OFILES=\
16 $(OS).o\
17 conn.o\
18 file.o\
19 heap.o\
20 job.o\
21 ms.o\
22 net.o\
23 primes.o\
24 prot.o\
25 sd-daemon.o\
26 serv.o\
27 time.o\
28 tube.o\
29 util.o\
30 vers.o\
31 walg.o\
33 TOFILES=\
34 testheap.o\
35 testjobs.o\
36 testserv.o\
37 testutil.o\
39 HFILES=\
40 dat.h\
41 sd-daemon.h\
43 CLEANFILES=\
44 vers.c\
46 .PHONY: all
47 all: $(TARG)
49 $(TARG): $(OFILES) $(MOFILE)
50 $(LINK.o) -o $@ $^ $(LDLIBS)
52 .PHONY: install
53 install: $(BINDIR)/$(TARG)
55 $(BINDIR)/%: %
56 $(INSTALL) -d $(dir $@)
57 $(INSTALL) $< $@
59 CLEANFILES:=$(CLEANFILES) $(TARG)
61 $(OFILES) $(MOFILE): $(HFILES)
63 .PHONY: clean
64 clean:
65 rm -f *.o $(CLEANFILES)
67 .PHONY: check
68 check: ct/_ctcheck
69 ct/_ctcheck
71 .PHONY: bench
72 bench: ct/_ctcheck
73 ct/_ctcheck -b
75 ct/_ctcheck: ct/_ctcheck.o ct/ct.o $(OFILES) $(TOFILES)
77 ct/_ctcheck.c: $(TOFILES) ct/gen
78 ct/gen $(TOFILES) >$@.part
79 mv $@.part $@
81 ct/ct.o ct/_ctcheck.o: ct/ct.h ct/internal.h
83 $(TOFILES): $(HFILES) ct/ct.h
85 CLEANFILES:=$(CLEANFILES) ct/_* ct/*.o
87 ifneq ($(shell ./verc.sh),$(shell cat vers.c 2>/dev/null))
88 .PHONY: vers.c
89 endif
90 vers.c:
91 ./verc.sh >vers.c
93 doc/beanstalkd.1 doc/beanstalkd.1.html: doc/beanstalkd.ronn
94 ronn $<
96 freebsd.o: darwin.c