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_MEMUTIL)/lib/libmemutil.a
154 COMLIB += $(NAN_BMFONT)/lib/$(DEBUG_DIR)libbmfont.a
155 COMLIB += $(NAN_PNG)/lib/libpng.a
156 COMLIB += $(OCGDIR)/blender/yafray/$(DEBUG_DIR)libyafrayexport.a
157 COMLIB += $(OCGDIR)/blender/blenlib/$(DEBUG_DIR)libblenlib.a
158 ifeq ($(WITH_QUICKTIME), true)
159 COMLIB += $(OCGDIR)/blender/blenderqt/$(DEBUG_DIR)libblenderqt.a
161 ifeq ($(WITH_OPENEXR), true)
162 COMLIB += $(OCGDIR)/blender/imbuf/openexr/$(DEBUG_DIR)libopenexr.a
164 COMLIB += $(OCGDIR)/blender/imbuf/cineon/$(DEBUG_DIR)libcineon.a
165 ifeq ($(WITH_FREETYPE2), true)
166 ifeq ($(OS), windows)
167 ifeq ($(FREE_WINDOWS), true)
168 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
170 COMLIB += $(NAN_FREETYPE)/lib/freetype2ST.lib
174 COMLIB += $(NAN_FREETYPE)/lib32/libfreetype.a
176 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
180 ifeq ($(INTERNATIONAL), true)
181 COMLIB += $(OCGDIR)/blender/ftfont/$(DEBUG_DIR)libftfont.a
182 ifeq ($(OS), windows)
183 ifeq ($(FREE_WINDOWS), true)
184 COMLIB += $(NAN_GETTEXT)/lib/freegettext.a
185 COMLIB += $(NAN_FTGL)/lib/libftgl.a
186 #COMLIB += $(NAN_ICONV)/lib/freeiconv.a
188 COMLIB += $(NAN_GETTEXT)/lib/gnu_gettext.lib
189 COMLIB += $(NAN_FTGL)/lib/ftgl_static_ST.lib
190 COMLIB += $(NAN_FREETYPE)/lib/freetype2ST.lib
191 COMLIB += $(NAN_ICONV)/lib/iconv.lib
194 COMLIB += $(NAN_FTGL)/lib/libftgl.a
196 COMLIB += $(NAN_FREETYPE)/lib32/libfreetype.a
197 COMLIB += $(NAN_FREETYPE)/lib32/libintl.a
199 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
203 COMLIB += $(NAN_GETTEXT)/lib/libintl.a
205 ifeq ($(OS), solaris)
206 COMLIB += $(NAN_GETTEXT)/lib/libintl.a
211 COMLIB += $(NAN_SDL)/lib/libSDL.a
213 ifeq ($(OS), windows)
214 ifeq ($(FREE_WINDOWS), true)
215 COMLIB += $(NAN_SDL)/lib/libSDL.a
216 COMLIB += $(NAN_PTHREADS)/lib/libpthreadGC2.a
218 COMLIB += $(NAN_SDL)/lib/SDL.lib
222 ifeq ($(WITH_OPENEXR), true)
223 COMLIB += $(NAN_OPENEXR_LIBS)
226 PULIB = $(NAN_IKSOLVER)/lib/libiksolver.a
227 PULIB += $(NAN_MOTO)/lib/libmoto.a
228 PULIB += $(NAN_ELBEEM)/lib/$(DEBUG_DIR)libelbeem.a
229 PULIB += $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
230 PULIB += $(OCGDIR)/blender/src/$(DEBUG_DIR)libsrcpublisher.a
232 ifeq ($(NAN_NO_KETSJI),true)
233 PULIB += $(NAN_MOTO)/lib/libmoto.a
234 PULIB += $(OCGDIR)/kernel/gen_system/$(DEBUG_DIR)libgen_system.a
235 PULIB += $(OCGDIR)/kernel/gen_messaging/$(DEBUG_DIR)libgen_messaging.a
236 COMLIB += $(NAN_SND_LIBS)
239 SPLIB1 = $(OCGDIR)/gameengine/GamePlayer/ghost/$(DEBUG_DIR)libghost.a
240 SPLIB1 += $(OCGDIR)/gameengine/GamePlayer/common/$(DEBUG_DIR)libcommon.a
241 SPLIB1 += $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
242 SPLIB1 += $(NAN_GHOST)/lib/$(DEBUG_DIR)libghost.a
244 SPLIB = $(OCGDIR)/blender/makesdna/$(DEBUG_DIR)DNA.o
245 SPLIB += $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
246 # this is used for the plugin. It uses some things from libz.a,
247 # but somehow it consistently fails to resolve these symbols... or
248 # can I just not check them? nm claims they aren't...
249 SPLIB += $(OCGDIR)/blender/blenkernel/blenkernel_blc/$(DEBUG_DIR)libblenkernel_blc.a
251 # These three need to be explicitly mentioned on the cl, because
252 # if they are offered as a lib, they are optimized away. (nzc)
253 NSPLUGLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)UnixShell.o
254 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)stubs.o
255 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)winstubs.o
256 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)Blender3DPlugin_native_implementation.o
258 # Here you can configure what sort of test to make for the plugin.
259 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_stub.a
260 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_colorcycle.a
261 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_gears.a
262 PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_threaded_gears.a
264 # XPCOM is done only for Linux for now
265 ifeq ($(OS),$(findstring $(OS), "linux"))
267 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)XPH_xpcom_hooks.o
271 PLUGAPPLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)libplugin_ketsji_hooks.a
273 ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
274 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)PLG_X11_windowing.o
275 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/unix/$(DEBUG_DIR)libunix.a
277 ifeq ($(OS),$(findstring $(OS), "windows"))
278 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)PLG_MSWindows_windowing.o
279 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)npB3DPlg.res
280 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/windows/$(DEBUG_DIR)libwindows.a
282 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/$(DEBUG_DIR)libcommon.a
284 ifeq ($(OS),$(findstring $(OS), "linux"))
286 PLUGAPPLIB_XPLINK = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)_Blender3DPlugin_implementation_.o
290 # A bit silly... but needed to resolve symbols.
291 PLUGREMLIB = $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
293 ######################## OS dependencies (alphabetic!) ################
298 BINTARGETS = blenderdynamic
302 BINTARGETS = blenderdynamic.app
303 BINTARGETS += blenderplayer.app
305 PYLIB = -framework Python
307 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
312 ifeq ($(OS_VERSION),$(findstring $(OS_VERSION), "3.4 4.0"))
313 BINTARGETS = blenderdynamic
314 BINTARGETS += blenderstatic
316 BINTARGETS = blenderdynamic
317 BINTARGETS += blenderplayer
320 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
321 PYLIB += $(NAN_MXTEXTTOOLS)
325 BINTARGETS = blenderdynamic
326 BINTARGETS += blenderplayer
328 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
329 PYLIB += $(NAN_MXTEXTTOOLS)
333 BINTARGETS = blenderdynamic
335 BINTARGETS = blenderdynamic
336 BINTARGETS += blenderplayer
339 BINTARGETS = blenderdynamic
340 BINTARGETS += blenderplayer
341 BINTARGETS += blenderstatic
342 ifneq ($(NAN_NO_PLUGIN),true)
343 BINTARGETS += plugin xplink
346 ifeq ($(CPU),powerpc)
347 BINTARGETS = blenderdynamic
348 BINTARGETS += blenderstatic
349 BINTARGETS += blenderplayer
351 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
352 PYLIB += $(NAN_MXTEXTTOOLS)
356 BINTARGETS = blenderstatic
357 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
361 BINTARGETS = blenderdynamic
362 BINTARGETS += blenderplayer
366 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
367 PYLIB += $(NAN_MXTEXTTOOLS)
368 PYLIB += $(NAN_ZLIB)/lib/libz.a
369 PULIB += $(NAN_ZLIB)/lib/libz.a
370 SPLIB += $(NAN_ZLIB)/lib/libz.a
373 # OpenAL libs are already compiled as shared code! Check FMod if we switch to that. (nzc)
375 # Some vars to keep the rest of this section mostly readable
377 SOUNDSYSTEM = $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
378 DUMMYSOUND = $(OCGDIR)/intern/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
379 OPENALSOUND = $(OCGDIR)/intern/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
380 SDLSOUND = $(OCGDIR)/intern/SDLSoundSystem/$(DEBUG_DIR)libSDLSoundSystem.a
382 # Some kooky logic going on here ...
383 ifeq ($(NAN_NO_OPENAL), true)
384 NAN_SND_LIBS = $(SOUNDSYSTEM)
385 NAN_SND_LIBS += $(DUMMYSOUND)
386 NAN_SND_LIBS += $(SOUNDSYSTEM)
388 ifeq ($(OS),$(findstring $(OS), "freebsd linux windows"))
389 ifeq ($(CPU),$(findstring $(CPU), "i386 powerpc x86_64"))
390 NAN_SND_LIBS = $(SOUNDSYSTEM)
391 NAN_SND_LIBS += $(DUMMYSOUND)
392 NAN_SND_LIBS += $(OPENALSOUND)
393 NAN_SND_LIBS += $(SDLSOUND)
394 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
395 NAN_SND_LIBS += $(SOUNDSYSTEM)
398 NAN_SND_LIBS = $(SOUNDSYSTEM)
399 NAN_SND_LIBS += $(DUMMYSOUND)
400 NAN_SND_LIBS += $(OPENALSOUND)
401 NAN_SND_LIBS += $(SDLSOUND)
402 NAN_SND_LIBS += $(NAN_OPENAL)/lib/openal_static.lib
403 NAN_SND_LIBS += $(SOUNDSYSTEM)
405 NAN_SND_LIBS = $(SOUNDSYSTEM)
406 NAN_SND_LIBS += $(DUMMYSOUND)
407 NAN_SND_LIBS += $(SOUNDSYSTEM)
412 NAN_SND_LIBS = $(SOUNDSYSTEM)
413 NAN_SND_LIBS += $(DUMMYSOUND)
414 NAN_SND_LIBS += $(OPENALSOUND)
415 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
416 NAN_SND_LIBS += $(SOUNDSYSTEM)
418 ifeq ($(OS), solaris)
419 NAN_SND_LIBS = $(SOUNDSYSTEM)
420 NAN_SND_LIBS += $(DUMMYSOUND)
421 NAN_SND_LIBS += $(OPENALSOUND)
422 NAN_SND_LIBS += $(SDLSOUND)
423 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
424 NAN_SND_LIBS += $(SOUNDSYSTEM)
426 NAN_SND_LIBS = $(SOUNDSYSTEM)
427 NAN_SND_LIBS += $(DUMMYSOUND)
428 NAN_SND_LIBS += $(SOUNDSYSTEM)
435 ifeq ($(FREE_WINDOWS),true)
436 PYLIB = $(NAN_PYTHON)/lib/freepy.a
438 PYLIB = $(NAN_PYTHON)/lib/python23.lib
441 PYPLAYERLIB = $(NAN_PYTHON)/static/*.obj
442 PYPLAYERLIB = $(PYLIB)
444 # Might need to change this to $(NAN_MOZILLA_LIB)/nspr4.lib
445 NSPLUGLIB += $(NAN_NSPR)/lib/nspr4.lib
447 BINTARGETS = blenderdynamic
448 ifeq ($(FREE_WINDOWS),true)
449 ifneq ($(NAN_NO_KETSJI),true)
450 BINTARGETS += blenderplayer
453 BINTARGETS += blenderplayer
454 BINTARGETS += blenderdynplayer
458 PULIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winblender.res
459 PULIB += $(NAN_ZLIB)/lib/libz.a
460 SPLIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winblender.res
461 SPLIB += $(NAN_ZLIB)/lib/libz.a
463 # This code below seems outdated and doesn't even seem to
464 # apply to the Windows platform. I've commented it
465 # out until someone can take a good look at it and confirm
466 # or deny. If it breaks anything blame Chris Burt / Desoto
468 #ifdef NAN_PLAYERSTATIC
469 # PYPLAYERLIB = $(NAN_PYTHON)/static/python20.lib
470 # BINTARGETS = blenderplayer
472 # NAN_SND_LIBS = $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
473 # NAN_SND_LIBS += $(OCGDIR)/intern/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
474 # NAN_SND_LIBS += $(OCGDIR)/intern/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
475 # NAN_SND_LIBS += $(NAN_OPENAL)/lib/openal_static.lib
476 # NAN_SND_LIBS += $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
478 # PYINCLUDEOK := $(shell diff -qbB gameengine/Ketsji/KX_Python.h gameengine/Ketsji/KX_Python_static.h)
479 # ifneq (x$(PYINCLUDEOK),x)
480 # DUMMY := $(shell cat gameengine/Ketsji/KX_Python_static.h > gameengine/Ketsji/KX_Python.h)
483 # PYINCLUDEOK := $(shell diff -qbB gameengine/Ketsji/KX_Python.h gameengine/Ketsji/KX_Python_dynamic.h)
484 # ifneq (x$(PYINCLUDEOK),x)
485 # DUMMY := $(shell cat gameengine/Ketsji/KX_Python_dynamic.h > gameengine/Ketsji/KX_Python.h)
490 ifeq ($(NAN_JUST_BLENDERDYNAMIC),true)
492 BINTARGETS = blenderdynamic.app
494 BINTARGETS = blenderdynamic
499 # prepare for NAN_BUILDINFO compile at the *sigh* link rules below
504 include nan_compile.mk
507 ################## target rules ########################
510 @echo "****> Make $@ by $(ID)@$(HOST) at $(MAKE_START) on $(CONFIG_GUESS)"
512 @for n in $(NANENV); do \
520 include nan_subdirs.mk
522 ################## target rules ########################
527 @$(MAKE) link DEBUG_DIR="debug/" NANENV=$(NANENV)
529 clean:: linkclean debuglinkclean
532 @echo "****> Build $(MAKE_START) - `date '+%H:%M:%S %d-%b-%Y'`"
534 @for n in $(NANENV); do \
541 @$(RM) -r $(DIR)/blenderstatic* \
542 $(DIR)/blenderplayer* \
545 @$(RM) $(DIR)/blenderstatic* \
546 $(DIR)/blenderplayer* \
552 @$(RM) -r $(DIR)/debug/blenderstatic* \
553 $(DIR)/debug/blenderplayer* \
556 @$(RM) $(DIR)/debug/blenderstatic* \
557 $(DIR)/debug/blenderplayer* \
561 # Shortcut for Tinderbox release builds. Mortals don't use this.
563 @$(MAKE) -C ../release/ all || exit 1;
565 ############### Linker rules ###############
567 blenderstatic: $(DIR)/$(DEBUG_DIR)bin/blenderstatic
568 blenderdynamic: $(DIR)/$(DEBUG_DIR)bin/blender$(EXT)
569 blenderplayer: $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT)
570 blenderdynplayer: $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT)
572 blenderplayer.app: blenderplayer
573 @$(MAKE) -C darwin/ APPLICATION=blenderplayer
575 blenderdynamic.app: blenderdynamic
576 @$(MAKE) -C darwin/ APPLICATION=blender
578 # XPCOM connector only for linux so far...
580 xplink: $(DIR)/$(DEBUG_DIR)bin/Blender3DPlugin$(SOEXT)
584 ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
585 plugin: $(DIR)/$(DEBUG_DIR)bin/npBlender3DPlugin$(SOEXT)
586 ptest: $(DIR)/$(DEBUG_DIR)bin/npTestPlugin$(SOEXT)
588 # Windows needs a 8.3 name... Why? Dunno...
590 ifneq ($(FREE_WINDOWS),true)
591 plugin: $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT)
595 $(DIR)/$(DEBUG_DIR)bin/blenderstatic: $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB)
596 @echo "****> Link $@"
598 $(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
600 mkdir -p $(DIR)/$(DEBUG_DIR)bin
601 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderstatic $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB) $(PYLIB) $(LLIBS) $(SADD) $(LOPTS)
603 /bin/rm $(BUILDINFO_O)
606 $(DIR)/$(DEBUG_DIR)bin/blender$(EXT): $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB)
607 @echo "****> Link $@"
609 $(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
611 mkdir -p $(DIR)/$(DEBUG_DIR)bin
612 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blender$(EXT) $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB) $(PYLIB) $(LLIBS) $(DADD) $(LOPTS)
614 /bin/rm $(BUILDINFO_O)
617 $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT): $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB)
618 @echo "****> Link $@"
620 $(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
622 mkdir -p $(DIR)/$(DEBUG_DIR)bin
623 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(PYPLAYERLIB) $(LLIBS) $(DADD) $(LOPTS)
625 /bin/rm $(BUILDINFO_O)
628 $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT): $(OBJS) $(COMLIB) $(SPLIB)
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/blenderdynplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(PYLIB) $(LLIBS) $(DADD) $(LOPTS)
636 /bin/rm $(BUILDINFO_O)
640 $(DIR)/$(DEBUG_DIR)bin/Blender3DPlugin$(SOEXT): $(PLUGAPPLIB_XPLINK)
641 @echo "****> Link $@"
643 $(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
645 mkdir -p $(DIR)/$(DEBUG_DIR)bin
646 $(CCC) $(DYNLDFLAGS) -o $@ $(PLUGAPPLIB_XPLINK) $(LOPTS)
648 /bin/rm $(BUILDINFO_O)
652 # Windows build needs a def file? Why? For exposing functions from the
653 # dll to the outside world. However, this is alsi done internally..
654 DEFFILE = ./gameengine/GamePlayer/netscape/src/npB3DPlg.def
656 # Windows needs a specific name format for dll.s so we give it one.
658 $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
659 @echo "****> Link $@"
661 $(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
663 # $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PYLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS)
664 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PYLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS) /def:$(DEFFILE)
666 /bin/rm $(BUILDINFO_O)
670 ifeq ($(OS),$(findstring $(OS), "linux freebsd irix solaris"))
671 $(DIR)/$(DEBUG_DIR)bin/npBlender3DPlugin$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
672 @echo "****> Link $@"
674 $(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
676 mkdir -p $(DIR)/$(DEBUG_DIR)bin
677 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PYLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS)
679 /bin/rm $(BUILDINFO_O)
682 $(DIR)/$(DEBUG_DIR)bin/npTestPlugin$(SOEXT): $(NSPLUGLIB)
683 @echo "****> Link $@"
685 $(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
687 mkdir -p $(DIR)/$(DEBUG_DIR)bin
688 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGTESTLIB) $(LLIBS) $(DADD) $(LOPTS)
690 /bin/rm $(BUILDINFO_O)