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 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 ifeq ($(OS), solaris)
205 COMLIB += $(NAN_GETTEXT)/lib/libintl.a
210 COMLIB += $(NAN_SDL)/lib/libSDL.a
212 ifeq ($(OS), windows)
213 ifeq ($(FREE_WINDOWS), true)
214 COMLIB += $(NAN_SDL)/lib/libSDL.a
216 COMLIB += $(NAN_SDL)/lib/SDL.lib
220 ifeq ($(WITH_OPENEXR), true)
221 COMLIB += $(NAN_OPENEXR_LIBS)
224 PULIB = $(NAN_IKSOLVER)/lib/libiksolver.a
225 PULIB += $(NAN_MOTO)/lib/libmoto.a
226 PULIB += $(NAN_ELBEEM)/lib/$(DEBUG_DIR)libelbeem.a
227 PULIB += $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
228 PULIB += $(OCGDIR)/blender/src/$(DEBUG_DIR)libsrcpublisher.a
230 ifeq ($(NAN_NO_KETSJI),true)
231 PULIB += $(NAN_MOTO)/lib/libmoto.a
232 PULIB += $(OCGDIR)/kernel/gen_system/$(DEBUG_DIR)libgen_system.a
233 PULIB += $(OCGDIR)/kernel/gen_messaging/$(DEBUG_DIR)libgen_messaging.a
234 COMLIB += $(NAN_SND_LIBS)
237 SPLIB1 = $(OCGDIR)/gameengine/GamePlayer/ghost/$(DEBUG_DIR)libghost.a
238 SPLIB1 += $(OCGDIR)/gameengine/GamePlayer/common/$(DEBUG_DIR)libcommon.a
239 SPLIB1 += $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
240 SPLIB1 += $(NAN_GHOST)/lib/$(DEBUG_DIR)libghost.a
242 SPLIB = $(OCGDIR)/blender/makesdna/$(DEBUG_DIR)DNA.o
243 SPLIB += $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
244 # this is used for the plugin. It uses some things from libz.a,
245 # but somehow it consistently fails to resolve these symbols... or
246 # can I just not check them? nm claims they aren't...
247 SPLIB += $(OCGDIR)/blender/blenkernel/blenkernel_blc/$(DEBUG_DIR)libblenkernel_blc.a
249 # These three need to be explicitly mentioned on the cl, because
250 # if they are offered as a lib, they are optimized away. (nzc)
251 NSPLUGLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)UnixShell.o
252 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)stubs.o
253 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)winstubs.o
254 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)Blender3DPlugin_native_implementation.o
256 # Here you can configure what sort of test to make for the plugin.
257 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_stub.a
258 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_colorcycle.a
259 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_gears.a
260 PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_threaded_gears.a
262 # XPCOM is done only for Linux for now
263 ifeq ($(OS),$(findstring $(OS), "linux"))
265 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)XPH_xpcom_hooks.o
269 PLUGAPPLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)libplugin_ketsji_hooks.a
271 ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
272 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)PLG_X11_windowing.o
273 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/unix/$(DEBUG_DIR)libunix.a
275 ifeq ($(OS),$(findstring $(OS), "windows"))
276 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)PLG_MSWindows_windowing.o
277 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)npB3DPlg.res
278 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/windows/$(DEBUG_DIR)libwindows.a
280 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/$(DEBUG_DIR)libcommon.a
282 ifeq ($(OS),$(findstring $(OS), "linux"))
284 PLUGAPPLIB_XPLINK = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)_Blender3DPlugin_implementation_.o
288 # A bit silly... but needed to resolve symbols.
289 PLUGREMLIB = $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
291 ######################## OS dependencies (alphabetic!) ################
296 BINTARGETS = blenderdynamic
300 BINTARGETS = blenderdynamic.app
301 BINTARGETS += blenderplayer.app
303 PYLIB = -framework Python
305 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
310 ifeq ($(OS_VERSION),$(findstring $(OS_VERSION), "3.4 4.0"))
311 BINTARGETS = blenderdynamic
312 BINTARGETS += blenderstatic
314 BINTARGETS = blenderdynamic
315 BINTARGETS += blenderplayer
318 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
319 PYLIB += $(NAN_MXTEXTTOOLS)
323 BINTARGETS = blenderdynamic
324 BINTARGETS += blenderplayer
326 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
327 PYLIB += $(NAN_MXTEXTTOOLS)
331 BINTARGETS = blenderdynamic
333 BINTARGETS = blenderdynamic
334 BINTARGETS += blenderplayer
337 BINTARGETS = blenderdynamic
338 BINTARGETS += blenderplayer
339 BINTARGETS += blenderstatic
340 ifneq ($(NAN_NO_PLUGIN),true)
341 BINTARGETS += plugin xplink
344 ifeq ($(CPU),powerpc)
345 BINTARGETS = blenderdynamic
346 BINTARGETS += blenderstatic
347 BINTARGETS += blenderplayer
349 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
350 PYLIB += $(NAN_MXTEXTTOOLS)
354 BINTARGETS = blenderstatic
355 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
359 BINTARGETS = blenderdynamic
360 BINTARGETS += blenderplayer
364 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
365 PYLIB += $(NAN_MXTEXTTOOLS)
366 PYLIB += $(NAN_ZLIB)/lib/libz.a
367 PULIB += $(NAN_ZLIB)/lib/libz.a
368 SPLIB += $(NAN_ZLIB)/lib/libz.a
371 # OpenAL libs are already compiled as shared code! Check FMod if we switch to that. (nzc)
373 # Some vars to keep the rest of this section mostly readable
375 SOUNDSYSTEM = $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
376 DUMMYSOUND = $(OCGDIR)/intern/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
377 OPENALSOUND = $(OCGDIR)/intern/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
378 SDLSOUND = $(OCGDIR)/intern/SDLSoundSystem/$(DEBUG_DIR)libSDLSoundSystem.a
380 # Some kooky logic going on here ...
381 ifeq ($(NAN_NO_OPENAL), true)
382 NAN_SND_LIBS = $(SOUNDSYSTEM)
383 NAN_SND_LIBS += $(DUMMYSOUND)
384 NAN_SND_LIBS += $(SOUNDSYSTEM)
386 ifeq ($(OS),$(findstring $(OS), "freebsd linux windows"))
387 ifeq ($(CPU),$(findstring $(CPU), "i386 powerpc x86_64"))
388 NAN_SND_LIBS = $(SOUNDSYSTEM)
389 NAN_SND_LIBS += $(DUMMYSOUND)
390 NAN_SND_LIBS += $(OPENALSOUND)
391 NAN_SND_LIBS += $(SDLSOUND)
392 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
393 NAN_SND_LIBS += $(SOUNDSYSTEM)
396 NAN_SND_LIBS = $(SOUNDSYSTEM)
397 NAN_SND_LIBS += $(DUMMYSOUND)
398 NAN_SND_LIBS += $(OPENALSOUND)
399 NAN_SND_LIBS += $(SDLSOUND)
400 NAN_SND_LIBS += $(NAN_OPENAL)/lib/openal_static.lib
401 NAN_SND_LIBS += $(SOUNDSYSTEM)
403 NAN_SND_LIBS = $(SOUNDSYSTEM)
404 NAN_SND_LIBS += $(DUMMYSOUND)
405 NAN_SND_LIBS += $(SOUNDSYSTEM)
410 NAN_SND_LIBS = $(SOUNDSYSTEM)
411 NAN_SND_LIBS += $(DUMMYSOUND)
412 NAN_SND_LIBS += $(OPENALSOUND)
413 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
414 NAN_SND_LIBS += $(SOUNDSYSTEM)
416 ifeq ($(OS), solaris)
417 NAN_SND_LIBS = $(SOUNDSYSTEM)
418 NAN_SND_LIBS += $(DUMMYSOUND)
419 NAN_SND_LIBS += $(OPENALSOUND)
420 NAN_SND_LIBS += $(SDLSOUND)
421 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
422 NAN_SND_LIBS += $(SOUNDSYSTEM)
424 NAN_SND_LIBS = $(SOUNDSYSTEM)
425 NAN_SND_LIBS += $(DUMMYSOUND)
426 NAN_SND_LIBS += $(SOUNDSYSTEM)
433 ifeq ($(FREE_WINDOWS),true)
434 PYLIB = $(NAN_PYTHON)/lib/freepy.a
436 PYLIB = $(NAN_PYTHON)/lib/python23.lib
439 PYPLAYERLIB = $(NAN_PYTHON)/static/*.obj
440 PYPLAYERLIB = $(PYLIB)
442 # Might need to change this to $(NAN_MOZILLA_LIB)/nspr4.lib
443 NSPLUGLIB += $(NAN_NSPR)/lib/nspr4.lib
445 BINTARGETS = blenderdynamic
446 ifeq ($(FREE_WINDOWS),true)
447 ifneq ($(NAN_NO_KETSJI),true)
448 BINTARGETS += blenderplayer
451 BINTARGETS += blenderplayer
452 BINTARGETS += blenderdynplayer
456 PULIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winblender.res
457 PULIB += $(NAN_ZLIB)/lib/libz.a
458 SPLIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winblender.res
459 SPLIB += $(NAN_ZLIB)/lib/libz.a
461 # This code below seems outdated and doesn't even seem to
462 # apply to the Windows platform. I've commented it
463 # out until someone can take a good look at it and confirm
464 # or deny. If it breaks anything blame Chris Burt / Desoto
466 #ifdef NAN_PLAYERSTATIC
467 # PYPLAYERLIB = $(NAN_PYTHON)/static/python20.lib
468 # BINTARGETS = blenderplayer
470 # NAN_SND_LIBS = $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
471 # NAN_SND_LIBS += $(OCGDIR)/intern/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
472 # NAN_SND_LIBS += $(OCGDIR)/intern/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
473 # NAN_SND_LIBS += $(NAN_OPENAL)/lib/openal_static.lib
474 # NAN_SND_LIBS += $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
476 # PYINCLUDEOK := $(shell diff -qbB gameengine/Ketsji/KX_Python.h gameengine/Ketsji/KX_Python_static.h)
477 # ifneq (x$(PYINCLUDEOK),x)
478 # DUMMY := $(shell cat gameengine/Ketsji/KX_Python_static.h > gameengine/Ketsji/KX_Python.h)
481 # PYINCLUDEOK := $(shell diff -qbB gameengine/Ketsji/KX_Python.h gameengine/Ketsji/KX_Python_dynamic.h)
482 # ifneq (x$(PYINCLUDEOK),x)
483 # DUMMY := $(shell cat gameengine/Ketsji/KX_Python_dynamic.h > gameengine/Ketsji/KX_Python.h)
488 ifeq ($(NAN_JUST_BLENDERDYNAMIC),true)
490 BINTARGETS = blenderdynamic.app
492 BINTARGETS = blenderdynamic
497 # prepare for NAN_BUILDINFO compile at the *sigh* link rules below
502 include nan_compile.mk
505 ################## target rules ########################
508 @echo "****> Make $@ by $(ID)@$(HOST) at $(MAKE_START) on $(CONFIG_GUESS)"
510 @for n in $(NANENV); do \
518 include nan_subdirs.mk
520 ################## target rules ########################
525 @$(MAKE) link DEBUG_DIR="debug/" NANENV=$(NANENV)
527 clean:: linkclean debuglinkclean
530 @echo "****> Build $(MAKE_START) - `date '+%H:%M:%S %d-%b-%Y'`"
532 @for n in $(NANENV); do \
539 @$(RM) -r $(DIR)/blenderstatic* \
540 $(DIR)/blenderplayer* \
543 @$(RM) $(DIR)/blenderstatic* \
544 $(DIR)/blenderplayer* \
550 @$(RM) -r $(DIR)/debug/blenderstatic* \
551 $(DIR)/debug/blenderplayer* \
554 @$(RM) $(DIR)/debug/blenderstatic* \
555 $(DIR)/debug/blenderplayer* \
559 # Shortcut for Tinderbox release builds. Mortals don't use this.
561 @$(MAKE) -C ../release/ all || exit 1;
563 ############### Linker rules ###############
565 blenderstatic: $(DIR)/$(DEBUG_DIR)bin/blenderstatic
566 blenderdynamic: $(DIR)/$(DEBUG_DIR)bin/blender$(EXT)
567 blenderplayer: $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT)
568 blenderdynplayer: $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT)
570 blenderplayer.app: blenderplayer
571 @$(MAKE) -C darwin/ APPLICATION=blenderplayer
573 blenderdynamic.app: blenderdynamic
574 @$(MAKE) -C darwin/ APPLICATION=blender
576 # XPCOM connector only for linux so far...
578 xplink: $(DIR)/$(DEBUG_DIR)bin/Blender3DPlugin$(SOEXT)
582 ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
583 plugin: $(DIR)/$(DEBUG_DIR)bin/npBlender3DPlugin$(SOEXT)
584 ptest: $(DIR)/$(DEBUG_DIR)bin/npTestPlugin$(SOEXT)
586 # Windows needs a 8.3 name... Why? Dunno...
588 ifneq ($(FREE_WINDOWS),true)
589 plugin: $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT)
593 $(DIR)/$(DEBUG_DIR)bin/blenderstatic: $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB)
594 @echo "****> Link $@"
596 $(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
598 mkdir -p $(DIR)/$(DEBUG_DIR)bin
599 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderstatic $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB) $(PYLIB) $(LLIBS) $(SADD) $(LOPTS)
601 /bin/rm $(BUILDINFO_O)
604 $(DIR)/$(DEBUG_DIR)bin/blender$(EXT): $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB)
605 @echo "****> Link $@"
607 $(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
609 mkdir -p $(DIR)/$(DEBUG_DIR)bin
610 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blender$(EXT) $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB) $(PYLIB) $(LLIBS) $(DADD) $(LOPTS)
612 /bin/rm $(BUILDINFO_O)
615 $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT): $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB)
616 @echo "****> Link $@"
618 $(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
620 mkdir -p $(DIR)/$(DEBUG_DIR)bin
621 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(PYPLAYERLIB) $(LLIBS) $(DADD) $(LOPTS)
623 /bin/rm $(BUILDINFO_O)
626 $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT): $(OBJS) $(COMLIB) $(SPLIB)
627 @echo "****> Link $@"
629 $(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
631 mkdir -p $(DIR)/$(DEBUG_DIR)bin
632 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(PYLIB) $(LLIBS) $(DADD) $(LOPTS)
634 /bin/rm $(BUILDINFO_O)
638 $(DIR)/$(DEBUG_DIR)bin/Blender3DPlugin$(SOEXT): $(PLUGAPPLIB_XPLINK)
639 @echo "****> Link $@"
641 $(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
643 mkdir -p $(DIR)/$(DEBUG_DIR)bin
644 $(CCC) $(DYNLDFLAGS) -o $@ $(PLUGAPPLIB_XPLINK) $(LOPTS)
646 /bin/rm $(BUILDINFO_O)
650 # Windows build needs a def file? Why? For exposing functions from the
651 # dll to the outside world. However, this is alsi done internally..
652 DEFFILE = ./gameengine/GamePlayer/netscape/src/npB3DPlg.def
654 # Windows needs a specific name format for dll.s so we give it one.
656 $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
657 @echo "****> Link $@"
659 $(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
661 # $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PYLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS)
662 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PYLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS) /def:$(DEFFILE)
664 /bin/rm $(BUILDINFO_O)
668 ifeq ($(OS),$(findstring $(OS), "linux freebsd irix solaris"))
669 $(DIR)/$(DEBUG_DIR)bin/npBlender3DPlugin$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
670 @echo "****> Link $@"
672 $(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
674 mkdir -p $(DIR)/$(DEBUG_DIR)bin
675 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PYLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS)
677 /bin/rm $(BUILDINFO_O)
680 $(DIR)/$(DEBUG_DIR)bin/npTestPlugin$(SOEXT): $(NSPLUGLIB)
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 mkdir -p $(DIR)/$(DEBUG_DIR)bin
686 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGTESTLIB) $(LLIBS) $(DADD) $(LOPTS)
688 /bin/rm $(BUILDINFO_O)