summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 3fa24276b0aae7641020a4636c8c775b7ff4ac33 (plain)
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
CC ?= gcc
PREFIX ?= /usr

# build
CFLAGS ?= -Wall

# debuginfo included
CFLAGS_DEBUG=-I include -ggdb -Wall

# debug without compiler optimizations
CFLAGS_DEBUG0=-I include -ggdb -O0

all:
	$(CC) $(CFLAGS) -I include -o bin/xcapture src/xcapture.c

debug:
	$(CC) $(CFLAGS_DEBUG) -o bin/xcapture src/xcapture.c

debug0:
	$(CC) $(CFLAGS_DEBUG0) -o bin/xcapture src/xcapture.c

install:
	install -m 0755 -d ${PREFIX}/bin
	install -m 0755 bin/xcapture ${PREFIX}/bin/xcapture
	install -m 0755 bin/psn ${PREFIX}/bin/psn
	install -m 0755 bin/schedlat ${PREFIX}/bin/schedlat
	install -m 0755 bin/vmtop ${PREFIX}/bin/vmtop
	install -m 0755 bin/syscallargs ${PREFIX}/bin/syscallargs
	install -m 0755 -d ${PREFIX}/lib/0xtools
	install -m 0644 lib/0xtools/psnproc.py ${PREFIX}/lib/0xtools/psnproc.py
	install -m 0644 lib/0xtools/psnreport.py ${PREFIX}/lib/0xtools/psnreport.py
	install -m 0644 lib/0xtools/argparse.py ${PREFIX}/lib/0xtools/argparse.py

uninstall:
	rm -fv  ${PREFIX}/bin/xcapture ${PREFIX}/bin/psn ${PREFIX}/bin/schedlat
	rm -fv  ${PREFIX}/lib/0xtools/psnproc.py ${PREFIX}/lib/0xtools/psnreport.py ${PREFIX}/lib/0xtools/argparse.py
	rm -rfv ${PREFIX}/lib/0xtools 

clean:
	rm -fv bin/xcapture