Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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