[go: up one dir, main page]

File: Makefile

package info (click to toggle)
fatrace 0.19.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 216 kB
  • sloc: ansic: 710; python: 528; sh: 36; makefile: 26
file content (30 lines) | stat: -rw-r--r-- 657 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
CFLAGS ?= -O2 -g -Wall -Wextra -Werror
PREFIX ?= /usr/local

all: fatrace tests/slow-exit.so

fatrace: fatrace.o
	$(CC) $(LDFLAGS) -o $@ $<

clean:
	rm -f *.o fatrace tests/slow-exit.so

distclean: clean

install: fatrace
	install -m 755 -D fatrace $(DESTDIR)$(PREFIX)/sbin/fatrace
	install -m 755 power-usage-report $(DESTDIR)$(PREFIX)/sbin/
	install -d $(DESTDIR)$(PREFIX)/share/man/man8/
	install -m 644 *.8 $(DESTDIR)$(PREFIX)/share/man/man8/

tests/slow-exit.so: tests/slow-exit.c
	$(CC) -shared -fPIC -o $@ $< -ldl

lint:
	ruff check power-usage-report
	ruff check tests
	mypy power-usage-report
	mypy tests


.PHONY: all clean distclean install lint