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 ($(INTERNATIONAL), true)
140 COMLIB += $(OCGDIR)/blender/ftfont/$(DEBUG_DIR)libftfont.a
141 ifeq ($(OS), windows)
142 ifeq ($(FREE_WINDOWS), true)
143 COMLIB += $(NAN_GETTEXT)/lib/freegettext.a
144 COMLIB += $(NAN_FTGL)/lib/libftgl.a
145 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
146 COMLIB += $(NAN_ICONV)/lib/freeiconv.a
148 COMLIB += $(NAN_GETTEXT)/lib/gnu_gettext.lib
149 COMLIB += $(NAN_FTGL)/lib/ftgl_static_ST.lib
150 COMLIB += $(NAN_FREETYPE)/lib/freetype214ST.lib
151 COMLIB += $(NAN_ICONV)/lib/iconv.lib
154 COMLIB += $(NAN_FTGL)/lib/libftgl.a
155 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
158 COMLIB += $(NAN_GETTEXT)/lib/libintl.a
162 PULIB = $(NAN_IKSOLVER)/lib/libiksolver.a
163 PULIB += $(NAN_MOTO)/lib/libmoto.a
164 PULIB += $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
165 PULIB += $(OCGDIR)/blender/readstreamglue/$(DEBUG_DIR)libreadstreamglue.a
166 PULIB += $(OCGDIR)/blender/writestreamglue/$(DEBUG_DIR)libwritestreamglue.a
167 # toggle 2 writestreamglue libs for the Uber-Publisher :)
168 #PULIB += $(OCGDIR)/blender/writestreamglueSTUB/$(DEBUG_DIR)libwritestreamglueSTUB.a
169 PULIB += $(OCGDIR)/blender/inflate/$(DEBUG_DIR)libinflate.a
170 PULIB += $(OCGDIR)/blender/deflate/$(DEBUG_DIR)libdeflate.a
171 PULIB += $(OCGDIR)/blender/encrypt/$(DEBUG_DIR)libencrypt.a
172 PULIB += $(OCGDIR)/blender/decrypt/$(DEBUG_DIR)libdecrypt.a
173 PULIB += $(OCGDIR)/blender/sign/$(DEBUG_DIR)libsign.a
174 PULIB += $(OCGDIR)/blender/verify/$(DEBUG_DIR)libverify.a
175 PULIB += $(OCGDIR)/blender/writeblenfile/$(DEBUG_DIR)libwriteblenfile.a
176 PULIB += $(OCGDIR)/blender/writestreamglue/$(DEBUG_DIR)libwritestreamglue.a
177 # toggle 2 writestreamglue libs for the Uber-Publisher :)
178 #PULIB += $(OCGDIR)/blender/writestreamglueSTUB/$(DEBUG_DIR)libwritestreamglueSTUB.a
179 PULIB += $(OCGDIR)/blender/readstreamglue/$(DEBUG_DIR)libreadstreamglue.a # KEY_dependkludge fix.. Remove me
180 PULIB += $(OCGDIR)/blender/src/$(DEBUG_DIR)libsrcpublisher.a
182 SPLIB1 = $(OCGDIR)/gameengine/GamePlayer/ghost/$(DEBUG_DIR)libghost.a
183 SPLIB1 += $(OCGDIR)/gameengine/GamePlayer/common/$(DEBUG_DIR)libcommon.a
184 SPLIB1 += $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
185 SPLIB1 += $(NAN_GHOST)/lib/$(DEBUG_DIR)libghost.a
187 SPLIB = $(OCGDIR)/blender/makesdna/$(DEBUG_DIR)DNA.o
188 SPLIB += $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
189 SPLIB += $(OCGDIR)/blender/readstreamglue/$(DEBUG_DIR)libreadstreamglue.a
190 # this is used for the plugin. It uses some things from libz.a,
191 # but somehow it consistently fails to resolve these symbols... or
192 # can I just not check them? nm claims they aren't...
193 SPLIB += $(OCGDIR)/blender/inflate/$(DEBUG_DIR)libinflate.a
194 SPLIB += $(OCGDIR)/blender/decrypt/$(DEBUG_DIR)libdecrypt.a
195 SPLIB += $(OCGDIR)/blender/writestreamglueSTUB/$(DEBUG_DIR)libwritestreamglueSTUB.a
196 SPLIB += $(OCGDIR)/blender/verify/$(DEBUG_DIR)libverify.a
197 SPLIB += $(OCGDIR)/blender/blenkernel/blenkernel_blc/$(DEBUG_DIR)libblenkernel_blc.a
199 PULIB += $(NAN_BLENKEY)/lib/libblenkey.a
200 SPLIB += $(NAN_BLENKEY)/lib/libblenkey.a
202 PULIB += $(NAN_OPENSSL)/lib/libeay32.lib
203 SPLIB += $(NAN_OPENSSL)/lib/libeay32.lib
205 PULIB += $(NAN_OPENSSL)/lib/libcrypto.a
206 SPLIB += $(NAN_OPENSSL)/lib/libcrypto.a
209 # These three need to be explicitly mentioned on the cl, because
210 # if they are offered as a lib, they are optimized away. (nzc)
211 NSPLUGLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)UnixShell.o
212 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)stubs.o
213 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)winstubs.o
214 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)Blender3DPlugin_native_implementation.o
216 # Here you can configure what sort of test to make for the plugin.
217 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_stub.a
218 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_colorcycle.a
219 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_gears.a
220 PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_threaded_gears.a
222 # XPCOM is done only for Linux for now
223 ifeq ($(OS),$(findstring $(OS), "linux"))
225 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)XPH_xpcom_hooks.o
229 PLUGAPPLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)libplugin_ketsji_hooks.a
231 ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
232 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)PLG_X11_windowing.o
233 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/unix/$(DEBUG_DIR)libunix.a
235 ifeq ($(OS),$(findstring $(OS), "windows"))
236 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)PLG_MSWindows_windowing.o
237 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)npB3DPlg.res
238 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/windows/$(DEBUG_DIR)libwindows.a
240 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/$(DEBUG_DIR)libcommon.a
243 ifeq ($(OS),$(findstring $(OS), "linux"))
245 PLUGAPPLIB_XPLINK = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)_Blender3DPlugin_implementation_.o
249 # A bit silly... but needed to resolve symbols.
250 PLUGREMLIB = $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
252 PLUGREMLIB += $(NAN_OPENSSL)/lib/libeay32.lib
254 PLUGREMLIB += $(NAN_OPENSSL)/lib/libcrypto.a
257 ######################## OS dependencies (alphabetic!) ################
262 BINTARGETS = blenderdynamic
266 BINTARGETS = blenderdynamic.app
267 BINTARGETS += blenderplayer.app
268 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
269 # Next line would enable MxTextTools (for VRML2 import)
270 # but results in a link error
271 # PYLIB += $(NAN_MXTEXTTOOLS)
275 ifeq ($(OS_VERSION),$(findstring $(OS_VERSION), "3.4 4.0"))
276 BINTARGETS = blenderdynamic
277 BINTARGETS += blenderstatic
279 BINTARGETS = blenderdynamic
280 BINTARGETS += blenderplayer
283 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
284 PYLIB += $(NAN_MXTEXTTOOLS)
288 BINTARGETS = blenderdynamic
289 BINTARGETS += blenderplayer
291 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
292 PYLIB += $(NAN_MXTEXTTOOLS)
297 BINTARGETS = blenderdynamic
298 BINTARGETS += blenderplayer
302 # BINTARGETS += ptest
304 BINTARGETS += blenderdynamic
305 BINTARGETS += blenderplayer
306 BINTARGETS += blenderstatic
308 ifeq ($(CPU),powerpc)
309 BINTARGETS = blenderdynamic
310 BINTARGETS += blenderstatic
312 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
313 PYLIB += $(NAN_MXTEXTTOOLS)
317 BINTARGETS = blenderstatic
318 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
322 BINTARGETS = blenderdynamic
323 BINTARGETS += blenderplayer
327 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
328 PYLIB += $(NAN_MXTEXTTOOLS)
329 PYLIB += $(NAN_ZLIB)/lib/libz.a
331 PULIB += $(NAN_ZLIB)/lib/libz.a
332 SPLIB += $(NAN_ZLIB)/lib/libz.a
336 # OpenAL libs are already compiled as shared code! Check FMod if we switch to that. (nzc)
337 ifeq ($(OS),$(findstring $(OS), "freebsd linux windows"))
340 NAN_SND_LIBS = $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
341 NAN_SND_LIBS += $(OCGDIR)/gameengine/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
342 NAN_SND_LIBS += $(OCGDIR)/gameengine/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
343 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
344 NAN_SND_LIBS += $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
346 NAN_SND_LIBS = $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
347 NAN_SND_LIBS += $(OCGDIR)/gameengine/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
348 NAN_SND_LIBS += $(OCGDIR)/gameengine/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
349 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
350 # NAN_SND_LIBS += $(OCGDIR)/gameengine/FmodSoundSystem/$(DEBUG_DIR)libFmodSoundSystem.a
351 # NAN_SND_LIBS += $(NAN_FMOD)/lib/libfmod.a
352 # NAN_SND_LIBS += $(OCGDIR)/gameengine/FmodSoundSystem/$(DEBUG_DIR)libFmodSoundSystem.a
353 NAN_SND_LIBS += $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
357 NAN_SND_LIBS = $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
358 NAN_SND_LIBS += $(OCGDIR)/gameengine/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
359 NAN_SND_LIBS += $(OCGDIR)/gameengine/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
360 NAN_SND_LIBS += $(NAN_OPENAL)/lib/openal_static.lib
361 # NAN_SND_LIBS += $(OCGDIR)/gameengine/FmodSoundSystem/$(DEBUG_DIR)libFmodSoundSystem.a
362 # NAN_SND_LIBS += $(NAN_FMOD)/lib/fmodvc.lib
363 NAN_SND_LIBS += $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
365 NAN_SND_LIBS = $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
366 NAN_SND_LIBS += $(OCGDIR)/gameengine/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
367 NAN_SND_LIBS += $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
372 NAN_SND_LIBS = $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
373 NAN_SND_LIBS += $(OCGDIR)/gameengine/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
374 # NAN_SND_LIBS += $(OCGDIR)/gameengine/FmodSoundSystem/$(DEBUG_DIR)libFmodSoundSystem.a
375 # NAN_SND_LIBS += $(NAN_FMOD)/lib/libfmod.a
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 PYLIB = $(NAN_PYTHON)/lib/python22.lib
386 PYPLAYERLIB = $(NAN_PYTHON)/static/*.obj
387 PYPLAYERLIB = $(PYLIB)
389 # Might need to change this to $(NAN_MOZILLA_LIB)/nspr4.lib
390 NSPLUGLIB += $(NAN_NSPR)/lib/nspr4.lib
392 BINTARGETS = blenderdynamic
393 BINTARGETS += blenderplayer
394 BINTARGETS += blenderdynplayer
397 PULIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winpublisher.res
398 PULIB += $(NAN_ZLIB)/lib/libz.a
399 SPLIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winplayer.res
400 SPLIB += $(NAN_ZLIB)/lib/libz.a
402 ifdef NAN_PLAYERSTATIC
403 PYPLAYERLIB = $(NAN_PYTHON)/static/python20.lib
404 BINTARGETS = blenderplayer
406 NAN_SND_LIBS = $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
407 NAN_SND_LIBS += $(OCGDIR)/gameengine/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
408 NAN_SND_LIBS += $(OCGDIR)/gameengine/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
409 NAN_SND_LIBS += $(NAN_OPENAL)/lib/openal_static.lib
410 NAN_SND_LIBS += $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
412 PYINCLUDEOK := $(shell diff -qbB gameengine/Ketsji/KX_Python.h gameengine/Ketsji/KX_Python_static.h)
413 ifneq (x$(PYINCLUDEOK),x)
414 DUMMY := $(shell cat gameengine/Ketsji/KX_Python_static.h > gameengine/Ketsji/KX_Python.h)
417 PYINCLUDEOK := $(shell diff -qbB gameengine/Ketsji/KX_Python.h gameengine/Ketsji/KX_Python_dynamic.h)
418 ifneq (x$(PYINCLUDEOK),x)
419 DUMMY := $(shell cat gameengine/Ketsji/KX_Python_dynamic.h > gameengine/Ketsji/KX_Python.h)
424 # prepare for NAN_BUILDINFO compile at the *sigh* link rules below
429 include nan_compile.mk
432 ################## target rules ########################
435 @echo "****> Make $@ by $(ID)@$(HOST) at $(MAKE_START) on $(CONFIG_GUESS)"
437 @for n in $(NANENV); do \
445 include nan_subdirs.mk
447 ################## target rules ########################
452 @$(MAKE) link DEBUG_DIR="debug/" NANENV=$(NANENV)
454 clean:: linkclean debuglinkclean
457 @echo "****> Build $(MAKE_START) - `date '+%H:%M:%S %d-%b-%Y'`"
459 @for n in $(NANENV); do \
465 @$(RM) $(DIR)/blenderstatic* \
466 $(DIR)/blenderplayer* \
470 @$(RM) $(DIR)/debug/blenderstatic* \
471 $(DIR)/debug/blenderplayer* \
474 # Shortcut for Tinderbox release builds. Mortals don't use this.
476 @$(MAKE) -C ../release/ all || exit 1;
478 ############### Linker rules ###############
480 blenderstatic: $(DIR)/$(DEBUG_DIR)blenderstatic
481 blenderdynamic: $(DIR)/$(DEBUG_DIR)blenderdynamic$(EXT)
482 blenderplayer: $(DIR)/$(DEBUG_DIR)blenderplayer$(EXT)
483 blenderdynplayer: $(DIR)/$(DEBUG_DIR)blenderdynplayer$(EXT)
485 blenderplayer.app: blenderplayer
486 @$(MAKE) -C darwin/ APPLICATION=blenderplayer
488 blenderdynamic.app: blenderdynamic
489 @$(MAKE) -C darwin/ APPLICATION=blender
491 # XPCOM connector only for linux so far...
493 xplink: $(DIR)/$(DEBUG_DIR)Blender3DPlugin$(SOEXT)
497 ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
498 plugin: $(DIR)/$(DEBUG_DIR)npBlender3DPlugin$(SOEXT)
499 ptest: $(DIR)/$(DEBUG_DIR)npTestPlugin$(SOEXT)
501 # Windows needs a 8.3 name... Why? Dunno...
503 plugin: $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT)
506 $(DIR)/$(DEBUG_DIR)blenderstatic: $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB)
507 @echo "****> Link $@"
509 $(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
511 mkdir -p $(DIR)/$(DEBUG_DIR)bin
512 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderstatic $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB) $(PYLIB) $(LLIBS) $(SADD) $(LOPTS)
514 /bin/rm $(BUILDINFO_O)
517 $(DIR)/$(DEBUG_DIR)blenderdynamic$(EXT): $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB)
518 @echo "****> Link $@"
520 $(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
522 mkdir -p $(DIR)/$(DEBUG_DIR)bin
523 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blender$(EXT) $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB) $(PYLIB) $(LLIBS) $(DADD) $(LOPTS)
525 /bin/rm $(BUILDINFO_O)
528 $(DIR)/$(DEBUG_DIR)blenderplayer$(EXT): $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB)
529 @echo "****> Link $@"
531 $(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
533 mkdir -p $(DIR)/$(DEBUG_DIR)bin
534 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(PYPLAYERLIB) $(LLIBS) $(DADD) $(LOPTS)
536 /bin/rm $(BUILDINFO_O)
539 $(DIR)/$(DEBUG_DIR)blenderdynplayer$(EXT): $(OBJS) $(COMLIB) $(SPLIB)
540 @echo "****> Link $@"
542 $(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
544 mkdir -p $(DIR)/$(DEBUG_DIR)bin
545 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(PYLIB) $(LLIBS) $(DADD) $(LOPTS)
547 /bin/rm $(BUILDINFO_O)
551 $(DIR)/$(DEBUG_DIR)Blender3DPlugin$(SOEXT): $(PLUGAPPLIB_XPLINK)
552 @echo "****> Link $(DIR)/$(DEBUG_DIR)Blender3DPlugin.so"
554 $(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
556 $(CCC) $(DYNLDFLAGS) -o $@ $(PLUGAPPLIB_XPLINK) $(LOPTS)
558 /bin/rm $(BUILDINFO_O)
562 # Windows build needs a def file? Why? For exposing functions from the
563 # dll to the outside world. However, this is alsi done internally..
564 DEFFILE = ./gameengine/GamePlayer/netscape/src/npB3DPlg.def
566 # Windows needs a specific name format for dll.s so we give it one.
568 $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
569 @echo "****> Link $(DIR)/$(DEBUG_DIR)npBl3DPlg.$(SOEXT)"
571 $(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
573 # $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PYLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS)
574 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PYLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS) /def:$(DEFFILE)
576 /bin/rm $(BUILDINFO_O)
580 ifeq ($(OS),$(findstring $(OS), "linux freebsd irix solaris"))
581 $(DIR)/$(DEBUG_DIR)npBlender3DPlugin$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
582 @echo "****> Link $(DIR)/$(DEBUG_DIR)Blender3DPlugin.so"
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)
588 /bin/rm $(BUILDINFO_O)
591 $(DIR)/$(DEBUG_DIR)npTestPlugin$(SOEXT): $(NSPLUGLIB)
592 @echo "****> Link $@"
594 $(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
596 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGTESTLIB) $(LLIBS) $(DADD) $(LOPTS)
598 /bin/rm $(BUILDINFO_O)