diff options
| author | Kirill Petrashin <kirill8201@yandex.ru> | 2026-07-13 20:58:51 +0300 |
|---|---|---|
| committer | Kirill Petrashin <kirill8201@yandex.ru> | 2026-07-13 20:58:51 +0300 |
| commit | 691f719a395f8916c06953e870034b36100ca51e (patch) | |
| tree | 27748f4bc77d66b530076f1eb15010a3ce23674d | |
| parent | 526dc7c4a3e0e391ef449ceb91cccef5fa8428ea (diff) | |
| download | astar-691f719a395f8916c06953e870034b36100ca51e.tar.xz | |
| -rw-r--r-- | .gitignore | 5 | ||||
| -rw-r--r-- | Makefile | 14 |
2 files changed, 15 insertions, 4 deletions
@@ -1,6 +1,9 @@ # The executable astar +# Object files +*.o + # ctags tag file tags @@ -11,4 +14,4 @@ tags *.bmp # For Bear -compile_commands.json +compile_commands.json @@ -1,12 +1,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) -astar: *.c *.h - $(CC) -Wall -Wpedantic -Wextra -Werror -O3 -o $(EXECUTABLE) priority_queue.c map.c stack.c path.c bmp.c main.c -lncurses +$(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) + rm $(EXECUTABLE) $(OBJS) |
