aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: ef8b4285d0ea3c000f7701c19fcb7646635dc8dc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
DIRS=target target/bin target/objs
BIN=target/bin/main
CC=gcc
# CFLAGS=-g -Wall -Wextra -Wpedantic -O1 -std=c17
CFLAGS=-Wall -Wextra -Wpedantic -O1 -std=c17
OBJS=target/objs/main.o target/objs/graph.o target/objs/queue.o target/objs/stack.o

$(shell mkdir -p $(DIRS))
all: $(BIN)

target/bin/main: $(OBJS)
	$(CC) $(CFLAGS) -fsanitize=leak,undefined,address $(OBJS) -o $@
	# $(CC) $(CFLAGS) $(OBJS) -o $@

target/objs/%.o: src/%.c
	$(CC) $(CFLAGS) -c $< -o $@

clean:
	rm -rf target/