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 gameengine
47 ########## buildinfo kludge ###################
48 CPPFLAGS += -I../Physics/common
49 CPPFLAGS += -I../Physics/Dummy
51 BUILDINFO_O = $(DIR)/$(DEBUG_DIR)buildinfo.o
52 BUILDINFO_C = $(SRCHOME)/creator/buildinfo.c
53 BUILD_DATE := $(shell date "+%Y-%m-%d")
54 BUILD_TIME := $(shell date "+%H:%M:%S")
57 ############# set pyplayerlib ##################
59 PYPLAYERLIB ?= $(PYLIB)
61 ############# libraries ##################
62 # COMLIB COMmon LIBraries for all targets
63 # BPLIB Browser Plugin LIBraries
64 # SPLIB1 Standalone Player LIBraries (pre COMLIB)
65 # SPLIB Standalone Player LIBraries (post COMLIB)
66 # PULIB PUblisher LIBraries
67 # GRPLIB Gui and Render LIBraries for Publisher
68 # LLIBS dynamic system libraries
69 # SADD Static OpenGL libraries
70 # DADD Dynamic OpenGL libraries
71 # NSPLUGLIB PLUGin LIBraries for ns-style api
72 # PLUGAPPLIB libs that form the application to be plugged in
73 # Note: the order is important here
75 GRPLIB = $(OCGDIR)/creator/$(DEBUG_DIR)libcreator.a
76 GRPLIB += $(OCGDIR)/blender/src/$(DEBUG_DIR)libsrcpublisher.a
77 GRPLIB += $(OCGDIR)/blender/radiosity/$(DEBUG_DIR)libradiosity.a
78 GRPLIB += $(NAN_DECIMATION)/lib/libdecimation.a
79 GRPLIB += $(NAN_BSP)/lib/$(DEBUG_DIR)libbsp.a
80 GRPLIB += $(NAN_GHOST)/lib/$(DEBUG_DIR)libghost.a
81 GRPLIB += $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
82 GRPLIB += $(OCGDIR)/blender/img/$(DEBUG_DIR)libimg.a
83 GRPLIB += $(OCGDIR)/blender/renderconverter/$(DEBUG_DIR)librenderconverter.a
84 GRPLIB += $(OCGDIR)/blender/render/$(DEBUG_DIR)librender.a
85 GRPLIB += $(OCGDIR)/blender/bpython/$(DEBUG_DIR)libbpython.a
86 GRPLIB += $(OCGDIR)/blender/bpython/libfrozen.a
88 # nlin: the reason that some libraries appear more than once below is
89 # to handle circular dependencies in linking among libraries... some
90 # linkers (e.g. under Linux) need libs to be specified multiple times
91 # to properly resolve circular dependencies. ugly, but it works...
92 # the repeat entries could probably be trimmed down.
93 COMLIB = $(OCGDIR)/blender/blenkernel/$(DEBUG_DIR)libblenkernel.a
94 COMLIB += $(OCGDIR)/blender/blenloader/$(DEBUG_DIR)libblenloader.a
95 COMLIB += $(OCGDIR)/blender/blenpluginapi/$(DEBUG_DIR)libblenpluginapi.a
96 COMLIB += $(OCGDIR)/blender/imbuf/$(DEBUG_DIR)libimbuf.a
97 COMLIB += $(OCGDIR)/blender/blenlib/$(DEBUG_DIR)libblenlib.a
98 COMLIB += $(OCGDIR)/blender/avi/$(DEBUG_DIR)libavi.a
99 COMLIB += $(NAN_JPEG)/lib/libjpeg.a
100 COMLIB += $(OCGDIR)/gameengine/bloutines/$(DEBUG_DIR)libbloutines.a
101 COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
102 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
103 COMLIB += $(OCGDIR)/gameengine/blphys/blode/$(DEBUG_DIR)libblode.a
104 COMLIB += $(NAN_ODE)/lib/libode.a
105 # COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a
106 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
107 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
108 # COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a
109 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
110 COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
111 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
112 COMLIB += $(OCGDIR)/gameengine/blphys/blode/$(DEBUG_DIR)libblode.a
113 # COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a
114 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
115 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
116 # COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a
117 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
118 COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
119 COMLIB += $(OCGDIR)/gameengine/logic/$(DEBUG_DIR)liblogic.a
120 COMLIB += $(OCGDIR)/gameengine/rasterizer/$(DEBUG_DIR)librasterizer.a
121 COMLIB += $(OCGDIR)/gameengine/OpenGLrasterizer/$(DEBUG_DIR)libOpenGLrasterizer.a
122 COMLIB += $(OCGDIR)/gameengine/expression/$(DEBUG_DIR)libexpression.a
123 COMLIB += $(OCGDIR)/gameengine/scenegraph/$(DEBUG_DIR)libscenegraph.a
124 # COMLIB += $(OCGDIR)/sumo/$(DEBUG_DIR)libfuzzics.a
125 # COMLIB += $(OCGDIR)/sumo/$(DEBUG_DIR)libsolid.a
126 COMLIB += $(NAN_MOTO)/lib/libmoto.a
127 COMLIB += $(NAN_SND_LIBS)
128 COMLIB += $(OCGDIR)/kernel/gen_system/$(DEBUG_DIR)libgen_system.a
129 COMLIB += $(OCGDIR)/kernel/gen_messaging/$(DEBUG_DIR)libgen_messaging.a
130 COMLIB += $(OCGDIR)/gameengine/ketsji/KXNetwork/$(DEBUG_DIR)libKXNetwork.a
131 COMLIB += $(OCGDIR)/gameengine/Network/$(DEBUG_DIR)libNetwork.a
132 COMLIB += $(OCGDIR)/gameengine/Network/LoopBackNetwork/$(DEBUG_DIR)libLoopBackNetwork.a
133 COMLIB += $(NAN_GUARDEDALLOC)/lib/libguardedalloc.a
134 COMLIB += $(NAN_BMFONT)/lib/$(DEBUG_DIR)libbmfont.a
135 COMLIB += $(NAN_PNG)/lib/libpng.a
136 ifeq ($(WITH_QUICKTIME), true)
137 COMLIB += $(OCGDIR)/blender/blenderqt/$(DEBUG_DIR)libblenderqt.a
139 ifeq ($(WITH_FREETYPE2), true)
140 ifeq ($(OS), windows)
141 COMLIB += $(NAN_FREETYPE)/lib/freetype2ST.lib
144 COMLIB += $(NAN_FREETYPE)/lib32/libfreetype.a
146 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
150 ifeq ($(INTERNATIONAL), true)
151 COMLIB += $(OCGDIR)/blender/ftfont/$(DEBUG_DIR)libftfont.a
152 ifeq ($(OS), windows)
153 ifeq ($(FREE_WINDOWS), true)
154 COMLIB += $(NAN_GETTEXT)/lib/freegettext.a
155 COMLIB += $(NAN_FTGL)/lib/libftgl.a
156 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
157 COMLIB += $(NAN_ICONV)/lib/freeiconv.a
159 COMLIB += $(NAN_GETTEXT)/lib/gnu_gettext.lib
160 COMLIB += $(NAN_FTGL)/lib/ftgl_static_ST.lib
161 COMLIB += $(NAN_FREETYPE)/lib/freetype2ST.lib
162 COMLIB += $(NAN_ICONV)/lib/iconv.lib
165 COMLIB += $(NAN_FTGL)/lib/libftgl.a
167 COMLIB += $(NAN_FREETYPE)/lib32/libfreetype.a
168 COMLIB += $(NAN_FREETYPE)/lib32/libintl.a
170 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
174 COMLIB += $(NAN_GETTEXT)/lib/libintl.a
178 PULIB = $(NAN_IKSOLVER)/lib/libiksolver.a
179 PULIB += $(NAN_MOTO)/lib/libmoto.a
180 PULIB += $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
181 PULIB += $(OCGDIR)/blender/readstreamglue/$(DEBUG_DIR)libreadstreamglue.a
182 PULIB += $(OCGDIR)/blender/writestreamglue/$(DEBUG_DIR)libwritestreamglue.a
183 # toggle 2 writestreamglue libs for the Uber-Publisher :)
184 #PULIB += $(OCGDIR)/blender/writestreamglueSTUB/$(DEBUG_DIR)libwritestreamglueSTUB.a
185 PULIB += $(OCGDIR)/blender/inflate/$(DEBUG_DIR)libinflate.a
186 PULIB += $(OCGDIR)/blender/deflate/$(DEBUG_DIR)libdeflate.a
187 PULIB += $(OCGDIR)/blender/encrypt/$(DEBUG_DIR)libencrypt.a
188 PULIB += $(OCGDIR)/blender/decrypt/$(DEBUG_DIR)libdecrypt.a
189 PULIB += $(OCGDIR)/blender/writeblenfile/$(DEBUG_DIR)libwriteblenfile.a
190 PULIB += $(OCGDIR)/blender/writestreamglue/$(DEBUG_DIR)libwritestreamglue.a
191 # toggle 2 writestreamglue libs for the Uber-Publisher :)
192 #PULIB += $(OCGDIR)/blender/writestreamglueSTUB/$(DEBUG_DIR)libwritestreamglueSTUB.a
193 PULIB += $(OCGDIR)/blender/readstreamglue/$(DEBUG_DIR)libreadstreamglue.a # KEY_dependkludge fix.. Remove me
194 PULIB += $(OCGDIR)/blender/src/$(DEBUG_DIR)libsrcpublisher.a
196 SPLIB1 = $(OCGDIR)/gameengine/GamePlayer/ghost/$(DEBUG_DIR)libghost.a
197 SPLIB1 += $(OCGDIR)/gameengine/GamePlayer/common/$(DEBUG_DIR)libcommon.a
198 SPLIB1 += $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
199 SPLIB1 += $(NAN_GHOST)/lib/$(DEBUG_DIR)libghost.a
201 SPLIB = $(OCGDIR)/blender/makesdna/$(DEBUG_DIR)DNA.o
202 SPLIB += $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
203 SPLIB += $(OCGDIR)/blender/readstreamglue/$(DEBUG_DIR)libreadstreamglue.a
204 # this is used for the plugin. It uses some things from libz.a,
205 # but somehow it consistently fails to resolve these symbols... or
206 # can I just not check them? nm claims they aren't...
207 SPLIB += $(OCGDIR)/blender/inflate/$(DEBUG_DIR)libinflate.a
208 SPLIB += $(OCGDIR)/blender/decrypt/$(DEBUG_DIR)libdecrypt.a
209 SPLIB += $(OCGDIR)/blender/writestreamglueSTUB/$(DEBUG_DIR)libwritestreamglueSTUB.a
210 SPLIB += $(OCGDIR)/blender/blenkernel/blenkernel_blc/$(DEBUG_DIR)libblenkernel_blc.a
212 PULIB += $(NAN_BLENKEY)/lib/libblenkey.a
213 SPLIB += $(NAN_BLENKEY)/lib/libblenkey.a
215 PULIB += $(NAN_OPENSSL)/lib/libeay32.lib
216 SPLIB += $(NAN_OPENSSL)/lib/libeay32.lib
218 PULIB += $(NAN_OPENSSL)/lib/libcrypto.a
219 SPLIB += $(NAN_OPENSSL)/lib/libcrypto.a
222 # These three need to be explicitly mentioned on the cl, because
223 # if they are offered as a lib, they are optimized away. (nzc)
224 NSPLUGLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)UnixShell.o
225 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)stubs.o
226 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)winstubs.o
227 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)Blender3DPlugin_native_implementation.o
229 # Here you can configure what sort of test to make for the plugin.
230 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_stub.a
231 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_colorcycle.a
232 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_gears.a
233 PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_threaded_gears.a
235 # XPCOM is done only for Linux for now
236 ifeq ($(OS),$(findstring $(OS), "linux"))
238 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)XPH_xpcom_hooks.o
242 PLUGAPPLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)libplugin_ketsji_hooks.a
244 ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
245 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)PLG_X11_windowing.o
246 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/unix/$(DEBUG_DIR)libunix.a
248 ifeq ($(OS),$(findstring $(OS), "windows"))
249 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)PLG_MSWindows_windowing.o
250 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)npB3DPlg.res
251 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/windows/$(DEBUG_DIR)libwindows.a
253 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/$(DEBUG_DIR)libcommon.a
256 ifeq ($(OS),$(findstring $(OS), "linux"))
258 PLUGAPPLIB_XPLINK = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)_Blender3DPlugin_implementation_.o
262 # A bit silly... but needed to resolve symbols.
263 PLUGREMLIB = $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
265 PLUGREMLIB += $(NAN_OPENSSL)/lib/libeay32.lib
267 PLUGREMLIB += $(NAN_OPENSSL)/lib/libcrypto.a
270 ######################## OS dependencies (alphabetic!) ################
275 BINTARGETS = blenderdynamic
279 BINTARGETS = blenderdynamic.app
280 BINTARGETS += blenderplayer.app
281 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
282 # Next line would enable MxTextTools (for VRML2 import)
283 # but results in a link error
284 # PYLIB += $(NAN_MXTEXTTOOLS)
288 ifeq ($(OS_VERSION),$(findstring $(OS_VERSION), "3.4 4.0"))
289 BINTARGETS = blenderdynamic
290 BINTARGETS += blenderstatic
292 BINTARGETS = blenderdynamic
293 BINTARGETS += blenderplayer
296 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
297 PYLIB += $(NAN_MXTEXTTOOLS)
301 BINTARGETS = blenderdynamic
302 BINTARGETS += blenderplayer
304 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
305 PYLIB += $(NAN_MXTEXTTOOLS)
310 BINTARGETS = blenderdynamic
311 BINTARGETS += blenderplayer
315 # BINTARGETS += ptest
317 BINTARGETS += blenderdynamic
318 BINTARGETS += blenderplayer
319 BINTARGETS += blenderstatic
321 ifeq ($(CPU),powerpc)
322 BINTARGETS = blenderdynamic
323 BINTARGETS += blenderstatic
325 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
326 PYLIB += $(NAN_MXTEXTTOOLS)
330 BINTARGETS = blenderstatic
331 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
335 BINTARGETS = blenderdynamic
336 BINTARGETS += blenderplayer
340 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
341 PYLIB += $(NAN_MXTEXTTOOLS)
342 PYLIB += $(NAN_ZLIB)/lib/libz.a
344 PULIB += $(NAN_ZLIB)/lib/libz.a
345 SPLIB += $(NAN_ZLIB)/lib/libz.a
349 # OpenAL libs are already compiled as shared code! Check FMod if we switch to that. (nzc)
350 ifeq ($(OS),$(findstring $(OS), "freebsd linux windows"))
353 NAN_SND_LIBS = $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
354 NAN_SND_LIBS += $(OCGDIR)/gameengine/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
355 NAN_SND_LIBS += $(OCGDIR)/gameengine/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
356 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
357 NAN_SND_LIBS += $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
359 NAN_SND_LIBS = $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
360 NAN_SND_LIBS += $(OCGDIR)/gameengine/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
361 NAN_SND_LIBS += $(OCGDIR)/gameengine/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
362 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
363 # NAN_SND_LIBS += $(OCGDIR)/gameengine/FmodSoundSystem/$(DEBUG_DIR)libFmodSoundSystem.a
364 # NAN_SND_LIBS += $(NAN_FMOD)/lib/libfmod.a
365 # NAN_SND_LIBS += $(OCGDIR)/gameengine/FmodSoundSystem/$(DEBUG_DIR)libFmodSoundSystem.a
366 NAN_SND_LIBS += $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
370 NAN_SND_LIBS = $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
371 NAN_SND_LIBS += $(OCGDIR)/gameengine/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
372 NAN_SND_LIBS += $(OCGDIR)/gameengine/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
373 NAN_SND_LIBS += $(NAN_OPENAL)/lib/openal_static.lib
374 # NAN_SND_LIBS += $(OCGDIR)/gameengine/FmodSoundSystem/$(DEBUG_DIR)libFmodSoundSystem.a
375 # NAN_SND_LIBS += $(NAN_FMOD)/lib/fmodvc.lib
376 NAN_SND_LIBS += $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
378 NAN_SND_LIBS = $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
379 NAN_SND_LIBS += $(OCGDIR)/gameengine/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
380 NAN_SND_LIBS += $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
385 NAN_SND_LIBS = $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
386 NAN_SND_LIBS += $(OCGDIR)/gameengine/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
387 # NAN_SND_LIBS += $(OCGDIR)/gameengine/FmodSoundSystem/$(DEBUG_DIR)libFmodSoundSystem.a
388 # NAN_SND_LIBS += $(NAN_FMOD)/lib/libfmod.a
389 NAN_SND_LIBS += $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
391 NAN_SND_LIBS = $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
392 NAN_SND_LIBS += $(OCGDIR)/gameengine/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
393 NAN_SND_LIBS += $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
398 PYLIB = $(NAN_PYTHON)/lib/python22.lib
399 PYPLAYERLIB = $(NAN_PYTHON)/static/*.obj
400 PYPLAYERLIB = $(PYLIB)
402 # Might need to change this to $(NAN_MOZILLA_LIB)/nspr4.lib
403 NSPLUGLIB += $(NAN_NSPR)/lib/nspr4.lib
405 BINTARGETS = blenderdynamic
406 BINTARGETS += blenderplayer
407 BINTARGETS += blenderdynplayer
410 PULIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winblender.res
411 PULIB += $(NAN_ZLIB)/lib/libz.a
412 SPLIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winblender.res
413 SPLIB += $(NAN_ZLIB)/lib/libz.a
415 ifdef NAN_PLAYERSTATIC
416 PYPLAYERLIB = $(NAN_PYTHON)/static/python20.lib
417 BINTARGETS = blenderplayer
419 NAN_SND_LIBS = $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
420 NAN_SND_LIBS += $(OCGDIR)/gameengine/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
421 NAN_SND_LIBS += $(OCGDIR)/gameengine/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
422 NAN_SND_LIBS += $(NAN_OPENAL)/lib/openal_static.lib
423 NAN_SND_LIBS += $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
425 PYINCLUDEOK := $(shell diff -qbB gameengine/Ketsji/KX_Python.h gameengine/Ketsji/KX_Python_static.h)
426 ifneq (x$(PYINCLUDEOK),x)
427 DUMMY := $(shell cat gameengine/Ketsji/KX_Python_static.h > gameengine/Ketsji/KX_Python.h)
430 PYINCLUDEOK := $(shell diff -qbB gameengine/Ketsji/KX_Python.h gameengine/Ketsji/KX_Python_dynamic.h)
431 ifneq (x$(PYINCLUDEOK),x)
432 DUMMY := $(shell cat gameengine/Ketsji/KX_Python_dynamic.h > gameengine/Ketsji/KX_Python.h)
437 # prepare for NAN_BUILDINFO compile at the *sigh* link rules below
442 include nan_compile.mk
445 ################## target rules ########################
448 @echo "****> Make $@ by $(ID)@$(HOST) at $(MAKE_START) on $(CONFIG_GUESS)"
450 @for n in $(NANENV); do \
458 include nan_subdirs.mk
460 ################## target rules ########################
465 @$(MAKE) link DEBUG_DIR="debug/" NANENV=$(NANENV)
467 clean:: linkclean debuglinkclean
470 @echo "****> Build $(MAKE_START) - `date '+%H:%M:%S %d-%b-%Y'`"
472 @for n in $(NANENV); do \
478 @$(RM) $(DIR)/blenderstatic* \
479 $(DIR)/blenderplayer* \
483 @$(RM) $(DIR)/debug/blenderstatic* \
484 $(DIR)/debug/blenderplayer* \
487 # Shortcut for Tinderbox release builds. Mortals don't use this.
489 @$(MAKE) -C ../release/ all || exit 1;
491 ############### Linker rules ###############
493 blenderstatic: $(DIR)/$(DEBUG_DIR)blenderstatic
494 blenderdynamic: $(DIR)/$(DEBUG_DIR)blenderdynamic$(EXT)
495 blenderplayer: $(DIR)/$(DEBUG_DIR)blenderplayer$(EXT)
496 blenderdynplayer: $(DIR)/$(DEBUG_DIR)blenderdynplayer$(EXT)
498 blenderplayer.app: blenderplayer
499 @$(MAKE) -C darwin/ APPLICATION=blenderplayer
501 blenderdynamic.app: blenderdynamic
502 @$(MAKE) -C darwin/ APPLICATION=blender
504 # XPCOM connector only for linux so far...
506 xplink: $(DIR)/$(DEBUG_DIR)Blender3DPlugin$(SOEXT)
510 ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
511 plugin: $(DIR)/$(DEBUG_DIR)npBlender3DPlugin$(SOEXT)
512 ptest: $(DIR)/$(DEBUG_DIR)npTestPlugin$(SOEXT)
514 # Windows needs a 8.3 name... Why? Dunno...
516 plugin: $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT)
519 $(DIR)/$(DEBUG_DIR)blenderstatic: $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB)
520 @echo "****> Link $@"
522 $(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
524 mkdir -p $(DIR)/$(DEBUG_DIR)bin
525 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderstatic $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB) $(PYLIB) $(LLIBS) $(SADD) $(LOPTS)
527 /bin/rm $(BUILDINFO_O)
530 $(DIR)/$(DEBUG_DIR)blenderdynamic$(EXT): $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB)
531 @echo "****> Link $@"
533 $(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
535 mkdir -p $(DIR)/$(DEBUG_DIR)bin
536 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blender$(EXT) $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB) $(PYLIB) $(LLIBS) $(DADD) $(LOPTS)
538 /bin/rm $(BUILDINFO_O)
541 $(DIR)/$(DEBUG_DIR)blenderplayer$(EXT): $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB)
542 @echo "****> Link $@"
544 $(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
546 mkdir -p $(DIR)/$(DEBUG_DIR)bin
547 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(PYPLAYERLIB) $(LLIBS) $(DADD) $(LOPTS)
549 /bin/rm $(BUILDINFO_O)
552 $(DIR)/$(DEBUG_DIR)blenderdynplayer$(EXT): $(OBJS) $(COMLIB) $(SPLIB)
553 @echo "****> Link $@"
555 $(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
557 mkdir -p $(DIR)/$(DEBUG_DIR)bin
558 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(PYLIB) $(LLIBS) $(DADD) $(LOPTS)
560 /bin/rm $(BUILDINFO_O)
564 $(DIR)/$(DEBUG_DIR)Blender3DPlugin$(SOEXT): $(PLUGAPPLIB_XPLINK)
565 @echo "****> Link $(DIR)/$(DEBUG_DIR)Blender3DPlugin.so"
567 $(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
569 $(CCC) $(DYNLDFLAGS) -o $@ $(PLUGAPPLIB_XPLINK) $(LOPTS)
571 /bin/rm $(BUILDINFO_O)
575 # Windows build needs a def file? Why? For exposing functions from the
576 # dll to the outside world. However, this is alsi done internally..
577 DEFFILE = ./gameengine/GamePlayer/netscape/src/npB3DPlg.def
579 # Windows needs a specific name format for dll.s so we give it one.
581 $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
582 @echo "****> Link $(DIR)/$(DEBUG_DIR)npBl3DPlg.$(SOEXT)"
584 $(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
586 # $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PYLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS)
587 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PYLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS) /def:$(DEFFILE)
589 /bin/rm $(BUILDINFO_O)
593 ifeq ($(OS),$(findstring $(OS), "linux freebsd irix solaris"))
594 $(DIR)/$(DEBUG_DIR)npBlender3DPlugin$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
595 @echo "****> Link $(DIR)/$(DEBUG_DIR)Blender3DPlugin.so"
597 $(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
599 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PYLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS)
601 /bin/rm $(BUILDINFO_O)
604 $(DIR)/$(DEBUG_DIR)npTestPlugin$(SOEXT): $(NSPLUGLIB)
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 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGTESTLIB) $(LLIBS) $(DADD) $(LOPTS)
611 /bin/rm $(BUILDINFO_O)