2 # $Id: Makefile 10483 2007-04-08 17:16:52Z hos $
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")
59 BUILD_REV
:= $(shell svnversion
)
62 ############# set pyplayerlib ##################
64 PYPLAYERLIB ?
= $(PYLIB
)
66 ############# libraries ##################
67 # COMLIB COMmon LIBraries for all targets
68 # BPLIB Browser Plugin LIBraries
69 # SPLIB1 Standalone Player LIBraries (pre COMLIB)
70 # SPLIB Standalone Player LIBraries (post COMLIB)
71 # PULIB PUblisher LIBraries
72 # GRPLIB Gui and Render LIBraries for Publisher
73 # LLIBS dynamic system libraries
74 # SADD Static OpenGL libraries
75 # DADD Dynamic OpenGL libraries
76 # NSPLUGLIB PLUGin LIBraries for ns-style api
77 # PLUGAPPLIB libs that form the application to be plugged in
78 # Note: the order is important here
80 GRPLIB
= $(OCGDIR
)/creator
/$(DEBUG_DIR
)libcreator.a
81 GRPLIB
+= $(OCGDIR
)/blender
/src
/$(DEBUG_DIR
)libsrcpublisher.a
82 GRPLIB
+= $(NAN_BSP
)/lib
/$(DEBUG_DIR
)libbsp.a
83 GRPLIB
+= $(NAN_BOOLOP
)/lib
/$(DEBUG_DIR
)libboolop.a
84 GRPLIB
+= $(NAN_SOUNDSYSTEM
)/lib
/$(DEBUG_DIR
)libSoundSystem.a
85 GRPLIB
+= $(NAN_GHOST
)/lib
/$(DEBUG_DIR
)libghost.a
86 GRPLIB
+= $(NAN_STRING
)/lib
/$(DEBUG_DIR
)libstring.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
/nodes_shd
/$(DEBUG_DIR
)libnodes_shd.a
103 COMLIB
+= $(OCGDIR
)/blender
/nodes_cmp
/$(DEBUG_DIR
)libnodes_cmp.a
104 COMLIB
+= $(OCGDIR
)/blender
/nodes
/$(DEBUG_DIR
)libnodes.a
105 COMLIB
+= $(OCGDIR
)/blender
/imbuf
/$(DEBUG_DIR
)libimbuf.a
106 COMLIB
+= $(OCGDIR
)/blender
/blenlib
/$(DEBUG_DIR
)libblenlib.a
107 COMLIB
+= $(OCGDIR
)/blender
/avi
/$(DEBUG_DIR
)libavi.a
108 COMLIB
+= $(NAN_JPEG
)/lib
/libjpeg.a
110 ifneq ($(NAN_NO_KETSJI
),true
)
111 COMLIB
+= $(OCGDIR
)/gameengine
/bloutines
/$(DEBUG_DIR
)libbloutines.a
112 COMLIB
+= $(OCGDIR
)/gameengine
/blconverter
/$(DEBUG_DIR
)libblconverter.a
113 COMLIB
+= $(OCGDIR
)/gameengine
/blphys
/common
/$(DEBUG_DIR
)libcommon.a
114 COMLIB
+= $(OCGDIR
)/gameengine
/ketsji
/$(DEBUG_DIR
)libketsji.a
115 COMLIB
+= $(OCGDIR
)/gameengine
/blconverter
/$(DEBUG_DIR
)libblconverter.a
116 COMLIB
+= $(OCGDIR
)/gameengine
/blconverter
/$(DEBUG_DIR
)libblconverter.a
117 COMLIB
+= $(NAN_SOLID
)/lib
/libsolid.a
118 COMLIB
+= $(NAN_SOLID
)/lib
/libsolid_broad.a
119 COMLIB
+= $(NAN_SOLID
)/lib
/libsolid_complex.a
120 COMLIB
+= $(NAN_SOLID
)/lib
/libsolid_convex.a
121 COMLIB
+= $(OCGDIR
)/gameengine
/blphys
/sumo
/$(DEBUG_DIR
)libsumo.a
122 COMLIB
+= $(OCGDIR
)/gameengine
/blphys
/fuzzics
/$(DEBUG_DIR
)libfuzzics.a
123 COMLIB
+= $(NAN_QHULL
)/lib
/libqhull.a
124 COMLIB
+= $(OCGDIR
)/gameengine
/blphys
/dummy
/$(DEBUG_DIR
)libdummy.a
125 COMLIB
+= $(OCGDIR
)/gameengine
/blphys
/common
/$(DEBUG_DIR
)libcommon.a
126 # COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a
127 COMLIB
+= $(OCGDIR
)/gameengine
/blphys
/dummy
/$(DEBUG_DIR
)libdummy.a
128 COMLIB
+= $(OCGDIR
)/gameengine
/ketsji
/$(DEBUG_DIR
)libketsji.a
129 COMLIB
+= $(OCGDIR
)/gameengine
/blphys
/common
/$(DEBUG_DIR
)libcommon.a
130 # COMLIB += $(OCGDIR)/gameengine/blphys/blode/$(DEBUG_DIR)libblode.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
/blphys
/blbullet
/$(DEBUG_DIR
)libblbullet.a
134 COMLIB
+= $(OCGDIR
)/gameengine
/blphys
/common
/$(DEBUG_DIR
)libcommon.a
135 # COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a
136 COMLIB
+= $(OCGDIR
)/gameengine
/blphys
/dummy
/$(DEBUG_DIR
)libdummy.a
137 COMLIB
+= $(OCGDIR
)/gameengine
/ketsji
/$(DEBUG_DIR
)libketsji.a
138 COMLIB
+= $(OCGDIR
)/gameengine
/logic
/$(DEBUG_DIR
)liblogic.a
139 COMLIB
+= $(OCGDIR
)/gameengine
/logic
/Joystick
/$(DEBUG_DIR
)libJoystick.a
140 COMLIB
+= $(OCGDIR
)/gameengine
/rasterizer
/$(DEBUG_DIR
)librasterizer.a
141 COMLIB
+= $(OCGDIR
)/gameengine
/OpenGLrasterizer
/$(DEBUG_DIR
)libOpenGLrasterizer.a
142 COMLIB
+= $(OCGDIR
)/gameengine
/expression
/$(DEBUG_DIR
)libexpression.a
143 COMLIB
+= $(OCGDIR
)/gameengine
/scenegraph
/$(DEBUG_DIR
)libscenegraph.a
144 # COMLIB += $(OCGDIR)/sumo/$(DEBUG_DIR)libfuzzics.a
145 # COMLIB += $(OCGDIR)/sumo/$(DEBUG_DIR)libsolid.a
146 COMLIB
+= $(NAN_MOTO
)/lib
/libmoto.a
147 COMLIB
+= $(NAN_SND_LIBS
)
148 COMLIB
+= $(OCGDIR
)/kernel
/gen_system
/$(DEBUG_DIR
)libgen_system.a
149 COMLIB
+= $(OCGDIR
)/kernel
/gen_messaging
/$(DEBUG_DIR
)libgen_messaging.a
150 COMLIB
+= $(OCGDIR
)/gameengine
/ketsji
/KXNetwork
/$(DEBUG_DIR
)libKXNetwork.a
151 COMLIB
+= $(OCGDIR
)/gameengine
/Network
/$(DEBUG_DIR
)libNetwork.a
152 COMLIB
+= $(OCGDIR
)/gameengine
/Network
/LoopBackNetwork
/$(DEBUG_DIR
)libLoopBackNetwork.a
153 COMLIB
+= $(NAN_BULLET2
)/lib
/libbullet2.a
156 COMLIB
+= $(NAN_GUARDEDALLOC
)/lib
/libguardedalloc.a
157 COMLIB
+= $(NAN_MEMUTIL
)/lib
/libmemutil.a
158 COMLIB
+= $(NAN_BMFONT
)/lib
/$(DEBUG_DIR
)libbmfont.a
159 COMLIB
+= $(NAN_PNG
)/lib
/libpng.a
160 COMLIB
+= $(OCGDIR
)/blender
/yafray
/$(DEBUG_DIR
)libyafrayexport.a
161 COMLIB
+= $(OCGDIR
)/blender
/blenlib
/$(DEBUG_DIR
)libblenlib.a
163 ifeq ($(WITH_QUICKTIME
), true
)
164 COMLIB
+= $(OCGDIR
)/blender
/blenderqt
/$(DEBUG_DIR
)libblenderqt.a
167 ifeq ($(WITH_OPENEXR
), true
)
168 COMLIB
+= $(OCGDIR
)/blender
/imbuf
/openexr
/$(DEBUG_DIR
)libopenexr.a
171 COMLIB
+= $(OCGDIR
)/blender
/imbuf
/cineon
/$(DEBUG_DIR
)libcineon.a
173 ifeq ($(WITH_FREETYPE2
), true
)
174 ifeq ($(OS
), windows
)
175 ifeq ($(FREE_WINDOWS
), true
)
176 COMLIB
+= $(NAN_FREETYPE
)/lib
/libfreetype.a
178 COMLIB
+= $(NAN_FREETYPE
)/lib
/freetype2ST.lib
182 COMLIB
+= $(NAN_FREETYPE
)/lib32
/libfreetype.a
184 COMLIB
+= $(NAN_FREETYPE
)/lib
/libfreetype.a
189 ifeq ($(INTERNATIONAL
), true
)
190 COMLIB
+= $(OCGDIR
)/blender
/ftfont
/$(DEBUG_DIR
)libftfont.a
191 ifeq ($(OS
), windows
)
192 ifeq ($(FREE_WINDOWS
), true
)
193 COMLIB
+= $(NAN_GETTEXT
)/lib
/freegettext.a
194 COMLIB
+= $(NAN_FTGL
)/lib
/libftgl.a
195 #COMLIB += $(NAN_ICONV)/lib/freeiconv.a
197 COMLIB
+= $(NAN_GETTEXT
)/lib
/gnu_gettext.lib
198 COMLIB
+= $(NAN_FTGL
)/lib
/ftgl_static_ST.lib
199 COMLIB
+= $(NAN_FREETYPE
)/lib
/freetype2ST.lib
200 COMLIB
+= $(NAN_ICONV
)/lib
/iconv.lib
203 COMLIB
+= $(NAN_FTGL
)/lib
/libftgl.a
205 COMLIB
+= $(NAN_FREETYPE
)/lib32
/libfreetype.a
206 COMLIB
+= $(NAN_FREETYPE
)/lib32
/libintl.a
208 COMLIB
+= $(NAN_FREETYPE
)/lib
/libfreetype.a
212 COMLIB
+= $(NAN_GETTEXT
)/lib
/libintl.a
214 COMLIB
+= $(NAN_GETTEXT
)/lib
/libiconv.a
217 ifeq ($(OS
), solaris
)
218 COMLIB
+= $(NAN_GETTEXT
)/lib
/libintl.a
222 ifeq ($(WITH_VERSE
), true
)
223 ifeq ($(OS
), windows
)
224 ifeq ($(FREE_WINDOWS
), true
)
225 COMLIB
+= $(NAN_VERSE
)/lib
/libverse.a
227 COMLIB
+= $(NAN_VERSE
)/lib
/verse.lib
230 COMLIB
+= $(NAN_VERSE
)/lib
/libverse.a
235 COMLIB
+= $(NAN_SDL
)/lib
/libSDL.a
238 ifeq ($(OS
), windows
)
239 ifeq ($(FREE_WINDOWS
), true
)
240 COMLIB
+= $(NAN_SDL
)/lib
/libSDL.a
241 COMLIB
+= $(NAN_PTHREADS
)/lib
/libpthreadGC2.a
243 COMLIB
+= $(NAN_SDL
)/lib
/SDL.lib
247 ifeq ($(WITH_OPENEXR
), true
)
248 COMLIB
+= $(NAN_OPENEXR_LIBS
)
251 PULIB
= $(NAN_IKSOLVER
)/lib
/libiksolver.a
252 PULIB
+= $(NAN_MOTO
)/lib
/libmoto.a
253 PULIB
+= $(NAN_ELBEEM
)/lib
/$(DEBUG_DIR
)libelbeem.a
254 PULIB
+= $(OCGDIR
)/blender
/readblenfile
/$(DEBUG_DIR
)libreadblenfile.a
255 PULIB
+= $(OCGDIR
)/blender
/src
/$(DEBUG_DIR
)libsrcpublisher.a
257 ifeq ($(NAN_NO_KETSJI
),true
)
258 PULIB
+= $(NAN_MOTO
)/lib
/libmoto.a
259 PULIB
+= $(OCGDIR
)/kernel
/gen_system
/$(DEBUG_DIR
)libgen_system.a
260 PULIB
+= $(OCGDIR
)/kernel
/gen_messaging
/$(DEBUG_DIR
)libgen_messaging.a
261 COMLIB
+= $(NAN_SND_LIBS
)
264 SPLIB1
= $(OCGDIR
)/gameengine
/GamePlayer
/ghost
/$(DEBUG_DIR
)libghost.a
265 SPLIB1
+= $(OCGDIR
)/gameengine
/GamePlayer
/common
/$(DEBUG_DIR
)libcommon.a
266 SPLIB1
+= $(NAN_STRING
)/lib
/$(DEBUG_DIR
)libstring.a
267 SPLIB1
+= $(NAN_GHOST
)/lib
/$(DEBUG_DIR
)libghost.a
269 SPLIB
= $(OCGDIR
)/blender
/makesdna
/$(DEBUG_DIR
)DNA.o
270 SPLIB
+= $(OCGDIR
)/blender
/readblenfile
/$(DEBUG_DIR
)libreadblenfile.a
271 # this is used for the plugin. It uses some things from libz.a,
272 # but somehow it consistently fails to resolve these symbols... or
273 # can I just not check them? nm claims they aren't...
274 SPLIB
+= $(OCGDIR
)/blender
/blenkernel
/blenkernel_blc
/$(DEBUG_DIR
)libblenkernel_blc.a
276 # These three need to be explicitly mentioned on the cl, because
277 # if they are offered as a lib, they are optimized away. (nzc)
278 NSPLUGLIB
= $(OCGDIR
)/gameengine
/GamePlayer
/netscape
/src
/$(DEBUG_DIR
)UnixShell.o
279 NSPLUGLIB
+= $(OCGDIR
)/gameengine
/GamePlayer
/netscape
/src
/$(DEBUG_DIR
)stubs.o
280 NSPLUGLIB
+= $(OCGDIR
)/gameengine
/GamePlayer
/netscape
/src
/$(DEBUG_DIR
)winstubs.o
281 NSPLUGLIB
+= $(OCGDIR
)/gameengine
/GamePlayer
/netscape
/src
/$(DEBUG_DIR
)Blender3DPlugin_native_implementation.o
283 # Here you can configure what sort of test to make for the plugin.
284 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_stub.a
285 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_colorcycle.a
286 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_gears.a
287 PLUGTESTLIB
= $(OCGDIR
)/gameengine
/GamePlayer
/netscape
/test/$(DEBUG_DIR
)libns_api_test_threaded_gears.a
289 # XPCOM is done only for Linux for now
290 ifeq ($(OS
),$(findstring $(OS
), "linux"))
292 NSPLUGLIB
+= $(OCGDIR
)/gameengine
/GamePlayer
/netscape
/src
/$(DEBUG_DIR
)XPH_xpcom_hooks.o
296 PLUGAPPLIB
= $(OCGDIR
)/gameengine
/GamePlayer
/netscape
/src
/$(DEBUG_DIR
)libplugin_ketsji_hooks.a
298 ifeq ($(OS
),$(findstring $(OS
), "freebsd linux irix solaris"))
299 NSPLUGLIB
+= $(OCGDIR
)/gameengine
/GamePlayer
/netscape
/src
/$(DEBUG_DIR
)PLG_X11_windowing.o
300 PLUGAPPLIB
+= $(OCGDIR
)/gameengine
/GamePlayer
/common
/unix
/$(DEBUG_DIR
)libunix.a
302 ifeq ($(OS
),$(findstring $(OS
), "windows"))
303 NSPLUGLIB
+= $(OCGDIR
)/gameengine
/GamePlayer
/netscape
/src
/$(DEBUG_DIR
)PLG_MSWindows_windowing.o
304 NSPLUGLIB
+= $(OCGDIR
)/gameengine
/GamePlayer
/netscape
/src
/$(DEBUG_DIR
)npB3DPlg.res
305 PLUGAPPLIB
+= $(OCGDIR
)/gameengine
/GamePlayer
/common
/windows
/$(DEBUG_DIR
)libwindows.a
308 PLUGAPPLIB
+= $(OCGDIR
)/gameengine
/GamePlayer
/common
/$(DEBUG_DIR
)libcommon.a
310 ifeq ($(OS
),$(findstring $(OS
), "linux"))
312 PLUGAPPLIB_XPLINK
= $(OCGDIR
)/gameengine
/GamePlayer
/netscape
/src
/$(DEBUG_DIR
)_Blender3DPlugin_implementation_.o
316 # A bit silly... but needed to resolve symbols.
317 PLUGREMLIB
= $(NAN_STRING
)/lib
/$(DEBUG_DIR
)libstring.a
319 ######################## OS dependencies (alphabetic!) ################
323 ifeq ($(NAN_JUST_BLENDERDYNAMIC
),true
)
324 BINTARGETS
= blenderdynamic
327 ifeq ($(WITH_BF_DYNAMICOPENGL
), true
)
328 BINTARGETS
+= blenderdynamic
331 ifeq ($(WITH_BF_STATICOPENGL
), true
)
332 BINTARGETS
+= blenderstatic
335 ifeq ($(WITH_BF_BLENDERPLAYER
), true
)
336 export WITH_BF_GAMEENGINE
=true
337 BINTARGETS
+= blenderplayer
340 ifeq ($(WITH_BF_WEBPLUGIN
), true
)
341 ifneq ($(NAN_NO_PLUGIN
), true
)
352 PYLIB
= -framework Python
354 PYLIB
= $(NAN_PYTHON
)/lib
/python
$(NAN_PYTHON_VERSION
)/config
/libpython
$(NAN_PYTHON_VERSION
).a
358 PYLIB
+= $(NAN_ZLIB
)/lib
/libz.a
359 PULIB
+= $(NAN_ZLIB
)/lib
/libz.a
360 SPLIB
+= $(NAN_ZLIB
)/lib
/libz.a
363 # OpenAL libs are already compiled as shared code! Check FMod if we switch to that. (nzc)
365 # Some vars to keep the rest of this section mostly readable
367 SOUNDSYSTEM
= $(OCGDIR
)/intern
/SoundSystem
/$(DEBUG_DIR
)libSoundSystem.a
368 DUMMYSOUND
= $(OCGDIR
)/intern
/DummySoundSystem
/$(DEBUG_DIR
)libDummySoundSystem.a
369 OPENALSOUND
= $(OCGDIR
)/intern
/OpenALSoundSystem
/$(DEBUG_DIR
)libOpenALSoundSystem.a
370 SDLSOUND
= $(OCGDIR
)/intern
/SDLSoundSystem
/$(DEBUG_DIR
)libSDLSoundSystem.a
372 # Some kooky logic going on here ...
373 ifeq ($(NAN_NO_OPENAL
), true
)
374 NAN_SND_LIBS
= $(SOUNDSYSTEM
)
375 NAN_SND_LIBS
+= $(DUMMYSOUND
)
376 NAN_SND_LIBS
+= $(SOUNDSYSTEM
)
378 ifeq ($(OS
),$(findstring $(OS
), "freebsd linux windows"))
379 ifeq ($(CPU
),$(findstring $(CPU
), "i386 powerpc x86_64"))
380 NAN_SND_LIBS
= $(SOUNDSYSTEM
)
381 NAN_SND_LIBS
+= $(DUMMYSOUND
)
382 NAN_SND_LIBS
+= $(OPENALSOUND
)
383 NAN_SND_LIBS
+= $(SDLSOUND
)
384 NAN_SND_LIBS
+= $(NAN_OPENAL
)/lib
/libopenal.a
385 ALUT
= $(wildcard $(NAN_OPENAL
)/lib
/libalut.a
)
386 NAN_SND_LIBS
+= $(ALUT
)
387 NAN_SND_LIBS
+= $(SOUNDSYSTEM
)
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
/openal_static.lib
395 ALUT
= $(wildcard $(NAN_OPENAL
)/lib
/alut_static.lib
)
396 NAN_SND_LIBS
+= $(ALUT
)
397 NAN_SND_LIBS
+= $(SOUNDSYSTEM
)
399 NAN_SND_LIBS
= $(SOUNDSYSTEM
)
400 NAN_SND_LIBS
+= $(DUMMYSOUND
)
401 NAN_SND_LIBS
+= $(SOUNDSYSTEM
)
406 NAN_SND_LIBS
= $(SOUNDSYSTEM
)
407 NAN_SND_LIBS
+= $(DUMMYSOUND
)
408 NAN_SND_LIBS
+= $(OPENALSOUND
)
409 NAN_SND_LIBS
+= $(NAN_OPENAL
)/lib
/libopenal.a
410 ALUT
= $(wildcard $(NAN_OPENAL
)/lib
/libalut.a
)
411 NAN_SND_LIBS
+= $(ALUT
)
412 NAN_SND_LIBS
+= $(SOUNDSYSTEM
)
414 ifeq ($(OS
), solaris
)
415 NAN_SND_LIBS
= $(SOUNDSYSTEM
)
416 NAN_SND_LIBS
+= $(DUMMYSOUND
)
417 NAN_SND_LIBS
+= $(OPENALSOUND
)
418 NAN_SND_LIBS
+= $(SDLSOUND
)
419 NAN_SND_LIBS
+= $(NAN_OPENAL
)/lib
/libopenal.a
420 ALUT
= $(wildcard $(NAN_OPENAL
)/lib
/libalut.a
)
421 NAN_SND_LIBS
+= $(ALUT
)
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
463 # prepare for NAN_BUILDINFO compile at the *sigh* link rules below
468 include nan_compile.mk
471 ################## target rules ########################
474 @echo
"****> Make $@ by $(ID)@$(HOST) at $(MAKE_START) on $(CONFIG_GUESS)"
476 @for n in
$(NANENV
); do \
484 include nan_subdirs.mk
486 ################## target rules ########################
491 @
$(MAKE
) link DEBUG_DIR
="debug/" NANENV
=$(NANENV
)
493 clean:: linkclean debuglinkclean
496 @echo
"****> Build $(MAKE_START) - `date '+%H:%M:%S %d-%b-%Y'`"
498 @for n in
$(NANENV
); do \
504 @
$(RM
) -r
$(DIR
)/blenderstatic
* \
505 $(DIR
)/blenderplayer
* \
509 @
$(RM
) -r
$(DIR
)/debug
/blenderstatic
* \
510 $(DIR
)/debug
/blenderplayer
* \
513 # Shortcut for Tinderbox release builds. Mortals don't use this.
515 @
$(MAKE
) -C ..
/release
/ all || exit
1;
517 ############### Linker rules ###############
519 blenderstatic
: $(DIR
)/$(DEBUG_DIR
)bin
/blenderstatic
520 blenderdynamic
: $(DIR
)/$(DEBUG_DIR
)bin
/blender
$(EXT
)
521 blenderplayer
: $(DIR
)/$(DEBUG_DIR
)bin
/blenderplayer
$(EXT
)
522 blenderdynplayer
: $(DIR
)/$(DEBUG_DIR
)bin
/blenderdynplayer
$(EXT
)
524 # XPCOM connector only for linux so far...
526 xplink
: $(DIR
)/$(DEBUG_DIR
)bin
/Blender3DPlugin
$(SOEXT
)
530 ifeq ($(OS
),$(findstring $(OS
), "freebsd linux irix solaris"))
531 plugin
: $(DIR
)/$(DEBUG_DIR
)bin
/npBlender3DPlugin
$(SOEXT
)
532 ptest
: $(DIR
)/$(DEBUG_DIR
)bin
/npTestPlugin
$(SOEXT
)
534 # Windows needs a 8.3 name... Why? Dunno...
536 ifneq ($(FREE_WINDOWS
),true
)
537 plugin
: $(DIR
)/$(DEBUG_DIR
)npB3DPlg
$(SOEXT
)
541 $(DIR
)/$(DEBUG_DIR
)bin
/blenderstatic
: $(OBJS
) $(GRPLIB
) $(COMLIB
) $(PULIB
)
542 @echo
"****> Link $@"
544 $(CCC
) $(REL_CFLAGS
) -DBUILD_DATE
='"$(BUILD_DATE)"' -DBUILD_TIME
='"$(BUILD_TIME)"' -DBUILD_REV
='"$(BUILD_REV)"' -DBUILD_PLATFORM
='"$(CONFIG_GUESS)"' -DBUILD_TYPE
='"static"' $(BUILDINFO_C
) -c
-o
$(BUILDINFO_O
) -DNAN_BUILDINFO
546 mkdir
-p
$(DIR
)/$(DEBUG_DIR
)bin
547 $(CCC
) $(LDFLAGS
) -o
$(DIR
)/$(DEBUG_DIR
)bin
/blenderstatic
$(BUILDINFO_O
) $(OBJS
) $(GRPLIB
) $(COMLIB
) $(PULIB
) $(PYLIB
) $(LLIBS
) $(SADD
) $(LOPTS
)
549 /bin
/rm $(BUILDINFO_O
)
552 @
$(MAKE
) -C darwin
/ APPLICATION
=blenderstatic
555 $(DIR
)/$(DEBUG_DIR
)bin
/blender
$(EXT
): $(OBJS
) $(GRPLIB
) $(COMLIB
) $(PULIB
)
556 @echo
"****> Link $@"
558 $(CCC
) $(REL_CFLAGS
) -DBUILD_DATE
='"$(BUILD_DATE)"' -DBUILD_TIME
='"$(BUILD_TIME)"' -DBUILD_REV
='"$(BUILD_REV)"' -DBUILD_PLATFORM
='"$(CONFIG_GUESS)"' -DBUILD_TYPE
='"dynamic"' $(BUILDINFO_C
) -c
-o
$(BUILDINFO_O
) -DNAN_BUILDINFO
560 mkdir
-p
$(DIR
)/$(DEBUG_DIR
)bin
561 $(CCC
) $(LDFLAGS
) -o
$(DIR
)/$(DEBUG_DIR
)bin
/blender
$(EXT
) $(BUILDINFO_O
) $(OBJS
) $(GRPLIB
) $(COMLIB
) $(PULIB
) $(PYLIB
) $(LLIBS
) $(DADD
) $(LOPTS
)
563 /bin
/rm $(BUILDINFO_O
)
566 @
$(MAKE
) -C darwin
/ APPLICATION
=blender
569 $(DIR
)/$(DEBUG_DIR
)bin
/blenderplayer
$(EXT
): $(OBJS
) $(SPLIB1
) $(COMLIB
) $(SPLIB
)
570 @echo
"****> Link $@"
572 $(CCC
) $(REL_CFLAGS
) -DBUILD_DATE
='"$(BUILD_DATE)"' -DBUILD_TIME
='"$(BUILD_TIME)"' -DBUILD_REV
='"$(BUILD_REV)"' -DBUILD_PLATFORM
='"$(CONFIG_GUESS)"' -DBUILD_TYPE
='"dynamic"' $(BUILDINFO_C
) -c
-o
$(BUILDINFO_O
) -DNAN_BUILDINFO
574 mkdir
-p
$(DIR
)/$(DEBUG_DIR
)bin
575 $(CCC
) $(LDFLAGS
) -o
$(DIR
)/$(DEBUG_DIR
)bin
/blenderplayer
$(EXT
) $(BUILDINFO_O
) $(OBJS
) $(SPLIB1
) $(COMLIB
) $(SPLIB
) $(PYPLAYERLIB
) $(LLIBS
) $(DADD
) $(LOPTS
)
577 /bin
/rm $(BUILDINFO_O
)
580 @
$(MAKE
) -C darwin
/ APPLICATION
=blenderplayer
583 $(DIR
)/$(DEBUG_DIR
)bin
/blenderdynplayer
$(EXT
): $(OBJS
) $(COMLIB
) $(SPLIB
)
584 @echo
"****> Link $@"
586 $(CCC
) $(REL_CFLAGS
) -DBUILD_DATE
='"$(BUILD_DATE)"' -DBUILD_TIME
='"$(BUILD_TIME)"' -DBUILD_REV
='"$(BUILD_REV)"' -DBUILD_PLATFORM
='"$(CONFIG_GUESS)"' -DBUILD_TYPE
='"dynamic"' $(BUILDINFO_C
) -c
-o
$(BUILDINFO_O
) -DNAN_BUILDINFO
588 mkdir
-p
$(DIR
)/$(DEBUG_DIR
)bin
589 $(CCC
) $(LDFLAGS
) -o
$(DIR
)/$(DEBUG_DIR
)bin
/blenderdynplayer
$(EXT
) $(BUILDINFO_O
) $(OBJS
) $(SPLIB1
) $(COMLIB
) $(SPLIB
) $(PYLIB
) $(LLIBS
) $(DADD
) $(LOPTS
)
591 /bin
/rm $(BUILDINFO_O
)
594 @
$(MAKE
) -C darwin
/ APPLICATION
=blenderplayer
597 $(DIR
)/$(DEBUG_DIR
)bin
/Blender3DPlugin
$(SOEXT
): $(PLUGAPPLIB_XPLINK
)
598 @echo
"****> Link $@"
600 $(CCC
) $(REL_CFLAGS
) -DBUILD_DATE
='"$(BUILD_DATE)"' -DBUILD_TIME
='"$(BUILD_TIME)"' -DBUILD_REV
='"$(BUILD_REV)"' -DBUILD_PLATFORM
='"$(CONFIG_GUESS)"' -DBUILD_TYPE
='"dynamic"' $(BUILDINFO_C
) -c
-o
$(BUILDINFO_O
) -DNAN_BUILDINFO
602 mkdir
-p
$(DIR
)/$(DEBUG_DIR
)bin
603 $(CCC
) $(DYNLDFLAGS
) -o
$@
$(PLUGAPPLIB_XPLINK
) $(LOPTS
)
605 /bin
/rm $(BUILDINFO_O
)
608 # Windows build needs a def file? Why? For exposing functions from the
609 # dll to the outside world. However, this is alsi done internally..
610 DEFFILE
= .
/gameengine
/GamePlayer
/netscape
/src
/npB3DPlg.def
612 # Windows needs a specific name format for dll.s so we give it one.
613 $(DIR
)/$(DEBUG_DIR
)npB3DPlg
$(SOEXT
): $(NSPLUGLIB
) $(PLUGAPPLIB
) $(COMLIB
) $(SPLIB
)
614 @echo
"****> Link $@"
616 $(CCC
) $(REL_CFLAGS
) -DBUILD_DATE
='"$(BUILD_DATE)"' -DBUILD_TIME
='"$(BUILD_TIME)"' -DBUILD_REV
='"$(BUILD_REV)"' -DBUILD_PLATFORM
='"$(CONFIG_GUESS)"' -DBUILD_TYPE
='"dynamic"' $(BUILDINFO_C
) -c
-o
$(BUILDINFO_O
) -DNAN_BUILDINFO
618 # $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PYLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS)
619 $(CCC
) $(DYNLDFLAGS
) -o
$@
$(NSPLUGLIB
) $(PLUGAPPLIB
) $(COMLIB
) $(SPLIB
) $(PYLIB
) $(PLUGREMLIB
) $(LLIBS
) $(DADD
) $(LOPTS
) /def
:$(DEFFILE
)
621 /bin
/rm $(BUILDINFO_O
)
624 $(DIR
)/$(DEBUG_DIR
)bin
/npBlender3DPlugin
$(SOEXT
): $(NSPLUGLIB
) $(PLUGAPPLIB
) $(COMLIB
) $(SPLIB
)
625 @echo
"****> Link $@"
627 $(CCC
) $(REL_CFLAGS
) -DBUILD_DATE
='"$(BUILD_DATE)"' -DBUILD_TIME
='"$(BUILD_TIME)"' -DBUILD_REV
='"$(BUILD_REV)"' -DBUILD_PLATFORM
='"$(CONFIG_GUESS)"' -DBUILD_TYPE
='"dynamic"' $(BUILDINFO_C
) -c
-o
$(BUILDINFO_O
) -DNAN_BUILDINFO
629 mkdir
-p
$(DIR
)/$(DEBUG_DIR
)bin
630 $(CCC
) $(DYNLDFLAGS
) -o
$@
$(NSPLUGLIB
) $(PLUGAPPLIB
) $(COMLIB
) $(SPLIB
) $(PYLIB
) $(PLUGREMLIB
) $(LLIBS
) $(DADD
) $(LOPTS
)
632 /bin
/rm $(BUILDINFO_O
)
635 $(DIR
)/$(DEBUG_DIR
)bin
/npTestPlugin
$(SOEXT
): $(NSPLUGLIB
)
636 @echo
"****> Link $@"
638 $(CCC
) $(REL_CFLAGS
) -DBUILD_DATE
='"$(BUILD_DATE)"' -DBUILD_TIME
='"$(BUILD_TIME)"' -DBUILD_REV
='"$(BUILD_REV)"' -DBUILD_PLATFORM
='"$(CONFIG_GUESS)"' -DBUILD_TYPE
='"dynamic"' $(BUILDINFO_C
) -c
-o
$(BUILDINFO_O
) -DNAN_BUILDINFO
640 mkdir
-p
$(DIR
)/$(DEBUG_DIR
)bin
641 $(CCC
) $(DYNLDFLAGS
) -o
$@
$(NSPLUGLIB
) $(PLUGTESTLIB
) $(LLIBS
) $(DADD
) $(LOPTS
)
643 /bin
/rm $(BUILDINFO_O
)