summary refs log tree commit diff
path: root/Makefile
blob: 4c0053ca399390427ae0f58626e1b8030423122e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
EXE = wlb
OBJ != find -type f -name '*.c' | sed 's/\.c$$/.o/'
CFLAGS = -Wall -Wpedantic -std=c17 -Os
PREFIX ?= ${HOME}
LDFLAGS = -s

.PHONY: run all clean install

all: ${EXE}
run: ${EXE}
	./${EXE}

clean:
	rm ${EXE} ${OBJ}

${EXE}: ${OBJ}
	${CC} ${OBJ} -o ${EXE} ${LDFLAGS}

install: ${EXE}
	mv ${EXE} ${PREFIX}/bin/${EXE}