back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: b53c2b41c6eafc99a1b455d2ee5841cd50fcecfc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
SRCMODULES = field.c ghosts.c pac.c queue.c color_palette.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 $^ > $@