back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorscratko <m@scratko.xyz>2024-04-12 03:17:46 +0300
committerscratko <m@scratko.xyz>2024-04-12 03:17:46 +0300
commit04a6703fd66a7d34b2556a9c203c4dada3baca38 (patch)
tree3d2cbdaae515d90747e507ba8a8ebfd7bdc44fed /Makefile
parent235f8481502263fcdb4823ff0bc4e8f831bc934d (diff)
downloadpacman-04a6703fd66a7d34b2556a9c203c4dada3baca38.tar.gz
pacman-04a6703fd66a7d34b2556a9c203c4dada3baca38.tar.bz2
pacman-04a6703fd66a7d34b2556a9c203c4dada3baca38.zip
Added behavior modes
Reverse direction Random direction
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 9 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 796dbbb..aefc9fa 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,7 @@
-CC=gcc
-CFLAGS=-Wall -g -c
+SRCMODULES = field.c ghosts.c pac.c queue.c pacman.c
+OBJMODULES = $(SRCMODULES:.c=.o)
+CC = gcc
+CFLAGS = -Wall -g -c
LIBS = -lncurses -lm
@@ -8,7 +10,10 @@ all: pacman
%.o: %.с %.h
$(CC) $(CFLAGS) $< -o $@
-OBJMODULES=field.o ghosts.o pac.o queue.o pacman.o
-
pacman: $(OBJMODULES)
$(CC) $(LIBS) $^ -o $@
+
+-include deps.mk
+
+deps.mk: $(SRCMODULES)
+ $(CC) -MM $^ > $@