-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (23 loc) · 696 Bytes
/
Makefile
File metadata and controls
26 lines (23 loc) · 696 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
# Dependencies: ncurses (for terminal UI), rx (regex library for search functionality)
CC = gcc
CFLAGS = -D_POSIX_C_SOURCE -Wall -Wextra -Wno-unused-parameter -std=c11 -O2
LDFLAGS = -lncurses
TARGET = led
SRCS = main.c model.c view.c controller.c editor.c config.c
OBJS = $(SRCS:.c=.o)
$(TARGET): $(OBJS)
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f $(TARGET) $(OBJS)
lint:
splint -weak -bounds -null -compdef -warnposix +matchanyintegral +longintegral $(SRCS)
sanitize: CFLAGS += -fsanitize=address -fsanitize=undefined
sanitize: $(TARGET)
install:
mkdir ~/bin || true
cp led ~/bin
doc:
sudo cp led.1 /usr/share/man/man1
.PHONY: clean lint doc