-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (32 loc) · 1.04 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
CFLAGS?= -Wall -ggdb -W -O
CC?= gcc
LIBS?=
LDFLAGS?=
PREFIX?= /usr/local
VERSION=1.5
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 Makefile
$(CC) $(CFLAGS) $(LDFLAGS) -o webbench webbench.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
.PHONY: clean install all tar