-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (36 loc) · 1.02 KB
/
Makefile
File metadata and controls
54 lines (36 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
CC = gcc
LDIR = /home/user/lib
CFLAGS = -DDEBUG -g -Wall -pedantic -std=c99 -I$(LDIR)/include
LFLAGS = -L$(LDIR)/lib -lbmp -lm
NAME = life.out
#NBHOOD_TYPE =
NBHOOD_TYPE = torus_
$(NAME): main.o plansza.o rules.o boardio.o automaton.o $(NBHOOD_TYPE)neighborhood.o
$(CC) -o $@ $^ $(LFLAGS)
main.o: boardio.h automaton.h
plansza.o: plansza.h state.h
rules.o: rules.h state.h neighborhood.h
$(NBHOOD_TYPE)neighborhood.o: neighborhood.h plansza.h
.PHONY: clean cleanbmps testnbh
clean:
rm -f *.o test/*.o *.out
cleanbmps:
cd output; rm *.bmp
## testy
zabka: $(NAME)
./$< test/$@ 20 1 output/$@
diehard: $(NAME)
./$< test/$@ 150 1 output/$@
glider: $(NAME)
./$< test/$@ 200 1 output/$@
gosperglidergun: $(NAME)
./$< test/$@ 100 2 output/$@
lwss: $(NAME)
./$< test/$@ 40 1 output/$@
gosperglidergun2: $(NAME)
./$< test/$@ 100 1 output/$@
## testy neighborhood
nbhood_test.out: test/nbhood_test.o plansza.o rules.o neighborhood.o boardio.o
$(CC) -o $@ $^ $(LFLAGS)
testnbh: nbhood_test.out
./nbhood_test.out test/dane2