SRCMODULES = field.c ghosts.c pac.c queue.c pacman.c OBJMODULES = $(SRCMODULES:.c=.o) CC = gcc CFLAGS = -Wall -g -c LIBS = -lncurses -lm all: pacman %.o: %.с %.h $(CC) $(CFLAGS) $< -o $@ pacman: $(OBJMODULES) $(CC) $(LIBS) $^ -o $@ -include deps.mk deps.mk: $(SRCMODULES) $(CC) -MM $^ > $@