summaryrefslogtreecommitdiff
blob: c95112e1a6192380bf8708f202d429b58b27392a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- Makefile	2008-02-05 17:02:37.000000000 +1300
+++ Makefile.install	2008-02-05 17:03:27.000000000 +1300
@@ -1,6 +1,7 @@
 program := beanstalkd
 export CFLAGS := $(LDFLAGS) -Wall -Werror
 export LDFLAGS := $(LDFLAGS) -levent
+export BINDIR := $(DESTDIR)/usr/bin
 
 sources := $(shell ls *.c | fgrep -v $(program))
 objects := $(sources:.c=.o)
@@ -9,6 +10,10 @@
 all: export CFLAGS := $(CFLAGS) -O2
 all: $(program)
 
+install: all
+	mkdir -p "$(BINDIR)"
+	install $(program) "$(BINDIR)"
+
 debug: export CFLAGS := $(CFLAGS) -g -pg -DDEBUG
 debug: export LDFLAGS := $(LDFLAGS) -pg
 debug: $(program)