aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 0a6b464517700598b1743435bf027528e4e3d69a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# TODO: separate build dir to avoid the *.o clutter?

CC=clang
EXECUTABLE=astar
CFLAGS=-Wall -Wpedantic -Wextra -Werror -O3
LIBS=-lncurses
OBJS=priority_queue.o map.o stack.o path.o bmp.o main.o

$(EXECUTABLE): $(OBJS)
	$(CC) $(CFLAGS) $(OBJS) -o $(EXECUTABLE) $(LIBS)

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

debug: *.c *.h
	$(CC) -Wall -g -o $(EXECUTABLE) -DPID_MESSAGE priority_queue.c map.c stack.c path.c bmp.c main.c -lncurses

.PHONY: clean
clean:
	rm $(EXECUTABLE) $(OBJS)