-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (26 loc) · 689 Bytes
/
Makefile
File metadata and controls
34 lines (26 loc) · 689 Bytes
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
# ncspot socket listener + notifier
APPNAME = ncspotnotify
SRCDIR = src
BINDIR = bin
BIN = ${BINDIR}/${APPNAME}
SRC = ${wildcard ${SRCDIR}/*.c}
OBJ = ${SRC:.c=.o}
LNK = -lcurl
CC = clang
# TODO: verify if any of this is redundant
CFLAGS = -Wall -Wextra -Wconversion -Wdouble-promotion \
-Wno-unused-parameter -Wno-unused-function -Wno-sign-conversion \
-fsanitize=undefined -fsanitize-trap -std=c23 \
-D_POSIX_C_SOURCE=200809L
${BIN}: ${OBJ}
mkdir -p ${BINDIR}
${CC} -o ${BIN} ${OBJ} ${LNK}
run: CFLAGS += -g
run: ${BIN}
${BIN} --debug
runopt: CFLAGS += -O3
runopt: run
clean:
rm -f ${BIN} ${OBJ}
fresh: clean ${BIN}
.PHONY: clean fresh run runopt