-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (31 loc) · 1.06 KB
/
Makefile
File metadata and controls
48 lines (31 loc) · 1.06 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
# Main program
objects = objects/main.o objects/vector.o objects/matrix.o objects/projection.o objects/triangle.o objects/screen.o objects/light.o objects/camera.o
engine: $(objects)
cc -o bin/engine $(objects) -lm
objects/main.o:
cc -c src/main.c -o objects/main.o
objects/vector.o:
cc -c src/vector.c -o objects/vector.o
objects/matrix.o:
cc -c src/matrix.c -o objects/matrix.o
objects/projection.o:
cc -c src/projection.c -o objects/projection.o
objects/triangle.o:
cc -c src/triangle.c -o objects/triangle.o
objects/light.o:
cc -c src/light.c -o objects/light.o
objects/camera.o:
cc -c src/camera.c -o objects/camera.o
objects/screen.o:
cc -c src/screen.c -o objects/screen.o
## Testing
testobjects = objects/vector.o objects/vector_test.o
runner = tests/runner.c
test: $(testobjects)
cc -o bin/test $(runner) $(testobjects) -lm
objects/vector_test.o:
cc -c tests/vector_test.c -o objects/vector_test.o
# common to both main program and testing
clean:
rm -f $(objects) engine
rm -f $(testobjects) test