3 CFLAGS
=-g
-Wall
-Werror
-pedantic
-ansi
-O2
$(shell pkg-config
--cflags ncurses
)
4 LDFLAGS
=$(shell pkg-config
--libs ncurses
) -lm
6 PROGS
=game-of-sinners game-of-conway
11 find
-name
'*.o' -delete
12 find
-name
'*~' -delete
17 game-of-conway
: driver.o engine-conway.o
18 $(LD
) $(LDFLAGS
) -o
$@
$^
20 game-of-sinners
: driver.o engine-sinners.o
21 $(LD
) $(LDFLAGS
) -o
$@
$^
23 driver.o
: driver.c engine.h
24 $(CC
) $(CFLAGS
) -o
$@
-c
$<
26 engine-conway.o
: engine-conway.c engine.h
27 $(CC
) $(CFLAGS
) -o
$@
-c
$<
29 engine-sinners.o
: engine-sinners.c engine.h
30 $(CC
) $(CFLAGS
) -o
$@
-c
$<