aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: ff89d65720fe5c65f37cc460b566eb7187c10522 (plain) (blame)
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
CC=gcc
#CFLAGS=-Wall -Wextra -Wpedantic -g
#LDFLAGS=-lncurses

CFLAGS = -Wall -Wextra -Wpedantic -g -fsanitize=address
LDFLAGS = -lncurses -fsanitize=address

TARGET=sf

SRCS=$(wildcard *.c)
OBJS=$(SRCS:.c=.o)

.PHONY: all test clean

all: $(TARGET)

$(TARGET): $(OBJS)
	$(CC) $(OBJS) $(LDFLAGS) -o $@

%.o: %.c
	$(CC) $(CFLAGS) -c $< -o $@


test: $(TARGET)
	DEBUG=true ./\$<

clean:
	rm -f $(OBJS) $(TARGET)
	rm ./asan.log*