1 # -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*-
6 # ***** BEGIN GPL LICENSE BLOCK *****
8 # This program is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public License
10 # as published by the Free Software Foundation; either version 2
11 # of the License, or (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software Foundation,
20 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 # The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
23 # All rights reserved.
25 # The Original Code is: all of this file.
29 # ***** END GPL LICENSE BLOCK *****
31 # Top level makefile. Start looping through subdirs and link....
35 export NANENV := $(shell env | grep NAN_)
38 include nan_definitions.mk
40 DIRS = creator blender kernel
42 ifneq ($(NAN_NO_KETSJI),true)
50 ########## buildinfo kludge ###################
51 CPPFLAGS += -I../Physics/common
52 CPPFLAGS += -I../Physics/Dummy
54 BUILDINFO_O = $(DIR)/$(DEBUG_DIR)buildinfo.o
55 BUILDINFO_C = $(SRCHOME)/creator/buildinfo.c
56 BUILD_DATE := $(shell date "+%Y-%m-%d")
57 BUILD_TIME := $(shell date "+%H:%M:%S")
58 BUILD_REV := $(shell svnversion)
61 ############# set pyplayerlib ##################
64 ############# libraries ##################
65 # COMLIB COMmon LIBraries for all targets
66 # BPLIB Browser Plugin LIBraries
67 # SPLIB1 Standalone Player LIBraries (pre COMLIB)
68 # SPLIB Standalone Player LIBraries (post COMLIB)
69 # PULIB PUblisher LIBraries
70 # GRPLIB Gui and Render LIBraries for Publisher
71 # LLIBS dynamic system libraries
72 # SADD Static OpenGL libraries
73 # DADD Dynamic OpenGL libraries
74 # NSPLUGLIB PLUGin LIBraries for ns-style api
75 # PLUGAPPLIB libs that form the application to be plugged in
76 # Note: the order is important here
79 GRPLIB = $(OCGDIR)/creator/$(DEBUG_DIR)libcreator.a
80 GRPLIB += $(OCGDIR)/blender/windowmanager/$(DEBUG_DIR)libwindowmanager.a
81 GRPLIB += $(NAN_GHOST)/lib/$(DEBUG_DIR)libghost.a
82 GRPLIB += $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
83 GRPLIB += $(OCGDIR)/blender/render/$(DEBUG_DIR)librender.a
84 GRPLIB += $(OCGDIR)/blender/render/$(DEBUG_DIR)librender_raytrace.a
86 # nlin: the reason that some libraries appear more than once below is
87 # to handle circular dependencies in linking among libraries... some
88 # linkers (e.g. under Linux) need libs to be specified multiple times
89 # to properly resolve circular dependencies. ugly, but it works...
90 # the repeat entries could probably be trimmed down.
91 COMLIB = $(OCGDIR)/blender/blenkernel/$(DEBUG_DIR)libblenkernel.a
92 COMLIB += $(OCGDIR)/blender/blenloader/$(DEBUG_DIR)libblenloader.a
93 COMLIB += $(OCGDIR)/blender/blenpluginapi/$(DEBUG_DIR)libblenpluginapi.a
94 COMLIB += $(OCGDIR)/blender/nodes_shd/$(DEBUG_DIR)libnodes_shd.a
95 COMLIB += $(OCGDIR)/blender/nodes_cmp/$(DEBUG_DIR)libnodes_cmp.a
96 COMLIB += $(OCGDIR)/blender/nodes_tex/$(DEBUG_DIR)libnodes_tex.a
97 COMLIB += $(OCGDIR)/blender/nodes/$(DEBUG_DIR)libnodes.a
98 COMLIB += $(OCGDIR)/blender/imbuf/$(DEBUG_DIR)libimbuf.a
99 COMLIB += $(OCGDIR)/blender/ikplugin/$(DEBUG_DIR)libikplugin.a
100 COMLIB += $(NAN_IKSOLVER)/lib/$(DEBUG_DIR)libiksolver.a
101 COMLIB += $(NAN_ITASC)/lib/$(DEBUG_DIR)libitasc.a
102 COMLIB += $(NAN_ITASC)/lib/$(DEBUG_DIR)libitasc_kdl.a
103 COMLIB += $(NAN_ITASC)/lib/$(DEBUG_DIR)libitasc_kdl_util.a
104 COMLIB += $(NAN_MOTO)/lib/$(DEBUG_DIR)libmoto.a
105 COMLIB += $(NAN_SUPERLU)/lib/$(DEBUG_DIR)libsuperlu.a
106 COMLIB += $(OCGDIR)/blender/avi/$(DEBUG_DIR)libavi.a
107 COMLIB += $(NAN_JPEG)/lib/libjpeg.a
108 COMLIB += $(OCGDIR)/blender/gpu/$(DEBUG_DIR)libgpu.a
109 COMLIB += $(NAN_GLEW)/lib/$(DEBUG_DIR)libglew.a
110 COMLIB += $(OCGDIR)/blender/blenfont/$(DEBUG_DIR)libblenfont.a
111 COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaudaspace.a
112 COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_src.a
113 COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_fx.a
114 COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_sdl.a
115 COMLIB += $(NAN_SAMPLERATE)/lib/$(DEBUG_DIR)libsamplerate.a
116 COMLIB += $(NAN_LZO)/lib/$(DEBUG_DIR)libminilzo.a
117 COMLIB += $(NAN_LZMA)/lib/$(DEBUG_DIR)liblzma.a
118 COMLIB += $(NAN_BSP)/lib/$(DEBUG_DIR)libbsp.a
119 COMLIB += $(NAN_BOOLOP)/lib/$(DEBUG_DIR)libboolop.a
120 COMLIB += $(NAN_MOTO)/lib/$(DEBUG_DIR)libmoto.a
121 COMLIB += $(NAN_DECIMATION)/lib/$(DEBUG_DIR)libdecimation.a
123 ifeq ($(WITH_FFMPEG),true)
124 COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_ffmpeg.a
127 ifeq ($(WITH_OPENAL),true)
128 COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_openal.a
131 ifeq ($(WITH_JACK),true)
132 COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_jack.a
135 ifeq ($(WITH_SNDFILE),true)
136 COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_sndfile.a
139 ifeq ($(WITH_FFTW3),true)
140 COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_fftw.a
143 ifneq ($(NAN_NO_KETSJI),true)
144 COMLIB += $(OCGDIR)/gameengine/bloutines/$(DEBUG_DIR)libbloutines.a
145 COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
146 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
147 COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
148 COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
149 COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
150 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
151 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
152 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
153 COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
154 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
155 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
156 COMLIB += $(OCGDIR)/gameengine/blphys/blbullet/$(DEBUG_DIR)libblbullet.a
157 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
158 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
159 COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
160 COMLIB += $(OCGDIR)/gameengine/logic/$(DEBUG_DIR)liblogic.a
161 COMLIB += $(OCGDIR)/gameengine/logic/Joystick/$(DEBUG_DIR)libJoystick.a
162 COMLIB += $(OCGDIR)/gameengine/rasterizer/$(DEBUG_DIR)librasterizer.a
163 COMLIB += $(OCGDIR)/gameengine/OpenGLrasterizer/$(DEBUG_DIR)libOpenGLrasterizer.a
164 COMLIB += $(OCGDIR)/gameengine/expression/$(DEBUG_DIR)libexpression.a
165 COMLIB += $(OCGDIR)/gameengine/scenegraph/$(DEBUG_DIR)libscenegraph.a
166 COMLIB += $(OCGDIR)/gameengine/videotex/$(DEBUG_DIR)libvideotex.a
167 COMLIB += $(NAN_MOTO)/lib/libmoto.a
168 COMLIB += $(NAN_SND_LIBS)
169 COMLIB += $(OCGDIR)/kernel/gen_system/$(DEBUG_DIR)libgen_system.a
170 COMLIB += $(OCGDIR)/kernel/gen_messaging/$(DEBUG_DIR)libgen_messaging.a
171 COMLIB += $(OCGDIR)/gameengine/ketsji/KXNetwork/$(DEBUG_DIR)libKXNetwork.a
172 COMLIB += $(OCGDIR)/gameengine/Network/$(DEBUG_DIR)libNetwork.a
173 COMLIB += $(OCGDIR)/gameengine/Network/LoopBackNetwork/$(DEBUG_DIR)libLoopBackNetwork.a
174 COMLIB += $(NAN_BULLET2)/lib/libbullet2.a
177 # Cloth requires bullet2, gameegine does not matter anymore
178 #COMLIB += $(NAN_BULLET2)/lib/libbullet2.a
180 COMLIB += $(OCGDIR)/blender/makesdna/$(DEBUG_DIR)libdna.a
181 COMLIB += $(NAN_GUARDEDALLOC)/lib/libguardedalloc.a
182 COMLIB += $(NAN_MEMUTIL)/lib/libmemutil.a
183 COMLIB += $(NAN_PNG)/lib/libpng.a
184 COMLIB += $(OCGDIR)/blender/python/$(DEBUG_DIR)libpython.a # This was a PULIB up to circa r25248
185 COMLIB += $(OCGDIR)/blender/gen_python/$(DEBUG_DIR)libgen_python.a
186 COMLIB += $(OCGDIR)/blender/blenlib/$(DEBUG_DIR)libblenlib.a
189 ifeq ($(WITH_QUICKTIME), true)
190 COMLIB += $(OCGDIR)/blender/blenderqt/$(DEBUG_DIR)libblenderqt.a
193 ifeq ($(WITH_OPENEXR), true)
194 COMLIB += $(OCGDIR)/blender/imbuf/openexr/$(DEBUG_DIR)libopenexr.a
197 ifeq ($(WITH_OPENJPEG), true)
198 ifndef BF_OPENJPEG_LIBS
199 COMLIB += $(OCGDIR)/extern/openjpeg/$(DEBUG_DIR)libopenjpeg.a
201 COMLIB += $(BF_OPENJPEG_LIBS)
205 COMLIB += $(OCGDIR)/blender/imbuf/cineon/$(DEBUG_DIR)libcineon.a
207 ifeq ($(WITH_DDS), true)
208 COMLIB += $(OCGDIR)/blender/imbuf/dds/$(DEBUG_DIR)libdds.a
211 ifeq ($(WITH_BINRELOC), true)
212 COMLIB += $(OCGDIR)/extern/binreloc/$(DEBUG_DIR)libbinreloc.a
215 ifeq ($(WITH_OPENCOLLADA), true)
216 COMLIB += $(OCGDIR)/blender/bf_collada/$(DEBUG_DIR)/libbf_collada.a
217 COMLIB += $(BF_PCRE_LIBS)
220 ifeq ($(OS), windows)
221 ifeq ($(FREE_WINDOWS), true)
222 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
224 COMLIB += $(NAN_FREETYPE)/lib/freetype2ST.lib
228 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
230 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
235 COMLIB += $(NAN_SDL)/lib/libSDL.a
238 ifeq ($(OS), windows)
239 ifeq ($(FREE_WINDOWS), true)
240 COMLIB += $(NAN_SDL)/lib/libSDL.a
241 COMLIB += $(NAN_PTHREADS)/lib/libpthreadGC2.a
243 COMLIB += $(NAN_SDL)/lib/SDL.lib
247 ifeq ($(WITH_OPENEXR), true)
248 COMLIB += $(NAN_OPENEXR_LIBS)
251 # note: space_api.a in begin of editors, screen.a in end
252 PULIB = $(NAN_MOTO)/lib/libmoto.a
253 PULIB += $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
254 PULIB += $(OCGDIR)/blender/ed_space/$(DEBUG_DIR)libed_space.a
255 PULIB += $(OCGDIR)/blender/ed_sound/$(DEBUG_DIR)libed_sound.a
256 PULIB += $(OCGDIR)/blender/ed_action/$(DEBUG_DIR)libed_action.a
257 PULIB += $(OCGDIR)/blender/ed_nla/$(DEBUG_DIR)libed_nla.a
258 PULIB += $(OCGDIR)/blender/ed_script/$(DEBUG_DIR)libed_script.a
259 PULIB += $(OCGDIR)/blender/ed_text/$(DEBUG_DIR)libed_text.a
260 PULIB += $(OCGDIR)/blender/ed_logic/$(DEBUG_DIR)libed_logic.a
261 PULIB += $(OCGDIR)/blender/ed_sequencer/$(DEBUG_DIR)libed_sequencer.a
262 PULIB += $(OCGDIR)/blender/ed_file/$(DEBUG_DIR)libed_file.a
263 PULIB += $(OCGDIR)/blender/ed_info/$(DEBUG_DIR)libed_info.a
264 PULIB += $(OCGDIR)/blender/ed_buttons/$(DEBUG_DIR)libed_buttons.a
265 PULIB += $(OCGDIR)/blender/ed_graph/$(DEBUG_DIR)libed_graph.a
266 PULIB += $(OCGDIR)/blender/ed_node/$(DEBUG_DIR)libed_node.a
267 PULIB += $(OCGDIR)/blender/ed_outliner/$(DEBUG_DIR)libed_outliner.a
268 PULIB += $(OCGDIR)/blender/ed_time/$(DEBUG_DIR)libed_time.a
269 PULIB += $(OCGDIR)/blender/ed_render/$(DEBUG_DIR)libed_render.a
270 PULIB += $(OCGDIR)/blender/ed_view3d/$(DEBUG_DIR)libed_view3d.a
271 PULIB += $(OCGDIR)/blender/ed_interface/$(DEBUG_DIR)libed_interface.a
272 PULIB += $(OCGDIR)/blender/ed_object/$(DEBUG_DIR)libed_object.a
273 PULIB += $(OCGDIR)/blender/ed_curve/$(DEBUG_DIR)libed_curve.a
274 PULIB += $(OCGDIR)/blender/ed_metaball/$(DEBUG_DIR)libed_metaball.a
275 PULIB += $(OCGDIR)/blender/ed_armature/$(DEBUG_DIR)libed_armature.a
276 PULIB += $(OCGDIR)/blender/ed_mesh/$(DEBUG_DIR)libed_mesh.a
277 PULIB += $(OCGDIR)/blender/ed_sculpt_paint/$(DEBUG_DIR)libed_sculpt_paint.a
278 PULIB += $(OCGDIR)/blender/ed_physics/$(DEBUG_DIR)libed_physics.a
279 PULIB += $(OCGDIR)/blender/ed_animation/$(DEBUG_DIR)libed_animation.a
280 PULIB += $(OCGDIR)/blender/ed_transform/$(DEBUG_DIR)libed_transform.a
281 PULIB += $(OCGDIR)/blender/ed_util/$(DEBUG_DIR)libed_util.a
282 PULIB += $(OCGDIR)/blender/ed_datafiles/$(DEBUG_DIR)libed_datafiles.a
283 PULIB += $(OCGDIR)/blender/ed_image/$(DEBUG_DIR)libed_image.a
284 PULIB += $(OCGDIR)/blender/ed_uvedit/$(DEBUG_DIR)libed_uvedit.a
285 PULIB += $(OCGDIR)/blender/ed_screen/$(DEBUG_DIR)libed_screen.a
286 PULIB += $(OCGDIR)/blender/ed_console/$(DEBUG_DIR)libed_console.a
287 PULIB += $(OCGDIR)/blender/ed_userpref/$(DEBUG_DIR)libed_userpref.a
288 PULIB += $(OCGDIR)/blender/ed_gpencil/$(DEBUG_DIR)libed_gpencil.a
289 PULIB += $(OCGDIR)/blender/ed_opsound/$(DEBUG_DIR)libed_opsound.a
290 PULIB += $(OCGDIR)/blender/windowmanager/$(DEBUG_DIR)libwindowmanager.a
291 PULIB += $(OCGDIR)/blender/makesrna/$(DEBUG_DIR)librna.a
292 # note, no idea but it suddenly doesn't compile :(
293 PULIB += $(OCGDIR)/blender/blenlib/$(DEBUG_DIR)libblenlib.a
294 PULIB += $(NAN_OPENNL)/lib/$(DEBUG_DIR)libopennl.a
295 PULIB += $(NAN_ELBEEM)/lib/$(DEBUG_DIR)libelbeem.a
296 PULIB += $(NAN_SMOKE)/lib/$(DEBUG_DIR)libsmoke.a
298 ifeq ($(NAN_NO_KETSJI),true)
299 PULIB += $(NAN_MOTO)/lib/$(DEBUG_DIR)libmoto.a
300 PULIB += $(OCGDIR)/kernel/gen_system/$(DEBUG_DIR)libgen_system.a
301 PULIB += $(OCGDIR)/kernel/gen_messaging/$(DEBUG_DIR)libgen_messaging.a
302 COMLIB += $(NAN_SND_LIBS)
305 SPLIB1 = $(OCGDIR)/gameengine/GamePlayer/ghost/$(DEBUG_DIR)libghost.a
306 SPLIB1 += $(OCGDIR)/gameengine/GamePlayer/common/$(DEBUG_DIR)libcommon.a
307 SPLIB1 += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
308 SPLIB1 += $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
309 SPLIB1 += $(NAN_GHOST)/lib/$(DEBUG_DIR)libghost.a
311 SPLIB = $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
312 # this is used for the plugin. It uses some things from libz.a,
313 # but somehow it consistently fails to resolve these symbols... or
314 # can I just not check them? nm claims they aren't...
315 SPLIB += $(OCGDIR)/blender/blenkernel/blenkernel_blc/$(DEBUG_DIR)libblenkernel_blc.a
316 SPLIB += $(OCGDIR)/blender/makesrna/$(DEBUG_DIR)librna.a
317 SPLIB += $(OCGDIR)/blender/blenlib/$(DEBUG_DIR)libblenlib.a
319 # These three need to be explicitly mentioned on the cl, because
320 # if they are offered as a lib, they are optimized away. (nzc)
321 NSPLUGLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)UnixShell.o
322 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)stubs.o
323 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)winstubs.o
324 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)Blender3DPlugin_native_implementation.o
326 # Here you can configure what sort of test to make for the plugin.
327 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_stub.a
328 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_colorcycle.a
329 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_gears.a
330 PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_threaded_gears.a
332 # XPCOM is done only for Linux for now
333 ifeq ($(OS),$(findstring $(OS), "linux"))
335 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)XPH_xpcom_hooks.o
339 PLUGAPPLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)libplugin_ketsji_hooks.a
341 ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
342 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)PLG_X11_windowing.o
343 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/unix/$(DEBUG_DIR)libunix.a
345 ifeq ($(OS),$(findstring $(OS), "windows"))
346 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)PLG_MSWindows_windowing.o
347 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)npB3DPlg.res
348 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/windows/$(DEBUG_DIR)libwindows.a
351 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/$(DEBUG_DIR)libcommon.a
353 ifeq ($(OS),$(findstring $(OS), "linux"))
355 PLUGAPPLIB_XPLINK = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)_Blender3DPlugin_implementation_.o
359 # A bit silly... but needed to resolve symbols.
360 PLUGREMLIB = $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
362 ######################## OS dependencies (alphabetic!) ################
366 ifeq ($(NAN_JUST_BLENDERDYNAMIC),true)
367 BINTARGETS = blenderdynamic
370 ifeq ($(WITH_BF_DYNAMICOPENGL), true)
371 BINTARGETS += blenderdynamic
374 ifeq ($(WITH_BF_STATICOPENGL), true)
375 BINTARGETS += blenderstatic
378 ifeq ($(WITH_BF_BLENDERPLAYER), true)
379 export WITH_BF_GAMEENGINE=true
380 BINTARGETS += blenderplayer
383 ifeq ($(WITH_BF_WEBPLUGIN), true)
392 ifeq ($(WITH_OPENAL),true)
393 ifeq ($(OS),$(findstring $(OS), "freebsd linux windows"))
394 ifeq ($(CPU),$(findstring $(CPU), "i386 powerpc x86_64 parisc64"))
395 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
398 NAN_SND_LIBS += $(NAN_OPENAL)/lib/openal_static.lib
403 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
405 ifeq ($(OS), solaris)
406 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
412 ifeq ($(WITH_JACK),true)
413 ifeq ($(OS),$(findstring $(OS), "linux"))
414 NAN_SND_LIBS += $(NAN_JACKLIBS)
418 ifeq ($(WITH_SNDFILE),true)
419 ifeq ($(OS),$(findstring $(OS), "linux"))
420 NAN_SND_LIBS += $(NAN_SNDFILELIBS)
426 # Might need to change this to $(NAN_MOZILLA_LIB)/nspr4.lib
427 NSPLUGLIB += $(NAN_NSPR)/lib/nspr4.lib
429 BINTARGETS = blenderdynamic
430 ifeq ($(FREE_WINDOWS),true)
431 ifneq ($(NAN_NO_KETSJI),true)
432 BINTARGETS += blenderplayer
435 BINTARGETS += blenderplayer
436 BINTARGETS += blenderdynplayer
440 PULIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winblender.res
441 PULIB += $(NAN_ZLIB)/lib/libz.a
442 SPLIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winblender.res
443 SPLIB += $(NAN_ZLIB)/lib/libz.a
447 # prepare for NAN_BUILDINFO compile at the *sigh* link rules below
452 include nan_compile.mk
455 ################## target rules ########################
458 @echo "****> Make $@ by $(ID)@$(HOST) at $(MAKE_START) on $(CONFIG_GUESS)"
460 @for n in $(NANENV); do \
468 include nan_subdirs.mk
470 ################## target rules ########################
475 @$(MAKE) link DEBUG_DIR="debug/" NANENV=$(NANENV)
477 clean:: linkclean debuglinkclean
480 @echo "****> Build $(MAKE_START) - `date '+%H:%M:%S %d-%b-%Y'`"
482 @for n in $(NANENV); do \
488 @$(RM) -r $(DIR)/blenderstatic* \
489 $(DIR)/blenderplayer* \
493 @$(RM) -r $(DIR)/debug/blenderstatic* \
494 $(DIR)/debug/blenderplayer* \
497 # Shortcut for Tinderbox release builds. Mortals don't use this.
499 @$(MAKE) -C ../release/ all || exit 1;
501 ############### Linker rules ###############
503 blenderstatic: $(DIR)/$(DEBUG_DIR)bin/blenderstatic
504 blenderdynamic: $(DIR)/$(DEBUG_DIR)bin/blender$(EXT)
505 blenderplayer: $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT)
506 blenderdynplayer: $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT)
508 # XPCOM connector only for linux so far...
510 xplink: $(DIR)/$(DEBUG_DIR)bin/Blender3DPlugin$(SOEXT)
514 ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
515 plugin: $(DIR)/$(DEBUG_DIR)bin/npBlender3DPlugin$(SOEXT)
516 ptest: $(DIR)/$(DEBUG_DIR)bin/npTestPlugin$(SOEXT)
518 # Windows needs a 8.3 name... Why? Dunno...
520 ifneq ($(FREE_WINDOWS),true)
521 plugin: $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT)
525 $(DIR)/$(DEBUG_DIR)bin/blenderstatic: $(OBJS) $(GRPLIB) $(PULIB) $(COMLIB)
526 @echo "****> Link $@"
528 $(CCC) $(CCFLAGS) $(REL_CCFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_REV='"$(BUILD_REV)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"static"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
530 mkdir -p $(DIR)/$(DEBUG_DIR)bin
531 $(CCC) $(CCFLAGS) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderstatic $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(PULIB) $(COMLIB) $(LLIBS) $(SADD) $(LOPTS)
533 /bin/rm $(BUILDINFO_O)
536 @$(MAKE) -C darwin/ APPLICATION=blenderstatic
539 $(DIR)/$(DEBUG_DIR)bin/blender$(EXT): $(OBJS) $(GRPLIB) $(PULIB) $(COMLIB)
540 @echo "****> Link $@"
542 $(CCC) $(CCFLAGS) $(REL_CCFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_REV='"$(BUILD_REV)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
544 mkdir -p $(DIR)/$(DEBUG_DIR)bin
545 $(CCC) $(CCFLAGS) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blender$(EXT) $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(PULIB) $(COMLIB) $(LLIBS) $(DADD) $(LOPTS)
547 /bin/rm $(BUILDINFO_O)
550 @$(MAKE) -C darwin/ APPLICATION=blender
553 $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT): $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB)
554 @echo "****> Link $@"
556 $(CCC) $(CCFLAGS) $(REL_CCFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_REV='"$(BUILD_REV)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
558 mkdir -p $(DIR)/$(DEBUG_DIR)bin
559 $(CCC) $(CCFLAGS) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(LLIBS) $(DADD) $(LOPTS)
561 /bin/rm $(BUILDINFO_O)
564 @$(MAKE) -C darwin/ APPLICATION=blenderplayer
567 $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT): $(OBJS) $(COMLIB) $(SPLIB)
568 @echo "****> Link $@"
570 $(CCC) $(CCFLAGS) $(REL_CCFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_REV='"$(BUILD_REV)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
572 mkdir -p $(DIR)/$(DEBUG_DIR)bin
573 $(CCC) $(CCFLAGS) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(LLIBS) $(DADD) $(LOPTS)
575 /bin/rm $(BUILDINFO_O)
578 @$(MAKE) -C darwin/ APPLICATION=blenderplayer
581 $(DIR)/$(DEBUG_DIR)bin/Blender3DPlugin$(SOEXT): $(PLUGAPPLIB_XPLINK)
582 @echo "****> Link $@"
584 $(CCC) $(CCFLAGS) $(REL_CCFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_REV='"$(BUILD_REV)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
586 mkdir -p $(DIR)/$(DEBUG_DIR)bin
587 $(CCC) $(CCFLAGS) $(DYNLDFLAGS) -o $@ $(PLUGAPPLIB_XPLINK) $(LOPTS)
589 /bin/rm $(BUILDINFO_O)
592 # Windows build needs a def file? Why? For exposing functions from the
593 # dll to the outside world. However, this is alsi done internally..
594 DEFFILE = ./gameengine/GamePlayer/netscape/src/npB3DPlg.def
596 # Windows needs a specific name format for dll.s so we give it one.
597 $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
598 @echo "****> Link $@"
600 $(CCC) $(CCFLAGS) $(REL_CCFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_REV='"$(BUILD_REV)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
602 # $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS)
603 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS) /def:$(DEFFILE)
605 /bin/rm $(BUILDINFO_O)
608 $(DIR)/$(DEBUG_DIR)bin/npBlender3DPlugin$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
609 @echo "****> Link $@"
611 $(CCC) $(CCFLAGS) $(REL_CCFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_REV='"$(BUILD_REV)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
613 mkdir -p $(DIR)/$(DEBUG_DIR)bin
614 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS)
616 /bin/rm $(BUILDINFO_O)
619 $(DIR)/$(DEBUG_DIR)bin/npTestPlugin$(SOEXT): $(NSPLUGLIB)
620 @echo "****> Link $@"
622 $(CCC) $(CCFLAGS) $(REL_CCFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_REV='"$(BUILD_REV)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
624 mkdir -p $(DIR)/$(DEBUG_DIR)bin
625 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGTESTLIB) $(LLIBS) $(DADD) $(LOPTS)
627 /bin/rm $(BUILDINFO_O)