New upstream release.
[debian/cpulimit.git] / Makefile
1 VERSION?=1.7
2 PREFIX?=/usr
3 CFLAGS?=-Wall -O2
4 CC?=gcc
5
6 all: cpulimit
7
8 cpulimit: cpulimit.c
9         $(CC) -o cpulimit cpulimit.c -lrt $(CFLAGS)
10
11 install: cpulimit
12         mkdir -p ${PREFIX}/bin
13         mkdir -p ${PREFIX}/share/man/man1
14         cp cpulimit ${PREFIX}/bin
15         cp cpulimit.1.gz ${PREFIX}/share/man/man1
16
17 deinstall:
18         rm -f ${PREFIX}/bin/cpulimit
19         rm -f ${PREFIX}/share/man/man1/cpulimit.1.gz
20
21 clean:
22         rm -f *~ cpulimit
23
24 tarball: clean
25         cd .. && tar czf cpulimit-$(VERSION).tar.gz cpulimit-$(VERSION)
26