-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
89 lines (72 loc) · 2.77 KB
/
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
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#*****************************************************************
# File: Makefile
# Author: Andrés Gavín Murillo, 716358
# Author: Abel Naya Forcano, 544125
# Date: Enero 2020
# Coms: Informática Gráfica - Path Tracer
# Ejecutar "make" para compilar (o "make -f Makefile")
# Ejecutar "make clean" para limpiar (borrar lo que genere)
#*****************************************************************
#---------------------------------------------------------
# macros
RM = /bin/rm -f # para limpiar
CC = g++ # compilador
#---------------------------------------------------------
# compilación y enlazado ("linkado")
CPPFLAGS=-I. -march=native -O3 -std=c++14 -pthread -fmax-errors=1 # opciones compilación
#---------------------------------------------------------
# vars
EJEC = PathTracer
MAIN = main
BRDF = BRDF
COL = Color
GEO = Geometry
HC = HCoord
IM = Image
MA = Material
OB = Object
PR = Progress
RA = Random
RE = Render
SC = Scene
TE = Texture
TR = Transform
all: ${EJEC}
#---------------------------------------------------------
# "linkar"
${EJEC}: ${MAIN}.o ${BRDF}.o ${COL}.o ${GEO}.o ${HC}.o ${IM}.o ${MA}.o ${OB}.o ${PR}.o ${RA}.o ${RE}.o ${SC}.o ${TE}.o ${TR}.o
${CC} ${MAIN}.o ${BRDF}.o ${COL}.o ${GEO}.o ${HC}.o ${IM}.o ${MA}.o ${OB}.o ${PR}.o ${RA}.o ${RE}.o ${SC}.o ${TE}.o ${TR}.o -o ${EJEC} ${CPPFLAGS}
#---------------------------------------------------------
# compilar
${MAIN}.o: ${MAIN}.cpp ${BRDF}.hpp ${BRDF}.cpp ${COL}.hpp ${COL}.cpp ${GEO}.hpp ${GEO}.cpp ${HC}.hpp ${HC}.cpp ${IM}.hpp ${IM}.cpp ${MA}.hpp ${MA}.cpp ${OB}.hpp ${OB}.cpp ${PR}.hpp ${PR}.cpp ${RA}.hpp ${RA}.cpp ${RE}.hpp ${RE}.cpp ${SC}.hpp ${SC}.cpp ${TE}.hpp ${TE}.cpp ${TR}.hpp ${TR}.cpp
${CC} -c ${MAIN}.cpp ${CPPFLAGS}
${BRDF}.o: ${BRDF}.hpp ${BRDF}.cpp
${CC} -c ${BRDF}.cpp ${CPPFLAGS}
${COL}.o: ${COL}.hpp ${COL}.cpp
${CC} -c ${COL}.cpp ${CPPFLAGS}
${GEO}.o: ${GEO}.hpp ${GEO}.cpp
${CC} -c ${GEO}.cpp ${CPPFLAGS}
${HC}.o: ${HC}.hpp ${HC}.cpp
${CC} -c ${HC}.cpp ${CPPFLAGS}
${IM}.o: ${IM}.hpp ${IM}.cpp
${CC} -c ${IM}.cpp ${CPPFLAGS}
${MA}.o: ${MA}.hpp ${MA}.cpp
${CC} -c ${MA}.cpp ${CPPFLAGS}
${OB}.o: ${OB}.hpp ${OB}.cpp
${CC} -c ${OB}.cpp ${CPPFLAGS}
${PR}.o: ${PR}.hpp ${PR}.cpp
${CC} -c ${PR}.cpp ${CPPFLAGS}
${RA}.o: ${RA}.hpp ${RA}.cpp
${CC} -c ${RA}.cpp ${CPPFLAGS}
${RE}.o: ${RE}.hpp ${RE}.cpp
${CC} -c ${RE}.cpp ${CPPFLAGS}
${SC}.o: ${SC}.hpp ${SC}.cpp
${CC} -c ${SC}.cpp ${CPPFLAGS}
${TE}.o: ${TE}.hpp ${TE}.cpp
${CC} -c ${TE}.cpp ${CPPFLAGS}
${TR}.o: ${TR}.hpp ${TR}.cpp
${CC} -c ${TR}.cpp ${CPPFLAGS}
#---------------------------------------------------------
# Cuidado con lo que se pone aquí, que se borra sin preguntar
clean:
$(RM) ${MAIN}.o ${BRDF}.o ${COL}.o ${GEO}.o ${HC}.o ${IM}.o ${MA}.o ${OB}.o ${PR}.o ${RA}.o ${RE}.o ${SC}.o ${TE}.o ${TR}.o