aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 04d673956d22f3b6f3917fe4319c0e167ddfeb04 (plain) (blame)
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
EXE=main
OBJECT_FILES=main.o math_vector.o chfb.o obj3d.o vertex_data.o vertex.o tri_vertex.o
CC=g++
LD=g++
COMMON_ARGS=-Wall -Wextra
CC_ARGS=$(COMMON_ARGS)
LD_ARGS=$(COMMON_ARGS) -lncurses

.PHONY: clean

$(EXE): $(OBJECT_FILES)
	$(LD) -o $@ $^ $(LD_ARGS)

main.o: main.cpp chfb.h obj3d.h math_vector.h vertex_data.h vertex.h tri_vertex.h
	$(CC) -o $@ -c $< $(CC_ARGS)

math_vector.o: math_vector.cpp math_vector.h
	$(CC) -o $@ -c $< $(CC_ARGS)

chfb.o: chfb.cpp chfb.h math_vector.h vertex_data.h vertex.h tri_vertex.h
	$(CC) -o $@ -c $< $(CC_ARGS)

obj3d.o: obj3d.cpp obj3d.h math_vector.h vertex_data.h vertex.h tri_vertex.h
	$(CC) -o $@ -c $< $(CC_ARGS)

vertex_data.o: vertex_data.cpp vertex_data.h
	$(CC) -o $@ -c $< $(CC_ARGS)

vertex.o: vertex.cpp vertex.h math_vector.h vertex_data.h
	$(CC) -o $@ -c $< $(CC_ARGS)

tri_vertex.o: tri_vertex.cpp tri_vertex.h math_vector.h vertex_data.h vertex.h
	$(CC) -o $@ -c $< $(CC_ARGS)

clean:
	rm -f $(EXE) $(OBJECT_FILES)