Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 514 lines (435 sloc) 18.278 kb
8fa358a @johnmccutchan Initial cut of NaCL build configuration
johnmccutchan authored
1 include config/version
2
3 SHELL = /bin/sh
4 ifeq ($(NACL_PACKAGES_BITSIZE), 32)
5 SYSTEM = nacl-32
b3f40a3 @johnmccutchan Build fixes
johnmccutchan authored
6 BIN_EXTENSION = .x86.nexe
9a64a10 @johnmccutchan Remove unnecessary -melf64_nacl
johnmccutchan authored
7 CFLAGS.EXTRA = -m32
8fa358a @johnmccutchan Initial cut of NaCL build configuration
johnmccutchan authored
8 else
9 SYSTEM = nacl-64
b3f40a3 @johnmccutchan Build fixes
johnmccutchan authored
10 BIN_EXTENSION = .x64.nexe
e9abdf0 @johnmccutchan Remove use of libGLU in nacl example. Add fixed function texture exam…
johnmccutchan authored
11 CFLAGS.EXTRA = -m64 -DREGAL_NO_ASSERT
f0ce5e0 @johnmccutchan Demo cleanups
johnmccutchan authored
12 #CFLAGS.EXTRA = -m64 -DREGAL_DEBUG=0 -DREGAL_ERROR=0 -DREGAL_LOG=0 -DREGAL_NO_ASSERT -DREGAL_LOG_APP=0 -DREGAL_LOG_DRIVER=0 -DREGAL_INTERNAL=0 -DREGAL_LOG_HTTP=0
8fa358a @johnmccutchan Initial cut of NaCL build configuration
johnmccutchan authored
13 endif
14 REGAL_NACL = 1
15 SYSTEM.SUPPORTED = $(shell test -f config/Makefile.$(SYSTEM) && echo 1)
16
17 ifeq ($(SYSTEM.SUPPORTED), 1)
18 include config/Makefile.$(SYSTEM)
19 else
20 $(error "Platform '$(SYSTEM)' not supported")
21 endif
22
23 REGAL_DEST ?= /usr
24 BINDIR ?= $(REGAL_DEST)/bin
25 LIBDIR ?= $(REGAL_DEST)/lib
26
27 # To disable stripping of binaries either:
28 # - use STRIP= on gmake command-line
29 # - edit this makefile to set STRIP to the empty string
30 #
31 # To disable symlinks:
32 # - use LN= on gmake command-line
33
34 AR ?= ar
35 INSTALL ?= install
36 STRIP ?= strip
37 RM ?= rm -f
38 LN ?= ln -sf
39
e4655bc @johnmccutchan Make fixes
johnmccutchan authored
40 CFLAGS.EXTRA += -fno-exceptions -fno-rtti
8fa358a @johnmccutchan Initial cut of NaCL build configuration
johnmccutchan authored
41 ifeq ($(MAKECMDGOALS), debug)
42 OPT = -g
43 STRIP :=
44 else
45 OPT = $(POPT)
46 endif
47 INCLUDE = -Iinclude
48 CFLAGS = $(OPT) $(WARN) $(INCLUDE) $(CFLAGS.EXTRA)
49
50 all debug: regal.lib regal.bin
51
52 # REGAL shared and static libraries
53
54 export:
55 scripts/Export.py --api gl 4.2 --api wgl 4.0 --api glx 4.0 --api cgl 1.4 --api egl 1.0 --outdir src/regal
56
e4655bc @johnmccutchan Make fixes
johnmccutchan authored
57 LIB.LDFLAGS := -lstdc++ -lpthread -ldl -lm -lppapi_gles2
8fa358a @johnmccutchan Initial cut of NaCL build configuration
johnmccutchan authored
58 LIB.LIBS :=
59
60 LIB.SRCS :=
61 LIB.SRCS += src/regal/RegalIff.cpp
62 LIB.SRCS += src/regal/Regal.cpp
63 LIB.SRCS += src/regal/RegalToken.cpp
64 LIB.SRCS += src/regal/RegalLog.cpp
65 LIB.SRCS += src/regal/RegalInit.cpp
66 LIB.SRCS += src/regal/RegalUtil.cpp
67 LIB.SRCS += src/regal/RegalConfig.cpp
68 LIB.SRCS += src/regal/RegalLookup.cpp
69 LIB.SRCS += src/regal/RegalHelper.cpp
70 LIB.SRCS += src/regal/RegalContext.cpp
71 LIB.SRCS += src/regal/RegalContextInfo.cpp
72 LIB.SRCS += src/regal/RegalDispatchEmu.cpp
73 LIB.SRCS += src/regal/RegalDispatchLog.cpp
74 LIB.SRCS += src/regal/RegalDispatchDebug.cpp
75 LIB.SRCS += src/regal/RegalDispatchError.cpp
76 LIB.SRCS += src/regal/RegalDispatchLoader.cpp
9a64a10 @johnmccutchan Remove unnecessary -melf64_nacl
johnmccutchan authored
77 LIB.SRCS += src/regal/RegalDispatchNacl.cpp
1bd8eae @nigels-com Add EGL static dispatch initialisation for ES2/EGL static linking pur…
nigels-com authored
78 LIB.SRCS += src/regal/RegalDispatchStaticES2.cpp
79 LIB.SRCS += src/regal/RegalDispatchStaticEGL.cpp
9a64a10 @johnmccutchan Remove unnecessary -melf64_nacl
johnmccutchan authored
80 LIB.SRCS += src/regal/RegalDispatchMissing.cpp
8fa358a @johnmccutchan Initial cut of NaCL build configuration
johnmccutchan authored
81 LIB.SRCS += src/regal/RegalHttp.cpp
82 LIB.SRCS += src/regal/RegalFavicon.cpp
83
84 ifneq ($(REGAL_NACL), 1)
85 LIB.SRCS += src/mongoose/mongoose.c
86 LIB.INCLUDE += -Isrc/mongoose
87 endif
88
89 LIB.SRCS.NAMES := $(notdir $(LIB.SRCS))
90
91 LIB.INCLUDE += -Isrc/boost
92
93 LIB.DEPS :=
94 LIB.DEPS += include/GL/Regal.h
95 LIB.DEPS += src/regal/RegalPrivate.h
96
97 LIB.OBJS := $(addprefix tmp/$(SYSTEM)/regal/static/,$(LIB.SRCS.NAMES))
98 LIB.OBJS := $(LIB.OBJS:.c=.o)
99 LIB.OBJS := $(LIB.OBJS:.cpp=.o)
100 LIB.SOBJS := $(addprefix tmp/$(SYSTEM)/regal/shared/,$(LIB.SRCS.NAMES))
101 LIB.SOBJS := $(LIB.SOBJS:.c=.o)
102 LIB.SOBJS := $(LIB.SOBJS:.cpp=.o)
103
104 CFLAGS += -DREGAL_NO_HTTP
105
6179f0a @nigels-com Replace DispatchState with Dispatcher
nigels-com authored
106 regal.lib: lib lib/$(LIB.SHARED) glu.lib
8fa358a @johnmccutchan Initial cut of NaCL build configuration
johnmccutchan authored
107
108 lib:
109 mkdir lib
110
111 lib/$(LIB.STATIC): $(LIB.OBJS)
112 $(AR) cr $@ $^
113 ifneq ($(STRIP),)
114 $(STRIP) -x $@
115 endif
116
117 lib/$(LIB.SHARED): $(LIB.SOBJS)
e4655bc @johnmccutchan Make fixes
johnmccutchan authored
118 $(CC) $(LDFLAGS.SO) -o $@ $^ $(LIB.LDFLAGS) $(LIB.LIBS)
8fa358a @johnmccutchan Initial cut of NaCL build configuration
johnmccutchan authored
119 ifneq ($(LN),)
120 $(LN) $(LIB.SHARED) lib/$(LIB.SONAME)
121 $(LN) $(LIB.SHARED) lib/$(LIB.DEVLNK)
122 ifneq ($(LIB.FRAMEWORK),)
123 $(LN) $(LIB.SHARED) lib/$(LIB.FRAMEWORK)
124 endif
125 endif
126 ifneq ($(STRIP),)
127 $(STRIP) -x $@
128 endif
129
130 tmp/$(SYSTEM)/regal/static/%.o: src/regal/%.cpp $(LIB.DEPS)
131 @mkdir -p $(dir $@)
132 $(CC) $(CFLAGS) $(CFLAGS.SO) $(LIB.INCLUDE) -o $@ -c $<
133
134 tmp/$(SYSTEM)/regal/shared/%.o: src/regal/%.cpp $(LIB.DEPS)
135 @mkdir -p $(dir $@)
136 $(CC) $(CFLAGS) $(PICFLAG) $(CFLAGS.SO) $(LIB.INCLUDE) -o $@ -c $<
137
138 tmp/$(SYSTEM)/regal/static/%.o: src/mongoose/%.c $(LIB.DEPS)
139 @mkdir -p $(dir $@)
140 $(CC) $(CFLAGS) $(CFLAGS.SO) $(LIB.INCLUDE) -o $@ -c $<
141
142 tmp/$(SYSTEM)/regal/shared/%.o: src/mongoose/%.c $(LIB.DEPS)
143 @mkdir -p $(dir $@)
144 $(CC) $(CFLAGS) $(PICFLAG) $(CFLAGS.SO) $(LIB.INCLUDE) -o $@ -c $<
145
146 #
147 # RegalGLEW
148 #
149
150 GLEW.SRCS += src/glew/src/glew.c
151 GLEW.SRCS.NAMES := $(notdir $(GLEW.SRCS))
152 GLEW.OBJS := $(addprefix tmp/$(SYSTEM)/glew/shared/,$(GLEW.SRCS.NAMES))
153 GLEW.OBJS := $(GLEW.OBJS:.c=.o)
154 GLEW.CFLAGS := -Isrc/glew/include -Isrc/glu/include -DGLEW_EXPORTS -DGLEW_BUILD -DGLEW_REGAL
155 GLEW.LIBS := -Llib -lRegal
156 GLEW.SHARED := libRegalGLEW.$(EXT.DYNAMIC)
157 GLEW.STATIC := libRegalGLEW.a
158
159 glew.lib: lib lib/$(GLEW.SHARED)
160
161 tmp/$(SYSTEM)/glew/shared/%.o: src/glew/src/%.c
162 @mkdir -p $(dir $@)
163 $(CC) $(CFLAGS) $(PICFLAG) $(GLEW.CFLAGS) $(CFLAGS.SO) -o $@ -c $<
164
165 lib/$(GLEW.SHARED): $(GLEW.OBJS) lib/$(LIB.SHARED)
166 $(LD) $(LDFLAGS.DYNAMIC) -o $@ $^ $(LIB.LDFLAGS) $(GLEW.LIBS) -lpthread
167 ifneq ($(STRIP),)
168 $(STRIP) -x $@
169 endif
170
171 #
172 # RegalGLEW glewinfo
173 #
174
175 GLEWINFO.SRCS += src/glew/src/glewinfo.c
176 GLEWINFO.SRCS.NAMES := $(notdir $(GLEWINFO.SRCS))
177 GLEWINFO.OBJS := $(addprefix tmp/$(SYSTEM)/glewinfo/static/,$(GLEWINFO.SRCS.NAMES))
178 GLEWINFO.OBJS := $(GLEWINFO.OBJS:.c=.o)
179 GLEWINFO.CFLAGS := -Iinclude -Isrc/glew/include -DGLEW_REGAL
180 GLEWINFO.LIBS += -Llib -lRegal -lRegalGLEW $(LDFLAGS.GLUT) $(LDFLAGS.AGL)
181
182 ifneq ($(filter linux%,$(SYSTEM)),)
183 GLEWINFO.LIBS += -lX11
184 endif
185
186 tmp/$(SYSTEM)/glewinfo/static/%.o: src/glew/src/%.c
187 @mkdir -p $(dir $@)
188 $(CC) $(CFLAGS) $(GLEWINFO.CFLAGS) $(CFLAGS.SO) -o $@ -c $<
189
190 bin/glewinfo: $(GLEWINFO.OBJS) lib/$(LIB.SHARED) lib/$(GLEW.SHARED)
191 $(LD) -o $@ $^ $(LIB.LDFLAGS) $(GLEWINFO.LIBS)
192 ifneq ($(STRIP),)
193 $(STRIP) -x $@
194 endif
195
196
197 ifneq ($(filter darwin%,$(SYSTEM)),)
198 glut.lib:
199
200 else
201
202 #
203 # RegalGLUT
204 #
205
206 # NOT for windows...
207
208 GLUT.SRCS += src/glut/src/capturexfont.c
209 GLUT.SRCS += src/glut/src/glut_glxext.c
210 GLUT.SRCS += src/glut/src/glut_menu.c
211 GLUT.SRCS += src/glut/src/glut_menu2.c
212 GLUT.SRCS += src/glut/src/layerutil.c
213
214 # Windows and Linux...
215
216 GLUT.SRCS += src/glut/src/glut_8x13.c
217 GLUT.SRCS += src/glut/src/glut_9x15.c
218 GLUT.SRCS += src/glut/src/glut_bitmap.c
219 GLUT.SRCS += src/glut/src/glut_bwidth.c
220 GLUT.SRCS += src/glut/src/glut_cindex.c
221 GLUT.SRCS += src/glut/src/glut_cmap.c
222 GLUT.SRCS += src/glut/src/glut_cursor.c
223 GLUT.SRCS += src/glut/src/glut_dials.c
224 GLUT.SRCS += src/glut/src/glut_dstr.c
225 GLUT.SRCS += src/glut/src/glut_event.c
226 GLUT.SRCS += src/glut/src/glut_ext.c
227 GLUT.SRCS += src/glut/src/glut_fcb.c
228 GLUT.SRCS += src/glut/src/glut_fullscrn.c
229 GLUT.SRCS += src/glut/src/glut_gamemode.c
230 GLUT.SRCS += src/glut/src/glut_get.c
231 GLUT.SRCS += src/glut/src/glut_hel10.c
232 GLUT.SRCS += src/glut/src/glut_hel12.c
233 GLUT.SRCS += src/glut/src/glut_hel18.c
234 GLUT.SRCS += src/glut/src/glut_init.c
235 GLUT.SRCS += src/glut/src/glut_input.c
236 GLUT.SRCS += src/glut/src/glut_joy.c
237 GLUT.SRCS += src/glut/src/glut_key.c
238 GLUT.SRCS += src/glut/src/glut_keyctrl.c
239 GLUT.SRCS += src/glut/src/glut_keyup.c
240 GLUT.SRCS += src/glut/src/glut_mesa.c
241 GLUT.SRCS += src/glut/src/glut_modifier.c
242 GLUT.SRCS += src/glut/src/glut_mroman.c
243 GLUT.SRCS += src/glut/src/glut_overlay.c
244 GLUT.SRCS += src/glut/src/glut_roman.c
245 GLUT.SRCS += src/glut/src/glut_shapes.c
246 GLUT.SRCS += src/glut/src/glut_space.c
247 GLUT.SRCS += src/glut/src/glut_stroke.c
248 GLUT.SRCS += src/glut/src/glut_swap.c
249 GLUT.SRCS += src/glut/src/glut_swidth.c
250 GLUT.SRCS += src/glut/src/glut_tablet.c
251 GLUT.SRCS += src/glut/src/glut_teapot.c
252 GLUT.SRCS += src/glut/src/glut_tr10.c
253 GLUT.SRCS += src/glut/src/glut_tr24.c
254 GLUT.SRCS += src/glut/src/glut_util.c
255 GLUT.SRCS += src/glut/src/glut_vidresize.c
256 GLUT.SRCS += src/glut/src/glut_warp.c
257 GLUT.SRCS += src/glut/src/glut_win.c
258 GLUT.SRCS += src/glut/src/glut_winmisc.c
259 GLUT.SRCS += src/glut/src/glut_ppm.c
260 GLUT.SRCS.NAMES := $(notdir $(GLUT.SRCS))
261 GLUT.OBJS := $(addprefix tmp/$(SYSTEM)/glut/shared/,$(GLUT.SRCS.NAMES))
262 GLUT.OBJS := $(GLUT.OBJS:.c=.o)
263 GLUT.CFLAGS := -Isrc/glut/include -DBUILD_GLUT32 -DGLUT_BUILDING_LIB -DGLUT_STATIC
264 GLUT.LIBS := -Llib -lRegal
265 GLUT.LIBS += -lGLU -lX11 -lXmu -lXi
266 GLUT.LIBS += -lpthread -lm
267 GLUT.SHARED := libRegalGLUT.$(EXT.DYNAMIC)
268 GLUT.STATIC := libRegalGLUT.a
269
270 glut.lib: lib lib/$(GLUT.SHARED)
271
272 tmp/$(SYSTEM)/glut/shared/%.o: src/glut/src/%.c
273 @mkdir -p $(dir $@)
274 $(CC) $(CFLAGS) $(PICFLAG) $(GLUT.CFLAGS) $(CFLAGS.SO) -o $@ -c $<
275
276 lib/$(GLUT.SHARED): $(GLUT.OBJS) lib/$(LIB.SHARED)
277 $(LD) $(LDFLAGS.DYNAMIC) -o $@ $^ $(GLUT.LIBS)
278 ifneq ($(STRIP),)
279 $(STRIP) -x $@
280 endif
281
282 endif
283
6179f0a @nigels-com Replace DispatchState with Dispatcher
nigels-com authored
284 #
285 # RegalGLU
286 #
287
288 GLU.SRCS += src/glu/libtess/dict.c
289 GLU.SRCS += src/glu/libtess/geom.c
290 GLU.SRCS += src/glu/libtess/memalloc.c
291 GLU.SRCS += src/glu/libtess/mesh.c
292 GLU.SRCS += src/glu/libtess/normal.c
293 #GLU.SRCS += src/glu/libtess/priorityq-heap.c
294 GLU.SRCS += src/glu/libtess/priorityq.c
295 GLU.SRCS += src/glu/libtess/render.c
296 GLU.SRCS += src/glu/libtess/sweep.c
297 GLU.SRCS += src/glu/libtess/tess.c
298 GLU.SRCS += src/glu/libtess/tessmono.c
299 GLU.SRCS += src/glu/libutil/error.c
300 GLU.SRCS += src/glu/libutil/glue.c
301 GLU.SRCS += src/glu/libutil/mipmap.c
302 GLU.SRCS += src/glu/libutil/project.c
303 GLU.SRCS += src/glu/libutil/quad.c
304 GLU.SRCS += src/glu/libutil/registry.c
305
306 GLU.SRCS += src/glu/libnurbs/interface/bezierEval.cc
307 GLU.SRCS += src/glu/libnurbs/interface/bezierPatch.cc
308 GLU.SRCS += src/glu/libnurbs/interface/bezierPatchMesh.cc
309 GLU.SRCS += src/glu/libnurbs/interface/glcurveval.cc
310 GLU.SRCS += src/glu/libnurbs/interface/glinterface.cc
311 GLU.SRCS += src/glu/libnurbs/interface/glrenderer.cc
312 GLU.SRCS += src/glu/libnurbs/interface/glsurfeval.cc
313 GLU.SRCS += src/glu/libnurbs/interface/incurveeval.cc
314 GLU.SRCS += src/glu/libnurbs/interface/insurfeval.cc
315 GLU.SRCS += src/glu/libnurbs/internals/arc.cc
316 GLU.SRCS += src/glu/libnurbs/internals/arcsorter.cc
317 GLU.SRCS += src/glu/libnurbs/internals/arctess.cc
318 GLU.SRCS += src/glu/libnurbs/internals/backend.cc
319 GLU.SRCS += src/glu/libnurbs/internals/basiccrveval.cc
320 GLU.SRCS += src/glu/libnurbs/internals/basicsurfeval.cc
321 GLU.SRCS += src/glu/libnurbs/internals/bin.cc
322 GLU.SRCS += src/glu/libnurbs/internals/bufpool.cc
323 GLU.SRCS += src/glu/libnurbs/internals/cachingeval.cc
324 GLU.SRCS += src/glu/libnurbs/internals/ccw.cc
325 GLU.SRCS += src/glu/libnurbs/internals/coveandtiler.cc
326 GLU.SRCS += src/glu/libnurbs/internals/curve.cc
327 GLU.SRCS += src/glu/libnurbs/internals/curvelist.cc
328 GLU.SRCS += src/glu/libnurbs/internals/curvesub.cc
329 GLU.SRCS += src/glu/libnurbs/internals/dataTransform.cc
330 GLU.SRCS += src/glu/libnurbs/internals/displaylist.cc
331 GLU.SRCS += src/glu/libnurbs/internals/flist.cc
332 GLU.SRCS += src/glu/libnurbs/internals/flistsorter.cc
333 GLU.SRCS += src/glu/libnurbs/internals/hull.cc
334 GLU.SRCS += src/glu/libnurbs/internals/intersect.cc
335 GLU.SRCS += src/glu/libnurbs/internals/knotvector.cc
336 GLU.SRCS += src/glu/libnurbs/internals/mapdesc.cc
337 GLU.SRCS += src/glu/libnurbs/internals/mapdescv.cc
338 GLU.SRCS += src/glu/libnurbs/internals/maplist.cc
339 GLU.SRCS += src/glu/libnurbs/internals/mesher.cc
340 GLU.SRCS += src/glu/libnurbs/internals/monotonizer.cc
341 GLU.SRCS += src/glu/libnurbs/internals/monoTriangulationBackend.cc
342 GLU.SRCS += src/glu/libnurbs/internals/mycode.cc
343 GLU.SRCS += src/glu/libnurbs/internals/nurbsinterfac.cc
344 GLU.SRCS += src/glu/libnurbs/internals/nurbstess.cc
345 GLU.SRCS += src/glu/libnurbs/internals/patch.cc
346 GLU.SRCS += src/glu/libnurbs/internals/patchlist.cc
347 GLU.SRCS += src/glu/libnurbs/internals/quilt.cc
348 GLU.SRCS += src/glu/libnurbs/internals/reader.cc
349 GLU.SRCS += src/glu/libnurbs/internals/renderhints.cc
350 GLU.SRCS += src/glu/libnurbs/internals/slicer.cc
351 GLU.SRCS += src/glu/libnurbs/internals/sorter.cc
352 GLU.SRCS += src/glu/libnurbs/internals/splitarcs.cc
353 GLU.SRCS += src/glu/libnurbs/internals/subdivider.cc
354 GLU.SRCS += src/glu/libnurbs/internals/tobezier.cc
355 GLU.SRCS += src/glu/libnurbs/internals/trimline.cc
356 GLU.SRCS += src/glu/libnurbs/internals/trimregion.cc
357 GLU.SRCS += src/glu/libnurbs/internals/trimvertpool.cc
358 GLU.SRCS += src/glu/libnurbs/internals/uarray.cc
359 GLU.SRCS += src/glu/libnurbs/internals/varray.cc
360 GLU.SRCS += src/glu/libnurbs/nurbtess/directedLine.cc
361 GLU.SRCS += src/glu/libnurbs/nurbtess/gridWrap.cc
362 GLU.SRCS += src/glu/libnurbs/nurbtess/monoChain.cc
363 GLU.SRCS += src/glu/libnurbs/nurbtess/monoPolyPart.cc
364 GLU.SRCS += src/glu/libnurbs/nurbtess/monoTriangulation.cc
365 GLU.SRCS += src/glu/libnurbs/nurbtess/partitionX.cc
366 GLU.SRCS += src/glu/libnurbs/nurbtess/partitionY.cc
367 GLU.SRCS += src/glu/libnurbs/nurbtess/polyDBG.cc
368 GLU.SRCS += src/glu/libnurbs/nurbtess/polyUtil.cc
369 GLU.SRCS += src/glu/libnurbs/nurbtess/primitiveStream.cc
370 GLU.SRCS += src/glu/libnurbs/nurbtess/quicksort.cc
371 GLU.SRCS += src/glu/libnurbs/nurbtess/rectBlock.cc
372 GLU.SRCS += src/glu/libnurbs/nurbtess/sampleComp.cc
373 GLU.SRCS += src/glu/libnurbs/nurbtess/sampleCompBot.cc
374 GLU.SRCS += src/glu/libnurbs/nurbtess/sampleCompRight.cc
375 GLU.SRCS += src/glu/libnurbs/nurbtess/sampleCompTop.cc
376 GLU.SRCS += src/glu/libnurbs/nurbtess/sampledLine.cc
377 GLU.SRCS += src/glu/libnurbs/nurbtess/sampleMonoPoly.cc
378 GLU.SRCS += src/glu/libnurbs/nurbtess/searchTree.cc
379
380 GLU.SRCS.NAMES := $(notdir $(GLU.SRCS))
381 GLU.OBJS := $(addprefix tmp/$(SYSTEM)/glu/shared/,$(GLU.SRCS.NAMES))
382 GLU.OBJS := $(GLU.OBJS:.c=.o) $(GLU.OBJS:.cc=.o)
383 GLU.OBJS := $(filter %.o,$(GLU.OBJS))
384 GLU.CFLAGS := -Isrc/glu/include -Isrc/glu/libnurbs/interface -Isrc/glu/libnurbs/internals -Isrc/glu/libnurbs/nurbtess
385 GLU.CFLAGS += -DLIBRARYBUILD
386 GLU.LIBS := -Llib
387 GLU.LIBS += -lpthread -lm
388 GLU.SHARED := libRegalGLU.so
389 GLU.STATIC := libRegalGLU.a
390
391 glu.lib: lib lib/$(GLU.SHARED)
392
393 tmp/$(SYSTEM)/glu/shared/%.o: src/glu/libtess/%.c
394 @mkdir -p $(dir $@)
395 $(CCACHE) $(CC) $(CFLAGS) $(PICFLAG) $(GLU.CFLAGS) $(CFLAGS.SO) -o $@ -c $<
396
397 tmp/$(SYSTEM)/glu/shared/%.o: src/glu/libutil/%.c
398 @mkdir -p $(dir $@)
399 $(CCACHE) $(CC) $(CFLAGS) $(PICFLAG) $(GLU.CFLAGS) $(CFLAGS.SO) -o $@ -c $<
400
401 tmp/$(SYSTEM)/glu/shared/%.o: src/glu/libnurbs/interface/%.cc
402 @mkdir -p $(dir $@)
403 $(CCACHE) $(CC) $(CFLAGS) $(PICFLAG) $(GLU.CFLAGS) $(CFLAGS.SO) -o $@ -c $<
404
405 tmp/$(SYSTEM)/glu/shared/%.o: src/glu/libnurbs/internals/%.cc
406 @mkdir -p $(dir $@)
407 $(CCACHE) $(CC) $(CFLAGS) $(PICFLAG) $(GLU.CFLAGS) $(CFLAGS.SO) -o $@ -c $<
408
409 tmp/$(SYSTEM)/glu/shared/%.o: src/glu/libnurbs/nurbtess/%.cc
410 @mkdir -p $(dir $@)
411 $(CCACHE) $(CC) $(CFLAGS) $(PICFLAG) $(GLU.CFLAGS) $(CFLAGS.SO) -o $@ -c $<
412
413 lib/$(GLU.SHARED): $(GLU.OBJS)
414 $(CCACHE) $(CC) $(LDFLAGS.SO) $(LDFLAGS.EXTRA) $(LDFLAGS.DYNAMIC) -o $@ $^
415 ifneq ($(STRIP),)
416 $(STRIP) -x $@
417 endif
418
8fa358a @johnmccutchan Initial cut of NaCL build configuration
johnmccutchan authored
419 # Examples
420
b3f40a3 @johnmccutchan Build fixes
johnmccutchan authored
421 regal.bin: lib bin bin/nacl$(BIN_EXTENSION)
8fa358a @johnmccutchan Initial cut of NaCL build configuration
johnmccutchan authored
422
423 bin:
424 mkdir bin
425
426 #
427 # dreamtorus
428 #
429
430 DREAMTORUS.SRCS += examples/dreamtorus/src/render.cpp
431 DREAMTORUS.SRCS += examples/dreamtorus/glut/code/main.cpp
432 DREAMTORUS.SRCS.NAMES := $(notdir $(DREAMTORUS.SRCS))
433 DREAMTORUS.OBJS := $(addprefix tmp/$(SYSTEM)/dreamtorus/static/,$(DREAMTORUS.SRCS.NAMES))
434 DREAMTORUS.OBJS := $(DREAMTORUS.OBJS:.cpp=.o)
435 DREAMTORUS.CFLAGS := -Iinclude -Iexamples/dreamtorus/src
436 DREAMTORUS.LIBS += -Llib -lRegal $(LDFLAGS.GLUT)
437 DREAMTORUS.LIBS += -lm -lpthread
438
439 tmp/$(SYSTEM)/dreamtorus/static/%.o: examples/dreamtorus/src/%.cpp
440 @mkdir -p $(dir $@)
441 $(CC) $(CFLAGS) $(DREAMTORUS.CFLAGS) $(CFLAGS.SO) -o $@ -c $<
442
443 tmp/$(SYSTEM)/dreamtorus/static/%.o: examples/dreamtorus/glut/code/%.cpp
444 @mkdir -p $(dir $@)
445 $(CC) $(CFLAGS) $(DREAMTORUS.CFLAGS) $(CFLAGS.SO) -o $@ -c $<
446
447 bin/dreamtorus: $(DREAMTORUS.OBJS) lib/$(LIB.SHARED)
448 $(LD) -o $@ $^ $(LIB.LDFLAGS) $(DREAMTORUS.LIBS)
449 ifneq ($(STRIP),)
450 $(STRIP) -x $@
451 endif
452
453 #
454 # tiger
455 #
456
457 TIGER.SRCS += examples/tiger/nvpr_tiger.c
458 TIGER.SRCS += examples/tiger/tiger.c
459 TIGER.SRCS += examples/tiger/xform.c
460 TIGER.SRCS.NAMES := $(notdir $(TIGER.SRCS))
461 TIGER.OBJS := $(addprefix tmp/$(SYSTEM)/tiger/static/,$(TIGER.SRCS.NAMES))
462 TIGER.OBJS := $(TIGER.OBJS:.c=.o)
463 TIGER.CFLAGS := -Iinclude
464 TIGER.LIBS += -Llib -lRegalGLEW $(LDFLAGS.GLUT) -lRegal
465 TIGER.LIBS += -lm -lpthread
466
467 tmp/$(SYSTEM)/tiger/static/%.o: examples/tiger/%.c
468 @mkdir -p $(dir $@)
469 $(CC) $(CFLAGS) $(TIGER.CFLAGS) $(CFLAGS.SO) -o $@ -c $<
470
471 bin/tiger: $(TIGER.OBJS) lib/$(GLEW.SHARED) lib/$(LIB.SHARED)
472 $(LD) -o $@ $^ $(TIGER.LIBS)
473 ifneq ($(STRIP),)
474 $(STRIP) -x $@
475 endif
476
477 NACLHELLOWORLD.SRCS += examples/nacl/main.cpp
478 NACLHELLOWORLD.SRCS.NAMES := $(notdir $(NACLHELLOWORLD.SRCS))
479 NACLHELLOWORLD.OBJS := $(addprefix tmp/$(SYSTEM)/nacl/static/,$(NACLHELLOWORLD.SRCS.NAMES))
480 NACLHELLOWORLD.OBJS := $(NACLHELLOWORLD.OBJS:.cpp=.o)
481 NACLHELLOWORLD.CFLAGS := -Iinclude
e9abdf0 @johnmccutchan Remove use of libGLU in nacl example. Add fixed function texture exam…
johnmccutchan authored
482 NACLHELLOWORLD.LIBS += -L./lib -B static -lRegal
483 NACLHELLOWORLD.LIBS += -lm -lpthread -lppapi -lppapi_gles2 -lstdc++
8fa358a @johnmccutchan Initial cut of NaCL build configuration
johnmccutchan authored
484
485 tmp/$(SYSTEM)/nacl/static/%.o: examples/nacl/%.cpp
486 @mkdir -p $(dir $@)
487 $(CC) $(CFLAGS) $(NACLHELLOWORLD.CFLAGS) $(CFLAGS.SO) -o $@ -c $<
488
e4655bc @johnmccutchan Make fixes
johnmccutchan authored
489 bin/nacl$(BIN_EXTENSION): $(NACLHELLOWORLD.OBJS)
490 $(CC) -o $@ $^ $(NACLHELLOWORLD.LIBS)
8fa358a @johnmccutchan Initial cut of NaCL build configuration
johnmccutchan authored
491 ifneq ($(STRIP),)
492 $(STRIP) -x $@
493 endif
494
495 #
496 # GLUT dependency for non-Mac builds
497 #
498
499 ifeq ($(filter darwin%,$(SYSTEM)),)
500 bin/tiger: lib/$(GLUT.SHARED)
501 bin/dreamtorus: lib/$(GLUT.SHARED)
502 endif
503
504 clean:
505 $(RM) -r tmp/
506 $(RM) -r lib/
e4655bc @johnmccutchan Make fixes
johnmccutchan authored
507 $(RM) -f bin/nacl$(BIN_EXTENSION)
8fa358a @johnmccutchan Initial cut of NaCL build configuration
johnmccutchan authored
508 $(RM) glew.pc glewmx.pc
509
510
511 .PHONY: export
512 .PHONY: regal.lib regal.bin all debug
513 .PHONY: clean distclean tardist dist-win32 dist-src
Something went wrong with that request. Please try again.