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/img/$(DEBUG_DIR)libimg.a
87 GRPLIB += $(OCGDIR)/blender/render/$(DEBUG_DIR)librender.a
88 GRPLIB += $(OCGDIR)/blender/radiosity/$(DEBUG_DIR)libradiosity.a
89 GRPLIB += $(NAN_OPENNL)/lib/$(DEBUG_DIR)libopennl.a
90 GRPLIB += $(NAN_SUPERLU)/lib/$(DEBUG_DIR)libsuperlu.a
91 GRPLIB += $(OCGDIR)/blender/python/$(DEBUG_DIR)libpython.a
93 # nlin: the reason that some libraries appear more than once below is
94 # to handle circular dependencies in linking among libraries... some
95 # linkers (e.g. under Linux) need libs to be specified multiple times
96 # to properly resolve circular dependencies. ugly, but it works...
97 # the repeat entries could probably be trimmed down.
98 COMLIB = $(OCGDIR)/blender/blenkernel/$(DEBUG_DIR)libblenkernel.a
99 COMLIB += $(NAN_DECIMATION)/lib/libdecimation.a
100 COMLIB += $(OCGDIR)/blender/blenloader/$(DEBUG_DIR)libblenloader.a
101 COMLIB += $(OCGDIR)/blender/blenpluginapi/$(DEBUG_DIR)libblenpluginapi.a
102 COMLIB += $(OCGDIR)/blender/imbuf/$(DEBUG_DIR)libimbuf.a
103 COMLIB += $(OCGDIR)/blender/blenlib/$(DEBUG_DIR)libblenlib.a
104 COMLIB += $(OCGDIR)/blender/avi/$(DEBUG_DIR)libavi.a
105 COMLIB += $(NAN_JPEG)/lib/libjpeg.a
106 ifneq ($(NAN_NO_KETSJI),true)
107 COMLIB += $(OCGDIR)/gameengine/bloutines/$(DEBUG_DIR)libbloutines.a
108 COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
109 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
110 COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
111 COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
112 COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
113 COMLIB += $(NAN_SOLID)/lib/libsolid.a
114 COMLIB += $(NAN_SOLID)/lib/libsolid_broad.a
115 COMLIB += $(NAN_SOLID)/lib/libsolid_complex.a
116 COMLIB += $(NAN_SOLID)/lib/libsolid_convex.a
117 COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a
118 COMLIB += $(OCGDIR)/gameengine/blphys/fuzzics/$(DEBUG_DIR)libfuzzics.a
119 COMLIB += $(NAN_QHULL)/lib/libqhull.a
120 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
121 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
122 # COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a
123 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
124 COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
125 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
126 # COMLIB += $(OCGDIR)/gameengine/blphys/blode/$(DEBUG_DIR)libblode.a
127 # COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a
128 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
129 COMLIB += $(OCGDIR)/gameengine/blphys/blbullet/$(DEBUG_DIR)libblbullet.a
130 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
131 # COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a
132 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
133 COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
134 COMLIB += $(OCGDIR)/gameengine/logic/$(DEBUG_DIR)liblogic.a
135 COMLIB += $(OCGDIR)/gameengine/logic/Joystick/$(DEBUG_DIR)libJoystick.a
136 COMLIB += $(OCGDIR)/gameengine/rasterizer/$(DEBUG_DIR)librasterizer.a
137 COMLIB += $(OCGDIR)/gameengine/OpenGLrasterizer/$(DEBUG_DIR)libOpenGLrasterizer.a
138 COMLIB += $(OCGDIR)/gameengine/expression/$(DEBUG_DIR)libexpression.a
139 COMLIB += $(OCGDIR)/gameengine/scenegraph/$(DEBUG_DIR)libscenegraph.a
140 # COMLIB += $(OCGDIR)/sumo/$(DEBUG_DIR)libfuzzics.a
141 # COMLIB += $(OCGDIR)/sumo/$(DEBUG_DIR)libsolid.a
142 COMLIB += $(NAN_MOTO)/lib/libmoto.a
143 COMLIB += $(NAN_SND_LIBS)
144 COMLIB += $(OCGDIR)/kernel/gen_system/$(DEBUG_DIR)libgen_system.a
145 COMLIB += $(OCGDIR)/kernel/gen_messaging/$(DEBUG_DIR)libgen_messaging.a
146 COMLIB += $(OCGDIR)/gameengine/ketsji/KXNetwork/$(DEBUG_DIR)libKXNetwork.a
147 COMLIB += $(OCGDIR)/gameengine/Network/$(DEBUG_DIR)libNetwork.a
148 COMLIB += $(OCGDIR)/gameengine/Network/LoopBackNetwork/$(DEBUG_DIR)libLoopBackNetwork.a
149 COMLIB += $(NAN_BULLET)/lib/libbulletdyn.a
150 COMLIB += $(NAN_BULLET)/lib/libbullet.a
152 COMLIB += $(NAN_GUARDEDALLOC)/lib/libguardedalloc.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 ifeq ($(WITH_FREETYPE2), true)
164 ifeq ($(OS), windows)
165 ifeq ($(FREE_WINDOWS), true)
166 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
168 COMLIB += $(NAN_FREETYPE)/lib/freetype2ST.lib
172 COMLIB += $(NAN_FREETYPE)/lib32/libfreetype.a
174 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
178 ifeq ($(INTERNATIONAL), true)
179 COMLIB += $(OCGDIR)/blender/ftfont/$(DEBUG_DIR)libftfont.a
180 ifeq ($(OS), windows)
181 ifeq ($(FREE_WINDOWS), true)
182 COMLIB += $(NAN_GETTEXT)/lib/freegettext.a
183 COMLIB += $(NAN_FTGL)/lib/libftgl.a
184 #COMLIB += $(NAN_ICONV)/lib/freeiconv.a
186 COMLIB += $(NAN_GETTEXT)/lib/gnu_gettext.lib
187 COMLIB += $(NAN_FTGL)/lib/ftgl_static_ST.lib
188 COMLIB += $(NAN_FREETYPE)/lib/freetype2ST.lib
189 COMLIB += $(NAN_ICONV)/lib/iconv.lib
192 COMLIB += $(NAN_FTGL)/lib/libftgl.a
194 COMLIB += $(NAN_FREETYPE)/lib32/libfreetype.a
195 COMLIB += $(NAN_FREETYPE)/lib32/libintl.a
197 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
201 COMLIB += $(NAN_GETTEXT)/lib/libintl.a
203 ifeq ($(OS), solaris)
204 COMLIB += $(NAN_GETTEXT)/lib/libintl.a
209 COMLIB += $(NAN_SDL)/lib/libSDL.a
211 ifeq ($(OS), windows)
212 ifeq ($(FREE_WINDOWS), true)
213 COMLIB += $(NAN_SDL)/lib/libSDL.a
215 COMLIB += $(NAN_SDL)/lib/SDL.lib
219 ifeq ($(WITH_OPENEXR), true)
220 COMLIB += $(NAN_OPENEXR_LIBS)
223 PULIB = $(NAN_IKSOLVER)/lib/libiksolver.a
224 PULIB += $(NAN_MOTO)/lib/libmoto.a
225 PULIB += $(NAN_ELBEEM)/lib/$(DEBUG_DIR)libelbeem.a
226 PULIB += $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
227 PULIB += $(OCGDIR)/blender/src/$(DEBUG_DIR)libsrcpublisher.a
229 ifeq ($(NAN_NO_KETSJI),true)
230 PULIB += $(NAN_MOTO)/lib/libmoto.a
231 PULIB += $(OCGDIR)/kernel/gen_system/$(DEBUG_DIR)libgen_system.a
232 PULIB += $(OCGDIR)/kernel/gen_messaging/$(DEBUG_DIR)libgen_messaging.a
233 COMLIB += $(NAN_SND_LIBS)
236 SPLIB1 = $(OCGDIR)/gameengine/GamePlayer/ghost/$(DEBUG_DIR)libghost.a
237 SPLIB1 += $(OCGDIR)/gameengine/GamePlayer/common/$(DEBUG_DIR)libcommon.a
238 SPLIB1 += $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
239 SPLIB1 += $(NAN_GHOST)/lib/$(DEBUG_DIR)libghost.a
241 SPLIB = $(OCGDIR)/blender/makesdna/$(DEBUG_DIR)DNA.o
242 SPLIB += $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
243 # this is used for the plugin. It uses some things from libz.a,
244 # but somehow it consistently fails to resolve these symbols... or
245 # can I just not check them? nm claims they aren't...
246 SPLIB += $(OCGDIR)/blender/blenkernel/blenkernel_blc/$(DEBUG_DIR)libblenkernel_blc.a
248 # These three need to be explicitly mentioned on the cl, because
249 # if they are offered as a lib, they are optimized away. (nzc)
250 NSPLUGLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)UnixShell.o
251 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)stubs.o
252 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)winstubs.o
253 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)Blender3DPlugin_native_implementation.o
255 # Here you can configure what sort of test to make for the plugin.
256 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_stub.a
257 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_colorcycle.a
258 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_gears.a
259 PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_threaded_gears.a
261 # XPCOM is done only for Linux for now
262 ifeq ($(OS),$(findstring $(OS), "linux"))
264 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)XPH_xpcom_hooks.o
268 PLUGAPPLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)libplugin_ketsji_hooks.a
270 ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
271 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)PLG_X11_windowing.o
272 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/unix/$(DEBUG_DIR)libunix.a
274 ifeq ($(OS),$(findstring $(OS), "windows"))
275 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)PLG_MSWindows_windowing.o
276 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)npB3DPlg.res
277 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/windows/$(DEBUG_DIR)libwindows.a
279 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/$(DEBUG_DIR)libcommon.a
281 ifeq ($(OS),$(findstring $(OS), "linux"))
283 PLUGAPPLIB_XPLINK = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)_Blender3DPlugin_implementation_.o
287 # A bit silly... but needed to resolve symbols.
288 PLUGREMLIB = $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
290 ######################## OS dependencies (alphabetic!) ################
295 BINTARGETS = blenderdynamic
299 BINTARGETS = blenderdynamic.app
300 BINTARGETS += blenderplayer.app
302 PYLIB = -framework Python
304 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
309 ifeq ($(OS_VERSION),$(findstring $(OS_VERSION), "3.4 4.0"))
310 BINTARGETS = blenderdynamic
311 BINTARGETS += blenderstatic
313 BINTARGETS = blenderdynamic
314 BINTARGETS += blenderplayer
317 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
318 PYLIB += $(NAN_MXTEXTTOOLS)
322 BINTARGETS = blenderdynamic
323 BINTARGETS += blenderplayer
325 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
326 PYLIB += $(NAN_MXTEXTTOOLS)
330 BINTARGETS = blenderdynamic
332 BINTARGETS = blenderdynamic
333 BINTARGETS += blenderplayer
336 BINTARGETS = blenderdynamic
337 BINTARGETS += blenderplayer
338 BINTARGETS += blenderstatic
339 ifneq ($(NAN_NO_PLUGIN),true)
340 BINTARGETS += plugin xplink
343 ifeq ($(CPU),powerpc)
344 BINTARGETS = blenderdynamic
345 BINTARGETS += blenderstatic
346 BINTARGETS += blenderplayer
348 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
349 PYLIB += $(NAN_MXTEXTTOOLS)
353 BINTARGETS = blenderstatic
354 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
358 BINTARGETS = blenderdynamic
359 BINTARGETS += blenderplayer
363 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
364 PYLIB += $(NAN_MXTEXTTOOLS)
365 PYLIB += $(NAN_ZLIB)/lib/libz.a
366 PULIB += $(NAN_ZLIB)/lib/libz.a
367 SPLIB += $(NAN_ZLIB)/lib/libz.a
370 # OpenAL libs are already compiled as shared code! Check FMod if we switch to that. (nzc)
372 # Some vars to keep the rest of this section mostly readable
374 SOUNDSYSTEM = $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
375 DUMMYSOUND = $(OCGDIR)/intern/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
376 OPENALSOUND = $(OCGDIR)/intern/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
377 SDLSOUND = $(OCGDIR)/intern/SDLSoundSystem/$(DEBUG_DIR)libSDLSoundSystem.a
379 # Some kooky logic going on here ...
380 ifeq ($(NAN_NO_OPENAL), true)
381 NAN_SND_LIBS = $(SOUNDSYSTEM)
382 NAN_SND_LIBS += $(DUMMYSOUND)
383 NAN_SND_LIBS += $(SOUNDSYSTEM)
385 ifeq ($(OS),$(findstring $(OS), "freebsd linux windows"))
386 ifeq ($(CPU),$(findstring $(CPU), "i386 powerpc x86_64"))
387 NAN_SND_LIBS = $(SOUNDSYSTEM)
388 NAN_SND_LIBS += $(DUMMYSOUND)
389 NAN_SND_LIBS += $(OPENALSOUND)
390 NAN_SND_LIBS += $(SDLSOUND)
391 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
392 NAN_SND_LIBS += $(SOUNDSYSTEM)
395 NAN_SND_LIBS = $(SOUNDSYSTEM)
396 NAN_SND_LIBS += $(DUMMYSOUND)
397 NAN_SND_LIBS += $(OPENALSOUND)
398 NAN_SND_LIBS += $(SDLSOUND)
399 NAN_SND_LIBS += $(NAN_OPENAL)/lib/openal_static.lib
400 NAN_SND_LIBS += $(SOUNDSYSTEM)
402 NAN_SND_LIBS = $(SOUNDSYSTEM)
403 NAN_SND_LIBS += $(DUMMYSOUND)
404 NAN_SND_LIBS += $(SOUNDSYSTEM)
409 NAN_SND_LIBS = $(SOUNDSYSTEM)
410 NAN_SND_LIBS += $(DUMMYSOUND)
411 NAN_SND_LIBS += $(OPENALSOUND)
412 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
413 NAN_SND_LIBS += $(SOUNDSYSTEM)
415 ifeq ($(OS), solaris)
416 NAN_SND_LIBS = $(SOUNDSYSTEM)
417 NAN_SND_LIBS += $(DUMMYSOUND)
418 NAN_SND_LIBS += $(OPENALSOUND)
419 NAN_SND_LIBS += $(SDLSOUND)
420 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
421 NAN_SND_LIBS += $(SOUNDSYSTEM)
423 NAN_SND_LIBS = $(SOUNDSYSTEM)
424 NAN_SND_LIBS += $(DUMMYSOUND)
425 NAN_SND_LIBS += $(SOUNDSYSTEM)
432 ifeq ($(FREE_WINDOWS),true)
433 PYLIB = $(NAN_PYTHON)/lib/freepy.a
435 PYLIB = $(NAN_PYTHON)/lib/python23.lib
438 PYPLAYERLIB = $(NAN_PYTHON)/static/*.obj
439 PYPLAYERLIB = $(PYLIB)
441 # Might need to change this to $(NAN_MOZILLA_LIB)/nspr4.lib
442 NSPLUGLIB += $(NAN_NSPR)/lib/nspr4.lib
444 BINTARGETS = blenderdynamic
445 ifeq ($(FREE_WINDOWS),true)
446 ifneq ($(NAN_NO_KETSJI),true)
447 BINTARGETS += blenderplayer
450 BINTARGETS += blenderplayer
451 BINTARGETS += blenderdynplayer
455 PULIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winblender.res
456 PULIB += $(NAN_ZLIB)/lib/libz.a
457 SPLIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winblender.res
458 SPLIB += $(NAN_ZLIB)/lib/libz.a
460 # This code below seems outdated and doesn't even seem to
461 # apply to the Windows platform. I've commented it
462 # out until someone can take a good look at it and confirm
463 # or deny. If it breaks anything blame Chris Burt / Desoto
465 #ifdef NAN_PLAYERSTATIC
466 # PYPLAYERLIB = $(NAN_PYTHON)/static/python20.lib
467 # BINTARGETS = blenderplayer
469 # NAN_SND_LIBS = $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
470 # NAN_SND_LIBS += $(OCGDIR)/intern/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
471 # NAN_SND_LIBS += $(OCGDIR)/intern/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
472 # NAN_SND_LIBS += $(NAN_OPENAL)/lib/openal_static.lib
473 # NAN_SND_LIBS += $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
475 # PYINCLUDEOK := $(shell diff -qbB gameengine/Ketsji/KX_Python.h gameengine/Ketsji/KX_Python_static.h)
476 # ifneq (x$(PYINCLUDEOK),x)
477 # DUMMY := $(shell cat gameengine/Ketsji/KX_Python_static.h > gameengine/Ketsji/KX_Python.h)
480 # PYINCLUDEOK := $(shell diff -qbB gameengine/Ketsji/KX_Python.h gameengine/Ketsji/KX_Python_dynamic.h)
481 # ifneq (x$(PYINCLUDEOK),x)
482 # DUMMY := $(shell cat gameengine/Ketsji/KX_Python_dynamic.h > gameengine/Ketsji/KX_Python.h)
487 ifeq ($(NAN_JUST_BLENDERDYNAMIC),true)
489 BINTARGETS = blenderdynamic.app
491 BINTARGETS = blenderdynamic
496 # prepare for NAN_BUILDINFO compile at the *sigh* link rules below
501 include nan_compile.mk
504 ################## target rules ########################
507 @echo "****> Make $@ by $(ID)@$(HOST) at $(MAKE_START) on $(CONFIG_GUESS)"
509 @for n in $(NANENV); do \
517 include nan_subdirs.mk
519 ################## target rules ########################
524 @$(MAKE) link DEBUG_DIR="debug/" NANENV=$(NANENV)
526 clean:: linkclean debuglinkclean
529 @echo "****> Build $(MAKE_START) - `date '+%H:%M:%S %d-%b-%Y'`"
531 @for n in $(NANENV); do \
538 @$(RM) -r $(DIR)/blenderstatic* \
539 $(DIR)/blenderplayer* \
542 @$(RM) $(DIR)/blenderstatic* \
543 $(DIR)/blenderplayer* \
549 @$(RM) -r $(DIR)/debug/blenderstatic* \
550 $(DIR)/debug/blenderplayer* \
553 @$(RM) $(DIR)/debug/blenderstatic* \
554 $(DIR)/debug/blenderplayer* \
558 # Shortcut for Tinderbox release builds. Mortals don't use this.
560 @$(MAKE) -C ../release/ all || exit 1;
562 ############### Linker rules ###############
564 blenderstatic: $(DIR)/$(DEBUG_DIR)bin/blenderstatic
565 blenderdynamic: $(DIR)/$(DEBUG_DIR)bin/blender$(EXT)
566 blenderplayer: $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT)
567 blenderdynplayer: $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT)
569 blenderplayer.app: blenderplayer
570 @$(MAKE) -C darwin/ APPLICATION=blenderplayer
572 blenderdynamic.app: blenderdynamic
573 @$(MAKE) -C darwin/ APPLICATION=blender
575 # XPCOM connector only for linux so far...
577 xplink: $(DIR)/$(DEBUG_DIR)bin/Blender3DPlugin$(SOEXT)
581 ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
582 plugin: $(DIR)/$(DEBUG_DIR)bin/npBlender3DPlugin$(SOEXT)
583 ptest: $(DIR)/$(DEBUG_DIR)bin/npTestPlugin$(SOEXT)
585 # Windows needs a 8.3 name... Why? Dunno...
587 ifneq ($(FREE_WINDOWS),true)
588 plugin: $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT)
592 $(DIR)/$(DEBUG_DIR)bin/blenderstatic: $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB)
593 @echo "****> Link $@"
595 $(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
597 mkdir -p $(DIR)/$(DEBUG_DIR)bin
598 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderstatic $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB) $(PYLIB) $(LLIBS) $(SADD) $(LOPTS)
600 /bin/rm $(BUILDINFO_O)
603 $(DIR)/$(DEBUG_DIR)bin/blender$(EXT): $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB)
604 @echo "****> Link $@"
606 $(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
608 mkdir -p $(DIR)/$(DEBUG_DIR)bin
609 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blender$(EXT) $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB) $(PYLIB) $(LLIBS) $(DADD) $(LOPTS)
611 /bin/rm $(BUILDINFO_O)
614 $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT): $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB)
615 @echo "****> Link $@"
617 $(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
619 mkdir -p $(DIR)/$(DEBUG_DIR)bin
620 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(PYPLAYERLIB) $(LLIBS) $(DADD) $(LOPTS)
622 /bin/rm $(BUILDINFO_O)
625 $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT): $(OBJS) $(COMLIB) $(SPLIB)
626 @echo "****> Link $@"
628 $(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
630 mkdir -p $(DIR)/$(DEBUG_DIR)bin
631 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(PYLIB) $(LLIBS) $(DADD) $(LOPTS)
633 /bin/rm $(BUILDINFO_O)
637 $(DIR)/$(DEBUG_DIR)bin/Blender3DPlugin$(SOEXT): $(PLUGAPPLIB_XPLINK)
638 @echo "****> Link $@"
640 $(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
642 mkdir -p $(DIR)/$(DEBUG_DIR)bin
643 $(CCC) $(DYNLDFLAGS) -o $@ $(PLUGAPPLIB_XPLINK) $(LOPTS)
645 /bin/rm $(BUILDINFO_O)
649 # Windows build needs a def file? Why? For exposing functions from the
650 # dll to the outside world. However, this is alsi done internally..
651 DEFFILE = ./gameengine/GamePlayer/netscape/src/npB3DPlg.def
653 # Windows needs a specific name format for dll.s so we give it one.
655 $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
656 @echo "****> Link $@"
658 $(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
660 # $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PYLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS)
661 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PYLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS) /def:$(DEFFILE)
663 /bin/rm $(BUILDINFO_O)
667 ifeq ($(OS),$(findstring $(OS), "linux freebsd irix solaris"))
668 $(DIR)/$(DEBUG_DIR)bin/npBlender3DPlugin$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
669 @echo "****> Link $@"
671 $(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
673 mkdir -p $(DIR)/$(DEBUG_DIR)bin
674 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PYLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS)
676 /bin/rm $(BUILDINFO_O)
679 $(DIR)/$(DEBUG_DIR)bin/npTestPlugin$(SOEXT): $(NSPLUGLIB)
680 @echo "****> Link $@"
682 $(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
684 mkdir -p $(DIR)/$(DEBUG_DIR)bin
685 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGTESTLIB) $(LLIBS) $(DADD) $(LOPTS)
687 /bin/rm $(BUILDINFO_O)