diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 19 |
1 files changed, 7 insertions, 12 deletions
@@ -1,19 +1,14 @@ CC=gcc CFLAGS=-Wall -g -c -all: pacman - -pacman: ghosts.o field.o pac.o pacman.o - $(CC) ghosts.o field.o pac.o pacman.o -lncurses -o pacman +LIBS = -lncurses -field.o: field.c - $(CC) $(CFLAGS) field.c +all: pacman -ghosts.o: ghosts.c - $(CC) $(CFLAGS) ghosts.c +%.o: %.с %.h + $(CC) $(CFLAGS) $< -o $@ -pacman.o: pacman.c - $(CC) $(CFLAGS) pacman.c +OBJMODULES=field.o ghosts.o pac.o queue.o pacman.o -pac.o: pac.c - $(CC) $(CFLAGS) pac.c +pacman: $(OBJMODULES) + $(CC) $(LIBS) $^ -o $@ |