summaryrefslogtreecommitdiff
path: root/Makefile
blob: c36447267864373602024b1c91afed14e9e85984 (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
CFLAGS += -fno-split-stack
CFLAGS += -Wall -Wextra -Werror
CFLAGS += -g -O0
CPPFLAGS += -I.
LDFLAGS += -static

linux.git = $(HOME)/src/github.com/torvalds/linux

3rd-party/linux-errno.txt: %: %.gen
	$< $(linux.git)

9p/linux-errno.h: %: %.gen 3rd-party/linux-errno.txt
	$^ >$@
9p/defs-%.c 9p/defs-%.h: 9p/defs.gen 9p/%.txt
	$^

lib9p = 9p/defs.o 9p/defs-9P2000.o 9p/srv.o
srv9p: srv9p.o coroutine.o netio_posix.o $(lib9p)

sources_py  = 9p/defs.gen
sources_py += 9p/linux-errno.h.gen

lint:
	mypy --strict --scripts-are-modules $(sources_py)
	black --check $(sources_py)
	isort --check $(sources_py)
format:
	black $(sources_py)
	isort $(sources_py)
.PHONY: lint format

.NOTINTERMEDIATE:
.DELETE_ON_ERROR: