diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -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 $^ > $@ |