forked from EZLippi/WebBench
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
44 lines (34 loc) · 1.15 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
CFLAGS?= -Wall -ggdb -W -O2 -pedantic
CC?= gcc
LIBS?=
LDFLAGS?=
PREFIX?= /usr/local
VERSION=1.5.1
TMPDIR=/tmp/webbench-$(VERSION)
all: webbench tags
tags: *.c
-ctags *.c
install: webbench
install -s webbench $(DESTDIR)$(PREFIX)/bin
install -m 644 webbench.1 $(DESTDIR)$(PREFIX)/man/man1
install -d $(DESTDIR)$(PREFIX)/share/doc/webbench
install -m 644 debian/copyright $(DESTDIR)$(PREFIX)/share/doc/webbench
install -m 644 debian/changelog $(DESTDIR)$(PREFIX)/share/doc/webbench
webbench: webbench.o parson.o url.o Makefile
$(CC) $(CFLAGS) $(LDFLAGS) -o webbench webbench.o parson.o url.o $(LIBS)
clean:
-rm -f *.o webbench *~ core *.core tags
tar: clean
-debian/rules clean
rm -rf $(TMPDIR)
install -d $(TMPDIR)
cp -p Makefile webbench.c socket.c webbench.1 $(TMPDIR)
install -d $(TMPDIR)/debian
-cp -p debian/* $(TMPDIR)/debian
ln -sf debian/copyright $(TMPDIR)/COPYRIGHT
ln -sf debian/changelog $(TMPDIR)/ChangeLog
-cd $(TMPDIR) && cd .. && tar cozf webbench-$(VERSION).tar.gz webbench-$(VERSION)
webbench.o: webbench.c socket.c Makefile
parson.o: parson.c parson.h Makefile
url.o: url.c url.h Makefile
.PHONY: clean install all tar