.
[simple-cellular-automata-suite.git] / Makefile
blobf13623c705418e4317e9f4a5dfce703bef9be5fa
1 CC=gcc
2 LD=gcc
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
8 default: all
10 clean:
11 find -name '*.o' -delete
12 find -name '*~' -delete
13 rm -f $(PROGS)
15 all: $(PROGS)
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 $<