4 # ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License
8 # as published by the Free Software Foundation; either version 2
9 # of the License, or (at your option) any later version. The Blender
10 # Foundation also sells licenses for use in proprietary software under
11 # the Blender License. See http://www.blender.org/BL/ for information
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software Foundation,
21 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 # The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
24 # All rights reserved.
26 # The Original Code is: all of this file.
28 # Contributor(s): none yet.
30 # ***** END GPL/BL DUAL LICENSE BLOCK *****
32 # Top level makefile. Start looping through subdirs and link....
36 export NANENV := $(shell env | grep NAN_)
39 include nan_definitions.mk
41 DIRS = creator blender kernel
43 ifneq ($(NAN_NO_KETSJI),true)
51 ########## buildinfo kludge ###################
52 CPPFLAGS += -I../Physics/common
53 CPPFLAGS += -I../Physics/Dummy
55 BUILDINFO_O = $(DIR)/$(DEBUG_DIR)buildinfo.o
56 BUILDINFO_C = $(SRCHOME)/creator/buildinfo.c
57 BUILD_DATE := $(shell date "+%Y-%m-%d")
58 BUILD_TIME := $(shell date "+%H:%M:%S")
61 ############# set pyplayerlib ##################
63 PYPLAYERLIB ?= $(PYLIB)
65 ############# libraries ##################
66 # COMLIB COMmon LIBraries for all targets
67 # BPLIB Browser Plugin LIBraries
68 # SPLIB1 Standalone Player LIBraries (pre COMLIB)
69 # SPLIB Standalone Player LIBraries (post COMLIB)
70 # PULIB PUblisher LIBraries
71 # GRPLIB Gui and Render LIBraries for Publisher
72 # LLIBS dynamic system libraries
73 # SADD Static OpenGL libraries
74 # DADD Dynamic OpenGL libraries
75 # NSPLUGLIB PLUGin LIBraries for ns-style api
76 # PLUGAPPLIB libs that form the application to be plugged in
77 # Note: the order is important here
79 GRPLIB = $(OCGDIR)/creator/$(DEBUG_DIR)libcreator.a
80 GRPLIB += $(OCGDIR)/blender/src/$(DEBUG_DIR)libsrcpublisher.a
81 GRPLIB += $(NAN_BSP)/lib/$(DEBUG_DIR)libbsp.a
82 GRPLIB += $(NAN_BOOLOP)/lib/$(DEBUG_DIR)libboolop.a
83 GRPLIB += $(NAN_SOUNDSYSTEM)/lib/$(DEBUG_DIR)libSoundSystem.a
84 GRPLIB += $(NAN_GHOST)/lib/$(DEBUG_DIR)libghost.a
85 GRPLIB += $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
86 GRPLIB += $(OCGDIR)/blender/render/$(DEBUG_DIR)librender.a
87 GRPLIB += $(OCGDIR)/blender/radiosity/$(DEBUG_DIR)libradiosity.a
88 GRPLIB += $(NAN_OPENNL)/lib/$(DEBUG_DIR)libopennl.a
89 GRPLIB += $(NAN_SUPERLU)/lib/$(DEBUG_DIR)libsuperlu.a
90 GRPLIB += $(OCGDIR)/blender/python/$(DEBUG_DIR)libpython.a
92 # nlin: the reason that some libraries appear more than once below is
93 # to handle circular dependencies in linking among libraries... some
94 # linkers (e.g. under Linux) need libs to be specified multiple times
95 # to properly resolve circular dependencies. ugly, but it works...
96 # the repeat entries could probably be trimmed down.
97 COMLIB = $(OCGDIR)/blender/blenkernel/$(DEBUG_DIR)libblenkernel.a
98 COMLIB += $(NAN_DECIMATION)/lib/libdecimation.a
99 COMLIB += $(OCGDIR)/blender/blenloader/$(DEBUG_DIR)libblenloader.a
100 COMLIB += $(OCGDIR)/blender/blenpluginapi/$(DEBUG_DIR)libblenpluginapi.a
101 COMLIB += $(OCGDIR)/blender/imbuf/$(DEBUG_DIR)libimbuf.a
102 COMLIB += $(OCGDIR)/blender/blenlib/$(DEBUG_DIR)libblenlib.a
103 COMLIB += $(OCGDIR)/blender/avi/$(DEBUG_DIR)libavi.a
104 COMLIB += $(NAN_JPEG)/lib/libjpeg.a
105 ifneq ($(NAN_NO_KETSJI),true)
106 COMLIB += $(OCGDIR)/gameengine/bloutines/$(DEBUG_DIR)libbloutines.a
107 COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
108 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
109 COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
110 COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
111 COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
112 COMLIB += $(NAN_SOLID)/lib/libsolid.a
113 COMLIB += $(NAN_SOLID)/lib/libsolid_broad.a
114 COMLIB += $(NAN_SOLID)/lib/libsolid_complex.a
115 COMLIB += $(NAN_SOLID)/lib/libsolid_convex.a
116 COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a
117 COMLIB += $(OCGDIR)/gameengine/blphys/fuzzics/$(DEBUG_DIR)libfuzzics.a
118 COMLIB += $(NAN_QHULL)/lib/libqhull.a
119 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
120 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
121 # COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a
122 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
123 COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
124 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
125 # COMLIB += $(OCGDIR)/gameengine/blphys/blode/$(DEBUG_DIR)libblode.a
126 # COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a
127 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
128 COMLIB += $(OCGDIR)/gameengine/blphys/blbullet/$(DEBUG_DIR)libblbullet.a
129 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
130 # COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a
131 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
132 COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
133 COMLIB += $(OCGDIR)/gameengine/logic/$(DEBUG_DIR)liblogic.a
134 COMLIB += $(OCGDIR)/gameengine/logic/Joystick/$(DEBUG_DIR)libJoystick.a
135 COMLIB += $(OCGDIR)/gameengine/rasterizer/$(DEBUG_DIR)librasterizer.a
136 COMLIB += $(OCGDIR)/gameengine/OpenGLrasterizer/$(DEBUG_DIR)libOpenGLrasterizer.a
137 COMLIB += $(OCGDIR)/gameengine/expression/$(DEBUG_DIR)libexpression.a
138 COMLIB += $(OCGDIR)/gameengine/scenegraph/$(DEBUG_DIR)libscenegraph.a
139 # COMLIB += $(OCGDIR)/sumo/$(DEBUG_DIR)libfuzzics.a
140 # COMLIB += $(OCGDIR)/sumo/$(DEBUG_DIR)libsolid.a
141 COMLIB += $(NAN_MOTO)/lib/libmoto.a
142 COMLIB += $(NAN_SND_LIBS)
143 COMLIB += $(OCGDIR)/kernel/gen_system/$(DEBUG_DIR)libgen_system.a
144 COMLIB += $(OCGDIR)/kernel/gen_messaging/$(DEBUG_DIR)libgen_messaging.a
145 COMLIB += $(OCGDIR)/gameengine/ketsji/KXNetwork/$(DEBUG_DIR)libKXNetwork.a
146 COMLIB += $(OCGDIR)/gameengine/Network/$(DEBUG_DIR)libNetwork.a
147 COMLIB += $(OCGDIR)/gameengine/Network/LoopBackNetwork/$(DEBUG_DIR)libLoopBackNetwork.a
148 COMLIB += $(NAN_BULLET)/lib/libbulletdyn.a
149 COMLIB += $(NAN_BULLET)/lib/libbullet.a
151 COMLIB += $(NAN_GUARDEDALLOC)/lib/libguardedalloc.a
152 COMLIB += $(NAN_MEMUTIL)/lib/libmemutil.a
153 COMLIB += $(NAN_BMFONT)/lib/$(DEBUG_DIR)libbmfont.a
154 COMLIB += $(NAN_PNG)/lib/libpng.a
155 COMLIB += $(OCGDIR)/blender/yafray/$(DEBUG_DIR)libyafrayexport.a
156 COMLIB += $(OCGDIR)/blender/blenlib/$(DEBUG_DIR)libblenlib.a
157 ifeq ($(WITH_QUICKTIME), true)
158 COMLIB += $(OCGDIR)/blender/blenderqt/$(DEBUG_DIR)libblenderqt.a
160 ifeq ($(WITH_OPENEXR), true)
161 COMLIB += $(OCGDIR)/blender/imbuf/openexr/$(DEBUG_DIR)libopenexr.a
163 COMLIB += $(OCGDIR)/blender/imbuf/cineon/$(DEBUG_DIR)libcineon.a
164 ifeq ($(WITH_FREETYPE2), true)
165 ifeq ($(OS), windows)
166 ifeq ($(FREE_WINDOWS), true)
167 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
169 COMLIB += $(NAN_FREETYPE)/lib/freetype2ST.lib
173 COMLIB += $(NAN_FREETYPE)/lib32/libfreetype.a
175 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
179 ifeq ($(INTERNATIONAL), true)
180 COMLIB += $(OCGDIR)/blender/ftfont/$(DEBUG_DIR)libftfont.a
181 ifeq ($(OS), windows)
182 ifeq ($(FREE_WINDOWS), true)
183 COMLIB += $(NAN_GETTEXT)/lib/freegettext.a
184 COMLIB += $(NAN_FTGL)/lib/libftgl.a
185 #COMLIB += $(NAN_ICONV)/lib/freeiconv.a
187 COMLIB += $(NAN_GETTEXT)/lib/gnu_gettext.lib
188 COMLIB += $(NAN_FTGL)/lib/ftgl_static_ST.lib
189 COMLIB += $(NAN_FREETYPE)/lib/freetype2ST.lib
190 COMLIB += $(NAN_ICONV)/lib/iconv.lib
193 COMLIB += $(NAN_FTGL)/lib/libftgl.a
195 COMLIB += $(NAN_FREETYPE)/lib32/libfreetype.a
196 COMLIB += $(NAN_FREETYPE)/lib32/libintl.a
198 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
202 COMLIB += $(NAN_GETTEXT)/lib/libintl.a
204 COMLIB += $(NAN_GETTEXT)/lib/libiconv.a
207 ifeq ($(OS), solaris)
208 COMLIB += $(NAN_GETTEXT)/lib/libintl.a
212 ifeq ($(WITH_VERSE), true)
213 ifeq ($(OS), windows)
214 ifeq ($(FREE_WINDOWS), true)
215 COMLIB += $(NAN_VERSE)/lib/libverse.a
217 COMLIB += $(NAN_VERSE)/lib/verse.lib
220 COMLIB += $(NAN_VERSE)/lib/libverse.a
225 COMLIB += $(NAN_SDL)/lib/libSDL.a
227 ifeq ($(OS), windows)
228 ifeq ($(FREE_WINDOWS), true)
229 COMLIB += $(NAN_SDL)/lib/libSDL.a
230 COMLIB += $(NAN_PTHREADS)/lib/libpthreadGC2.a
232 COMLIB += $(NAN_SDL)/lib/SDL.lib
236 ifeq ($(WITH_OPENEXR), true)
237 COMLIB += $(NAN_OPENEXR_LIBS)
240 PULIB = $(NAN_IKSOLVER)/lib/libiksolver.a
241 PULIB += $(NAN_MOTO)/lib/libmoto.a
242 PULIB += $(NAN_ELBEEM)/lib/$(DEBUG_DIR)libelbeem.a
243 PULIB += $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
244 PULIB += $(OCGDIR)/blender/src/$(DEBUG_DIR)libsrcpublisher.a
246 ifeq ($(NAN_NO_KETSJI),true)
247 PULIB += $(NAN_MOTO)/lib/libmoto.a
248 PULIB += $(OCGDIR)/kernel/gen_system/$(DEBUG_DIR)libgen_system.a
249 PULIB += $(OCGDIR)/kernel/gen_messaging/$(DEBUG_DIR)libgen_messaging.a
250 COMLIB += $(NAN_SND_LIBS)
253 SPLIB1 = $(OCGDIR)/gameengine/GamePlayer/ghost/$(DEBUG_DIR)libghost.a
254 SPLIB1 += $(OCGDIR)/gameengine/GamePlayer/common/$(DEBUG_DIR)libcommon.a
255 SPLIB1 += $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
256 SPLIB1 += $(NAN_GHOST)/lib/$(DEBUG_DIR)libghost.a
258 SPLIB = $(OCGDIR)/blender/makesdna/$(DEBUG_DIR)DNA.o
259 SPLIB += $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
260 # this is used for the plugin. It uses some things from libz.a,
261 # but somehow it consistently fails to resolve these symbols... or
262 # can I just not check them? nm claims they aren't...
263 SPLIB += $(OCGDIR)/blender/blenkernel/blenkernel_blc/$(DEBUG_DIR)libblenkernel_blc.a
265 # These three need to be explicitly mentioned on the cl, because
266 # if they are offered as a lib, they are optimized away. (nzc)
267 NSPLUGLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)UnixShell.o
268 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)stubs.o
269 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)winstubs.o
270 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)Blender3DPlugin_native_implementation.o
272 # Here you can configure what sort of test to make for the plugin.
273 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_stub.a
274 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_colorcycle.a
275 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_gears.a
276 PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_threaded_gears.a
278 # XPCOM is done only for Linux for now
279 ifeq ($(OS),$(findstring $(OS), "linux"))
281 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)XPH_xpcom_hooks.o
285 PLUGAPPLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)libplugin_ketsji_hooks.a
287 ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
288 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)PLG_X11_windowing.o
289 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/unix/$(DEBUG_DIR)libunix.a
291 ifeq ($(OS),$(findstring $(OS), "windows"))
292 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)PLG_MSWindows_windowing.o
293 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)npB3DPlg.res
294 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/windows/$(DEBUG_DIR)libwindows.a
296 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/$(DEBUG_DIR)libcommon.a
298 ifeq ($(OS),$(findstring $(OS), "linux"))
300 PLUGAPPLIB_XPLINK = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)_Blender3DPlugin_implementation_.o
304 # A bit silly... but needed to resolve symbols.
305 PLUGREMLIB = $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
307 ######################## OS dependencies (alphabetic!) ################
312 BINTARGETS = blenderdynamic
316 BINTARGETS = blenderdynamic.app
317 BINTARGETS += blenderplayer.app
319 PYLIB = -framework Python
321 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
326 ifeq ($(OS_VERSION),$(findstring $(OS_VERSION), "3.4 4.0"))
327 BINTARGETS = blenderdynamic
328 BINTARGETS += blenderstatic
330 BINTARGETS = blenderdynamic
331 BINTARGETS += blenderplayer
334 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
335 PYLIB += $(NAN_MXTEXTTOOLS)
339 BINTARGETS = blenderdynamic
340 BINTARGETS += blenderplayer
342 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
343 PYLIB += $(NAN_MXTEXTTOOLS)
347 BINTARGETS = blenderdynamic
349 BINTARGETS = blenderdynamic
350 BINTARGETS += blenderplayer
353 BINTARGETS = blenderdynamic
354 BINTARGETS += blenderplayer
355 BINTARGETS += blenderstatic
356 ifneq ($(NAN_NO_PLUGIN),true)
357 BINTARGETS += plugin xplink
360 ifeq ($(CPU),powerpc)
361 BINTARGETS = blenderdynamic
362 BINTARGETS += blenderstatic
363 BINTARGETS += blenderplayer
365 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
366 PYLIB += $(NAN_MXTEXTTOOLS)
370 BINTARGETS = blenderstatic
371 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
375 BINTARGETS = blenderdynamic
376 BINTARGETS += blenderplayer
380 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
381 PYLIB += $(NAN_MXTEXTTOOLS)
382 PYLIB += $(NAN_ZLIB)/lib/libz.a
383 PULIB += $(NAN_ZLIB)/lib/libz.a
384 SPLIB += $(NAN_ZLIB)/lib/libz.a
387 # OpenAL libs are already compiled as shared code! Check FMod if we switch to that. (nzc)
389 # Some vars to keep the rest of this section mostly readable
391 SOUNDSYSTEM = $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
392 DUMMYSOUND = $(OCGDIR)/intern/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
393 OPENALSOUND = $(OCGDIR)/intern/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
394 SDLSOUND = $(OCGDIR)/intern/SDLSoundSystem/$(DEBUG_DIR)libSDLSoundSystem.a
396 # Some kooky logic going on here ...
397 ifeq ($(NAN_NO_OPENAL), true)
398 NAN_SND_LIBS = $(SOUNDSYSTEM)
399 NAN_SND_LIBS += $(DUMMYSOUND)
400 NAN_SND_LIBS += $(SOUNDSYSTEM)
402 ifeq ($(OS),$(findstring $(OS), "freebsd linux windows"))
403 ifeq ($(CPU),$(findstring $(CPU), "i386 powerpc x86_64"))
404 NAN_SND_LIBS = $(SOUNDSYSTEM)
405 NAN_SND_LIBS += $(DUMMYSOUND)
406 NAN_SND_LIBS += $(OPENALSOUND)
407 NAN_SND_LIBS += $(SDLSOUND)
408 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
409 ALUT = $(wildcard $(NAN_OPENAL)/lib/libalut.a)
410 NAN_SND_LIBS += $(ALUT)
411 NAN_SND_LIBS += $(SOUNDSYSTEM)
414 NAN_SND_LIBS = $(SOUNDSYSTEM)
415 NAN_SND_LIBS += $(DUMMYSOUND)
416 NAN_SND_LIBS += $(OPENALSOUND)
417 NAN_SND_LIBS += $(SDLSOUND)
418 NAN_SND_LIBS += $(NAN_OPENAL)/lib/openal_static.lib
419 ALUT = $(wildcard $(NAN_OPENAL)/lib/alut_static.lib)
420 NAN_SND_LIBS += $(ALUT)
421 NAN_SND_LIBS += $(SOUNDSYSTEM)
423 NAN_SND_LIBS = $(SOUNDSYSTEM)
424 NAN_SND_LIBS += $(DUMMYSOUND)
425 NAN_SND_LIBS += $(SOUNDSYSTEM)
430 NAN_SND_LIBS = $(SOUNDSYSTEM)
431 NAN_SND_LIBS += $(DUMMYSOUND)
432 NAN_SND_LIBS += $(OPENALSOUND)
433 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
434 ALUT = $(wildcard $(NAN_OPENAL)/lib/libalut.a)
435 NAN_SND_LIBS += $(ALUT)
436 NAN_SND_LIBS += $(SOUNDSYSTEM)
438 ifeq ($(OS), solaris)
439 NAN_SND_LIBS = $(SOUNDSYSTEM)
440 NAN_SND_LIBS += $(DUMMYSOUND)
441 NAN_SND_LIBS += $(OPENALSOUND)
442 NAN_SND_LIBS += $(SDLSOUND)
443 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
444 ALUT = $(wildcard $(NAN_OPENAL)/lib/libalut.a)
445 NAN_SND_LIBS += $(ALUT)
446 NAN_SND_LIBS += $(SOUNDSYSTEM)
448 NAN_SND_LIBS = $(SOUNDSYSTEM)
449 NAN_SND_LIBS += $(DUMMYSOUND)
450 NAN_SND_LIBS += $(SOUNDSYSTEM)
457 ifeq ($(FREE_WINDOWS),true)
458 PYLIB = $(NAN_PYTHON)/lib/freepy.a
460 PYLIB = $(NAN_PYTHON)/lib/python23.lib
463 PYPLAYERLIB = $(NAN_PYTHON)/static/*.obj
464 PYPLAYERLIB = $(PYLIB)
466 # Might need to change this to $(NAN_MOZILLA_LIB)/nspr4.lib
467 NSPLUGLIB += $(NAN_NSPR)/lib/nspr4.lib
469 BINTARGETS = blenderdynamic
470 ifeq ($(FREE_WINDOWS),true)
471 ifneq ($(NAN_NO_KETSJI),true)
472 BINTARGETS += blenderplayer
475 BINTARGETS += blenderplayer
476 BINTARGETS += blenderdynplayer
480 PULIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winblender.res
481 PULIB += $(NAN_ZLIB)/lib/libz.a
482 SPLIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winblender.res
483 SPLIB += $(NAN_ZLIB)/lib/libz.a
485 # This code below seems outdated and doesn't even seem to
486 # apply to the Windows platform. I've commented it
487 # out until someone can take a good look at it and confirm
488 # or deny. If it breaks anything blame Chris Burt / Desoto
490 #ifdef NAN_PLAYERSTATIC
491 # PYPLAYERLIB = $(NAN_PYTHON)/static/python20.lib
492 # BINTARGETS = blenderplayer
494 # NAN_SND_LIBS = $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
495 # NAN_SND_LIBS += $(OCGDIR)/intern/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
496 # NAN_SND_LIBS += $(OCGDIR)/intern/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
497 # NAN_SND_LIBS += $(NAN_OPENAL)/lib/openal_static.lib
498 # NAN_SND_LIBS += $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
500 # PYINCLUDEOK := $(shell diff -qbB gameengine/Ketsji/KX_Python.h gameengine/Ketsji/KX_Python_static.h)
501 # ifneq (x$(PYINCLUDEOK),x)
502 # DUMMY := $(shell cat gameengine/Ketsji/KX_Python_static.h > gameengine/Ketsji/KX_Python.h)
505 # PYINCLUDEOK := $(shell diff -qbB gameengine/Ketsji/KX_Python.h gameengine/Ketsji/KX_Python_dynamic.h)
506 # ifneq (x$(PYINCLUDEOK),x)
507 # DUMMY := $(shell cat gameengine/Ketsji/KX_Python_dynamic.h > gameengine/Ketsji/KX_Python.h)
512 ifeq ($(NAN_JUST_BLENDERDYNAMIC),true)
514 BINTARGETS = blenderdynamic.app
516 BINTARGETS = blenderdynamic
521 # prepare for NAN_BUILDINFO compile at the *sigh* link rules below
526 include nan_compile.mk
529 ################## target rules ########################
532 @echo "****> Make $@ by $(ID)@$(HOST) at $(MAKE_START) on $(CONFIG_GUESS)"
534 @for n in $(NANENV); do \
542 include nan_subdirs.mk
544 ################## target rules ########################
549 @$(MAKE) link DEBUG_DIR="debug/" NANENV=$(NANENV)
551 clean:: linkclean debuglinkclean
554 @echo "****> Build $(MAKE_START) - `date '+%H:%M:%S %d-%b-%Y'`"
556 @for n in $(NANENV); do \
563 @$(RM) -r $(DIR)/blenderstatic* \
564 $(DIR)/blenderplayer* \
567 @$(RM) $(DIR)/blenderstatic* \
568 $(DIR)/blenderplayer* \
574 @$(RM) -r $(DIR)/debug/blenderstatic* \
575 $(DIR)/debug/blenderplayer* \
578 @$(RM) $(DIR)/debug/blenderstatic* \
579 $(DIR)/debug/blenderplayer* \
583 # Shortcut for Tinderbox release builds. Mortals don't use this.
585 @$(MAKE) -C ../release/ all || exit 1;
587 ############### Linker rules ###############
589 blenderstatic: $(DIR)/$(DEBUG_DIR)bin/blenderstatic
590 blenderdynamic: $(DIR)/$(DEBUG_DIR)bin/blender$(EXT)
591 blenderplayer: $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT)
592 blenderdynplayer: $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT)
594 blenderplayer.app: blenderplayer
595 @$(MAKE) -C darwin/ APPLICATION=blenderplayer
597 blenderdynamic.app: blenderdynamic
598 @$(MAKE) -C darwin/ APPLICATION=blender
600 # XPCOM connector only for linux so far...
602 xplink: $(DIR)/$(DEBUG_DIR)bin/Blender3DPlugin$(SOEXT)
606 ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
607 plugin: $(DIR)/$(DEBUG_DIR)bin/npBlender3DPlugin$(SOEXT)
608 ptest: $(DIR)/$(DEBUG_DIR)bin/npTestPlugin$(SOEXT)
610 # Windows needs a 8.3 name... Why? Dunno...
612 ifneq ($(FREE_WINDOWS),true)
613 plugin: $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT)
617 $(DIR)/$(DEBUG_DIR)bin/blenderstatic: $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB)
618 @echo "****> Link $@"
620 $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"static"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
622 mkdir -p $(DIR)/$(DEBUG_DIR)bin
623 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderstatic $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB) $(PYLIB) $(LLIBS) $(SADD) $(LOPTS)
625 /bin/rm $(BUILDINFO_O)
628 $(DIR)/$(DEBUG_DIR)bin/blender$(EXT): $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB)
629 @echo "****> Link $@"
631 $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
633 mkdir -p $(DIR)/$(DEBUG_DIR)bin
634 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blender$(EXT) $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB) $(PYLIB) $(LLIBS) $(DADD) $(LOPTS)
636 /bin/rm $(BUILDINFO_O)
639 $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT): $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB)
640 @echo "****> Link $@"
642 $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
644 mkdir -p $(DIR)/$(DEBUG_DIR)bin
645 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(PYPLAYERLIB) $(LLIBS) $(DADD) $(LOPTS)
647 /bin/rm $(BUILDINFO_O)
650 $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT): $(OBJS) $(COMLIB) $(SPLIB)
651 @echo "****> Link $@"
653 $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
655 mkdir -p $(DIR)/$(DEBUG_DIR)bin
656 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(PYLIB) $(LLIBS) $(DADD) $(LOPTS)
658 /bin/rm $(BUILDINFO_O)
662 $(DIR)/$(DEBUG_DIR)bin/Blender3DPlugin$(SOEXT): $(PLUGAPPLIB_XPLINK)
663 @echo "****> Link $@"
665 $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
667 mkdir -p $(DIR)/$(DEBUG_DIR)bin
668 $(CCC) $(DYNLDFLAGS) -o $@ $(PLUGAPPLIB_XPLINK) $(LOPTS)
670 /bin/rm $(BUILDINFO_O)
674 # Windows build needs a def file? Why? For exposing functions from the
675 # dll to the outside world. However, this is alsi done internally..
676 DEFFILE = ./gameengine/GamePlayer/netscape/src/npB3DPlg.def
678 # Windows needs a specific name format for dll.s so we give it one.
680 $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
681 @echo "****> Link $@"
683 $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
685 # $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PYLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS)
686 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PYLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS) /def:$(DEFFILE)
688 /bin/rm $(BUILDINFO_O)
692 ifeq ($(OS),$(findstring $(OS), "linux freebsd irix solaris"))
693 $(DIR)/$(DEBUG_DIR)bin/npBlender3DPlugin$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
694 @echo "****> Link $@"
696 $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
698 mkdir -p $(DIR)/$(DEBUG_DIR)bin
699 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PYLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS)
701 /bin/rm $(BUILDINFO_O)
704 $(DIR)/$(DEBUG_DIR)bin/npTestPlugin$(SOEXT): $(NSPLUGLIB)
705 @echo "****> Link $@"
707 $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
709 mkdir -p $(DIR)/$(DEBUG_DIR)bin
710 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGTESTLIB) $(LLIBS) $(DADD) $(LOPTS)
712 /bin/rm $(BUILDINFO_O)