-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
28 lines (23 loc) · 897 Bytes
/
Makefile
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
CC = gcc
CFLAGS = -Wall -std=gnu99 `guile-config compile` -D _BSD_SOURCE -O3 `pkg-config --cflags glfw3`
LIBS = -lrt `pkg-config --libs $$GUILE_LIB_FLAGS guile-2.0` -lncurses `pkg-config --libs --static glfw3`
NAME = automaton
HEADERS = src/board.h src/lens.h src/rule.h src/world.h src/backend.h src/text_ui.h src/graphical_ui.h src/scm.h
SOURCES = src/main.c $(HEADERS:.h=.c)
OBJECTS = $(SOURCES:.c=.o)
$(NAME): $(OBJECTS)
$(CC) $(CFLAGS) $^ $(LIBS) -o $@
board.o: src/board.h
lens.o: src/lens.h src/board.o
rule.o: src/rule.h
world.o: src/world.h src/board.o src/rule.o
scm.o: src/scm.h src/world.o
backend.o: src/backend.h src/scm.o src/world.o
text_ui.o: src/text_ui.h src/backend.o src/lens.o
graphical_ui.o: src/graphical_ui.h src/backend.o src/lens.o
main.o: $(HEADERS) src/text_ui.o src/graphical_ui.o
clean:
rm -f $(NAME)
rm -f src/*.o
rm automaton.tar.gz
rm -Rf game_of_life/