File: Makefile

package info (click to toggle)
cpulimit 2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 164 kB
  • ctags: 55
  • sloc: ansic: 714; makefile: 43
file content (39 lines) | stat: -rw-r--r-- 829 bytes parent folder | download
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
VERSION?=2.2
PREFIX?=/usr
CFLAGS?=-Wall -O2 -DVERSION=$(VERSION)
CC?=gcc

all: cpulimit

osx:
	$(CC) -o cpulimit cpulimit.c -D__APPLE__ $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)

minix:
	$(CC) -o cpulimit cpulimit.c $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)

freebsd:
	$(CC) -o cpulimit cpulimit.c -lrt -DFREEBSD $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)

cpulimit: cpulimit.c
	$(CC) -o cpulimit cpulimit.c -lrt -DLINUX $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)

tests:
	$(MAKE) -C test

install: cpulimit
	mkdir -p ${PREFIX}/bin
	mkdir -p ${PREFIX}/share/man/man1
	cp cpulimit ${PREFIX}/bin
	cp cpulimit.1 ${PREFIX}/share/man/man1

deinstall:
	rm -f ${PREFIX}/bin/cpulimit
	rm -f ${PREFIX}/share/man/man1/cpulimit.1

clean:
	rm -f *~ cpulimit
	$(MAKE) -C test clean

tarball: clean
	cd .. && tar czf cpulimit-$(VERSION).tar.gz cpulimit-$(VERSION) --exclude=.svn