forked from FlorianRhiem/VFRendering
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
187 lines (169 loc) · 6.89 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
CXXFLAGS += -Wall -Wextra -Werror -std=c++11 -pedantic -fPIC
CXXFLAGS += -Iinclude
CXXFLAGS += -Ithirdparty/glad/include
CXXFLAGS += -Ithirdparty/glm/include
CXXFLAGS += -Ithirdparty/qhull/src
CXXFLAGS += -Ithirdparty/qhull/src/libqhullcpp
LDFLAGS += -Lthirdparty/qhull/lib
OBJS=\
build/ArrowRenderer.o\
build/RendererBase.o\
build/BoundingBoxRenderer.o\
build/CombinedRenderer.o\
build/CoordinateSystemRenderer.o\
build/FPSCounter.o\
build/Geometry.o\
build/View.o\
build/IsosurfaceRenderer.o\
build/VectorSphereRenderer.o\
build/SurfaceRenderer.o\
build/VectorfieldIsosurface.o\
build/Utilities.o\
build/Options.o\
OBJS += build/glad.o
default: build/libVFRendering.so
all: demo build/libVFRendering.so
thirdparty/qhull/Makefile:
cd thirdparty && git clone https://github.com/qhull/qhull.git
thirdparty/qhull/lib/libqhullcpp.a: thirdparty/qhull/Makefile
make -C thirdparty/qhull/ bin-lib lib/libqhullcpp.a "CXX_OPTS1=-Isrc -O3 -fPIC" "CC=${CC}" "CXX=${CXX}"
thirdparty/qhull/lib/libqhullstatic_r.a: thirdparty/qhull/Makefile
make -C thirdparty/qhull/ bin-lib lib/libqhullstatic_r.a "CXX_OPTS1=-Isrc -O3 -fPIC" "CC=${CC}" "CXX=${CXX}"
thirdparty/qhull/src/libqhullcpp/Qhull.h: thirdparty/qhull/Makefile
thirdparty/qhull/src/libqhullcpp/QhullFacetList.h: thirdparty/qhull/Makefile
thirdparty/qhull/src/libqhullcpp/QhullVertexSet.h: thirdparty/qhull/Makefile
build/.exists:
mkdir -p build
touch build/.exists
build/%.o: src/%.cxx build/.exists
${CXX} -c $< -o $@ ${CXXFLAGS}
build/glad.o: thirdparty/glad/src/glad.c
${CC} -c $< -o $@ -Ithirdparty/glad/include -fPIC
build/libVFRendering.a: ${OBJS}
ar rcs $@ $^
build/libVFRendering.so: ${OBJS} thirdparty/qhull/lib/libqhullcpp.a thirdparty/qhull/lib/libqhullstatic_r.a
${CXX} ${CXXFLAGS} -shared -o $@ ${OBJS} ${LDFLAGS} -lqhullcpp -lqhullstatic_r
demo: demo.cxx build/libVFRendering.a thirdparty/qhull/lib/libqhullcpp.a thirdparty/qhull/lib/libqhullstatic_r.a
${CXX} ${CXXFLAGS} -o $@ $< -lglfw build/libVFRendering.a ${LDFLAGS} -lqhullcpp -lqhullstatic_r -ldl
clean:
rm -rf build
rm -f demo
.PHONY: default clean all
build/ArrowRenderer.o: src/ArrowRenderer.cxx \
include/VFRendering/ArrowRenderer.hxx \
include/VFRendering/RendererBase.hxx \
include/VFRendering/Options.hxx \
include/VFRendering/View.hxx \
include/VFRendering/FPSCounter.hxx \
include/VFRendering/Utilities.hxx \
include/VFRendering/Geometry.hxx \
include/VFRendering/BoundingBoxRenderer.hxx \
include/shaders/arrows.vert.glsl.hxx \
include/shaders/arrows.frag.glsl.hxx
build/BoundingBoxRenderer.o: src/BoundingBoxRenderer.cxx \
include/VFRendering/BoundingBoxRenderer.hxx \
include/VFRendering/RendererBase.hxx \
include/VFRendering/Options.hxx \
include/VFRendering/View.hxx \
include/VFRendering/FPSCounter.hxx \
include/VFRendering/Utilities.hxx \
include/VFRendering/Geometry.hxx \
include/shaders/boundingbox.vert.glsl.hxx \
include/shaders/boundingbox.frag.glsl.hxx
build/CombinedRenderer.o: src/CombinedRenderer.cxx \
include/VFRendering/CombinedRenderer.hxx \
include/VFRendering/RendererBase.hxx \
include/VFRendering/Options.hxx \
include/VFRendering/View.hxx \
include/VFRendering/FPSCounter.hxx \
include/VFRendering/Utilities.hxx \
include/VFRendering/Geometry.hxx
build/CoordinateSystemRenderer.o: src/CoordinateSystemRenderer.cxx \
include/VFRendering/CoordinateSystemRenderer.hxx \
include/VFRendering/RendererBase.hxx \
include/VFRendering/Options.hxx \
include/VFRendering/View.hxx \
include/VFRendering/FPSCounter.hxx \
include/VFRendering/Utilities.hxx \
include/VFRendering/Geometry.hxx \
include/shaders/coordinatesystem.vert.glsl.hxx \
include/shaders/coordinatesystem.frag.glsl.hxx
build/FPSCounter.o: src/FPSCounter.cxx \
include/VFRendering/FPSCounter.hxx
build/Geometry.o: src/Geometry.cxx \
include/VFRendering/Geometry.hxx \
thirdparty/qhull/src/libqhullcpp/Qhull.h \
thirdparty/qhull/src/libqhullcpp/QhullFacetList.h \
thirdparty/qhull/src/libqhullcpp/QhullVertexSet.h
build/IsosurfaceRenderer.o: src/IsosurfaceRenderer.cxx \
include/VFRendering/IsosurfaceRenderer.hxx \
include/VFRendering/RendererBase.hxx \
include/VFRendering/Options.hxx \
include/VFRendering/View.hxx \
include/VFRendering/FPSCounter.hxx \
include/VFRendering/Utilities.hxx \
include/VFRendering/Geometry.hxx \
include/VectorfieldIsosurface.hxx \
include/shaders/isosurface.vert.glsl.hxx \
include/shaders/isosurface.frag.glsl.hxx
build/RendererBase.o: src/RendererBase.cxx \
include/VFRendering/RendererBase.hxx \
include/VFRendering/Options.hxx \
include/VFRendering/View.hxx \
include/VFRendering/FPSCounter.hxx \
include/VFRendering/Utilities.hxx \
include/VFRendering/Geometry.hxx
build/SurfaceRenderer.o: src/SurfaceRenderer.cxx \
include/VFRendering/SurfaceRenderer.hxx \
include/VFRendering/RendererBase.hxx \
include/VFRendering/Options.hxx \
include/VFRendering/View.hxx \
include/VFRendering/FPSCounter.hxx \
include/VFRendering/Utilities.hxx \
include/VFRendering/Geometry.hxx \
include/shaders/surface.vert.glsl.hxx \
include/shaders/surface.frag.glsl.hxx
build/Utilities.o: src/Utilities.cxx \
include/VFRendering/Utilities.hxx \
include/VFRendering/Options.hxx \
include/VFRendering/View.hxx \
include/VFRendering/FPSCounter.hxx \
include/VFRendering/Geometry.hxx \
include/shaders/colormap.hsv.glsl.hxx \
include/shaders/colormap.black.glsl.hxx \
include/shaders/colormap.white.glsl.hxx \
include/shaders/colormap.bluered.glsl.hxx \
include/shaders/colormap.bluegreenred.glsl.hxx \
include/shaders/colormap.bluewhitered.glsl.hxx
build/VectorfieldIsosurface.o: src/VectorfieldIsosurface.cxx \
include/VFRendering/Geometry.hxx
build/VectorSphereRenderer.o: src/VectorSphereRenderer.cxx \
include/VFRendering/VectorSphereRenderer.hxx \
include/VFRendering/RendererBase.hxx \
include/VFRendering/Options.hxx \
include/VFRendering/View.hxx \
include/VFRendering/FPSCounter.hxx \
include/VFRendering/Utilities.hxx \
include/VFRendering/Geometry.hxx \
include/shaders/sphere_points.vert.glsl.hxx \
include/shaders/sphere_points.frag.glsl.hxx \
include/shaders/sphere_background.vert.glsl.hxx \
include/shaders/sphere_background.frag.glsl.hxx
build/View.o: src/View.cxx include/VFRendering/View.hxx \
include/VFRendering/Options.hxx \
include/VFRendering/FPSCounter.hxx \
include/VFRendering/Utilities.hxx \
include/VFRendering/Geometry.hxx \
include/VFRendering/RendererBase.hxx \
include/VFRendering/ArrowRenderer.hxx \
include/VFRendering/SurfaceRenderer.hxx \
include/VFRendering/IsosurfaceRenderer.hxx \
include/VFRendering/VectorSphereRenderer.hxx \
include/VFRendering/BoundingBoxRenderer.hxx \
include/VFRendering/CombinedRenderer.hxx \
include/VFRendering/CoordinateSystemRenderer.hxx \
include/VFRendering/View.hxx \
include/VFRendering/Options.hxx \
include/VFRendering/FPSCounter.hxx \
include/VFRendering/Utilities.hxx \
include/VFRendering/Geometry.hxx