1 # -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*-
6 # ***** BEGIN GPL LICENSE BLOCK *****
8 # This program is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public License
10 # as published by the Free Software Foundation; either version 2
11 # of the License, or (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software Foundation,
20 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 # The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
23 # All rights reserved.
25 # The Original Code is: all of this file.
29 # ***** END GPL LICENSE BLOCK *****
31 # Top level makefile. Start looping through subdirs and link....
35 export NANENV := $(shell env | grep NAN_)
38 include nan_definitions.mk
40 DIRS = creator blender kernel
42 ifneq ($(NAN_NO_KETSJI),true)
50 ########## buildinfo kludge ###################
51 CPPFLAGS += -I../Physics/common
52 CPPFLAGS += -I../Physics/Dummy
54 BUILDINFO_O = $(DIR)/$(DEBUG_DIR)buildinfo.o
55 BUILDINFO_C = $(SRCHOME)/creator/buildinfo.c
56 BUILD_DATE := $(shell date "+%Y-%m-%d")
57 BUILD_TIME := $(shell date "+%H:%M:%S")
58 BUILD_REV := $(shell svnversion)
61 ############# set pyplayerlib ##################
64 ############# libraries ##################
65 # COMLIB COMmon LIBraries for all targets
66 # BPLIB Browser Plugin LIBraries
67 # SPLIB1 Standalone Player LIBraries (pre COMLIB)
68 # SPLIB Standalone Player LIBraries (post COMLIB)
69 # PULIB PUblisher LIBraries
70 # GRPLIB Gui and Render LIBraries for Publisher
71 # LLIBS dynamic system libraries
72 # SADD Static OpenGL libraries
73 # DADD Dynamic OpenGL libraries
74 # NSPLUGLIB PLUGin LIBraries for ns-style api
75 # PLUGAPPLIB libs that form the application to be plugged in
76 # Note: the order is important here
78 GRPLIB = $(OCGDIR)/creator/$(DEBUG_DIR)libcreator.a
79 GRPLIB += $(OCGDIR)/blender/windowmanager/$(DEBUG_DIR)libwindowmanager.a
80 GRPLIB += $(NAN_BSP)/lib/$(DEBUG_DIR)libbsp.a
81 GRPLIB += $(NAN_BOOLOP)/lib/$(DEBUG_DIR)libboolop.a
82 GRPLIB += $(NAN_SOUNDSYSTEM)/lib/$(DEBUG_DIR)libSoundSystem.a
83 GRPLIB += $(NAN_GHOST)/lib/$(DEBUG_DIR)libghost.a
84 GRPLIB += $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
85 GRPLIB += $(OCGDIR)/blender/render/$(DEBUG_DIR)librender.a
87 # nlin: the reason that some libraries appear more than once below is
88 # to handle circular dependencies in linking among libraries... some
89 # linkers (e.g. under Linux) need libs to be specified multiple times
90 # to properly resolve circular dependencies. ugly, but it works...
91 # the repeat entries could probably be trimmed down.
92 COMLIB = $(OCGDIR)/blender/blenkernel/$(DEBUG_DIR)libblenkernel.a
93 COMLIB += $(OCGDIR)/blender/blenloader/$(DEBUG_DIR)libblenloader.a
94 COMLIB += $(OCGDIR)/blender/blenpluginapi/$(DEBUG_DIR)libblenpluginapi.a
95 COMLIB += $(OCGDIR)/blender/nodes_shd/$(DEBUG_DIR)libnodes_shd.a
96 COMLIB += $(OCGDIR)/blender/nodes_cmp/$(DEBUG_DIR)libnodes_cmp.a
97 COMLIB += $(OCGDIR)/blender/nodes_tex/$(DEBUG_DIR)libnodes_tex.a
98 COMLIB += $(OCGDIR)/blender/nodes/$(DEBUG_DIR)libnodes.a
99 COMLIB += $(OCGDIR)/blender/imbuf/$(DEBUG_DIR)libimbuf.a
100 COMLIB += $(OCGDIR)/blender/blenlib/$(DEBUG_DIR)libblenlib.a
101 COMLIB += $(NAN_IKSOLVER)/lib/$(DEBUG_DIR)libiksolver.a
102 COMLIB += $(NAN_MOTO)/lib/$(DEBUG_DIR)libmoto.a
103 COMLIB += $(NAN_SUPERLU)/lib/$(DEBUG_DIR)libsuperlu.a
104 COMLIB += $(OCGDIR)/blender/avi/$(DEBUG_DIR)libavi.a
105 COMLIB += $(NAN_JPEG)/lib/libjpeg.a
106 COMLIB += $(OCGDIR)/blender/gpu/$(DEBUG_DIR)libgpu.a
107 COMLIB += $(NAN_GLEW)/lib/$(DEBUG_DIR)libglew.a
108 COMLIB += $(OCGDIR)/blender/blenfont/$(DEBUG_DIR)libblenfont.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 += $(OCGDIR)/gameengine/blphys/fuzzics/$(DEBUG_DIR)libfuzzics.a
118 COMLIB += $(NAN_QHULL)/lib/libqhull.a
119 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
120 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
121 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
122 COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
123 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
124 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
125 COMLIB += $(OCGDIR)/gameengine/blphys/blbullet/$(DEBUG_DIR)libblbullet.a
126 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
127 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
128 COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
129 COMLIB += $(OCGDIR)/gameengine/logic/$(DEBUG_DIR)liblogic.a
130 COMLIB += $(OCGDIR)/gameengine/logic/Joystick/$(DEBUG_DIR)libJoystick.a
131 COMLIB += $(OCGDIR)/gameengine/rasterizer/$(DEBUG_DIR)librasterizer.a
132 COMLIB += $(OCGDIR)/gameengine/OpenGLrasterizer/$(DEBUG_DIR)libOpenGLrasterizer.a
133 COMLIB += $(OCGDIR)/gameengine/expression/$(DEBUG_DIR)libexpression.a
134 COMLIB += $(OCGDIR)/gameengine/scenegraph/$(DEBUG_DIR)libscenegraph.a
135 COMLIB += $(OCGDIR)/gameengine/videotex/$(DEBUG_DIR)libvideotex.a
136 COMLIB += $(NAN_MOTO)/lib/libmoto.a
137 COMLIB += $(NAN_SND_LIBS)
138 COMLIB += $(OCGDIR)/kernel/gen_system/$(DEBUG_DIR)libgen_system.a
139 COMLIB += $(OCGDIR)/kernel/gen_messaging/$(DEBUG_DIR)libgen_messaging.a
140 COMLIB += $(OCGDIR)/gameengine/ketsji/KXNetwork/$(DEBUG_DIR)libKXNetwork.a
141 COMLIB += $(OCGDIR)/gameengine/Network/$(DEBUG_DIR)libNetwork.a
142 COMLIB += $(OCGDIR)/gameengine/Network/LoopBackNetwork/$(DEBUG_DIR)libLoopBackNetwork.a
143 COMLIB += $(NAN_BULLET2)/lib/libbullet2.a
146 # Cloth requires bullet2, gameegine does not matter anymore
147 #COMLIB += $(NAN_BULLET2)/lib/libbullet2.a
149 COMLIB += $(OCGDIR)/blender/makesdna/$(DEBUG_DIR)libdna.a
150 COMLIB += $(NAN_GUARDEDALLOC)/lib/libguardedalloc.a
151 COMLIB += $(NAN_MEMUTIL)/lib/libmemutil.a
152 COMLIB += $(NAN_PNG)/lib/libpng.a
153 COMLIB += $(OCGDIR)/blender/gen_python/$(DEBUG_DIR)libgen_python.a
155 ifeq ($(WITH_QUICKTIME), true)
156 COMLIB += $(OCGDIR)/blender/blenderqt/$(DEBUG_DIR)libblenderqt.a
159 ifeq ($(WITH_OPENEXR), true)
160 COMLIB += $(OCGDIR)/blender/imbuf/openexr/$(DEBUG_DIR)libopenexr.a
163 ifeq ($(WITH_OPENJPEG), true)
164 COMLIB += $(OCGDIR)/extern/openjpeg/$(DEBUG_DIR)libopenjpeg.a
167 COMLIB += $(OCGDIR)/blender/imbuf/cineon/$(DEBUG_DIR)libcineon.a
169 ifeq ($(WITH_DDS), true)
170 COMLIB += $(OCGDIR)/blender/imbuf/dds/$(DEBUG_DIR)libdds.a
173 ifeq ($(WITH_BINRELOC), true)
174 COMLIB += $(OCGDIR)/extern/binreloc/$(DEBUG_DIR)libbinreloc.a
177 ifeq ($(OS), windows)
178 ifeq ($(FREE_WINDOWS), true)
179 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
181 COMLIB += $(NAN_FREETYPE)/lib/freetype2ST.lib
185 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
187 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
192 COMLIB += $(NAN_SDL)/lib/libSDL.a
195 ifeq ($(OS), windows)
196 ifeq ($(FREE_WINDOWS), true)
197 COMLIB += $(NAN_SDL)/lib/libSDL.a
198 COMLIB += $(NAN_PTHREADS)/lib/libpthreadGC2.a
200 COMLIB += $(NAN_SDL)/lib/SDL.lib
204 ifeq ($(WITH_OPENEXR), true)
205 COMLIB += $(NAN_OPENEXR_LIBS)
208 # note: space_api.a in begin of editors, screen.a in end
209 PULIB = $(NAN_MOTO)/lib/libmoto.a
210 PULIB += $(NAN_DECIMATION)/lib/$(DEBUG_DIR)libdecimation.a
211 PULIB += $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
212 PULIB += $(OCGDIR)/blender/ed_space/$(DEBUG_DIR)libed_space.a
213 PULIB += $(OCGDIR)/blender/ed_sound/$(DEBUG_DIR)libed_sound.a
214 PULIB += $(OCGDIR)/blender/ed_action/$(DEBUG_DIR)libed_action.a
215 PULIB += $(OCGDIR)/blender/ed_nla/$(DEBUG_DIR)libed_nla.a
216 PULIB += $(OCGDIR)/blender/ed_script/$(DEBUG_DIR)libed_script.a
217 PULIB += $(OCGDIR)/blender/ed_text/$(DEBUG_DIR)libed_text.a
218 PULIB += $(OCGDIR)/blender/ed_logic/$(DEBUG_DIR)libed_logic.a
219 PULIB += $(OCGDIR)/blender/ed_sequencer/$(DEBUG_DIR)libed_sequencer.a
220 PULIB += $(OCGDIR)/blender/ed_file/$(DEBUG_DIR)libed_file.a
221 PULIB += $(OCGDIR)/blender/ed_info/$(DEBUG_DIR)libed_info.a
222 PULIB += $(OCGDIR)/blender/ed_buttons/$(DEBUG_DIR)libed_buttons.a
223 PULIB += $(OCGDIR)/blender/ed_graph/$(DEBUG_DIR)libed_graph.a
224 PULIB += $(OCGDIR)/blender/ed_node/$(DEBUG_DIR)libed_node.a
225 PULIB += $(OCGDIR)/blender/ed_outliner/$(DEBUG_DIR)libed_outliner.a
226 PULIB += $(OCGDIR)/blender/ed_time/$(DEBUG_DIR)libed_time.a
227 PULIB += $(OCGDIR)/blender/ed_preview/$(DEBUG_DIR)libed_preview.a
228 PULIB += $(OCGDIR)/blender/ed_view3d/$(DEBUG_DIR)libed_view3d.a
229 PULIB += $(OCGDIR)/blender/ed_interface/$(DEBUG_DIR)libed_interface.a
230 PULIB += $(OCGDIR)/blender/ed_object/$(DEBUG_DIR)libed_object.a
231 PULIB += $(OCGDIR)/blender/ed_curve/$(DEBUG_DIR)libed_curve.a
232 PULIB += $(OCGDIR)/blender/ed_armature/$(DEBUG_DIR)libed_armature.a
233 PULIB += $(OCGDIR)/blender/ed_mesh/$(DEBUG_DIR)libed_mesh.a
234 PULIB += $(OCGDIR)/blender/ed_sculpt_paint/$(DEBUG_DIR)libed_sculpt_paint.a
235 PULIB += $(OCGDIR)/blender/ed_physics/$(DEBUG_DIR)libed_physics.a
236 PULIB += $(OCGDIR)/blender/ed_animation/$(DEBUG_DIR)libed_animation.a
237 PULIB += $(OCGDIR)/blender/ed_transform/$(DEBUG_DIR)libed_transform.a
238 PULIB += $(OCGDIR)/blender/ed_util/$(DEBUG_DIR)libed_util.a
239 PULIB += $(OCGDIR)/blender/ed_datafiles/$(DEBUG_DIR)libed_datafiles.a
240 PULIB += $(OCGDIR)/blender/ed_image/$(DEBUG_DIR)libed_image.a
241 PULIB += $(OCGDIR)/blender/ed_uvedit/$(DEBUG_DIR)libed_uvedit.a
242 PULIB += $(OCGDIR)/blender/ed_screen/$(DEBUG_DIR)libed_screen.a
243 PULIB += $(OCGDIR)/blender/ed_console/$(DEBUG_DIR)libed_console.a
244 PULIB += $(OCGDIR)/blender/windowmanager/$(DEBUG_DIR)libwindowmanager.a
245 PULIB += $(OCGDIR)/blender/python/$(DEBUG_DIR)libpython.a
246 PULIB += $(OCGDIR)/blender/makesrna/$(DEBUG_DIR)librna.a
247 # note, no idea but it suddenly doesn't compile :(
248 PULIB += $(OCGDIR)/blender/blenlib/$(DEBUG_DIR)libblenlib.a
249 PULIB += $(NAN_OPENNL)/lib/$(DEBUG_DIR)libopennl.a
250 PULIB += $(NAN_ELBEEM)/lib/$(DEBUG_DIR)libelbeem.a
252 ifeq ($(NAN_NO_KETSJI),true)
253 PULIB += $(NAN_MOTO)/lib/$(DEBUG_DIR)libmoto.a
254 PULIB += $(OCGDIR)/kernel/gen_system/$(DEBUG_DIR)libgen_system.a
255 PULIB += $(OCGDIR)/kernel/gen_messaging/$(DEBUG_DIR)libgen_messaging.a
256 COMLIB += $(NAN_SND_LIBS)
259 SPLIB1 = $(OCGDIR)/gameengine/GamePlayer/ghost/$(DEBUG_DIR)libghost.a
260 SPLIB1 += $(OCGDIR)/gameengine/GamePlayer/common/$(DEBUG_DIR)libcommon.a
261 SPLIB1 += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
262 SPLIB1 += $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
263 SPLIB1 += $(NAN_GHOST)/lib/$(DEBUG_DIR)libghost.a
265 SPLIB = $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
266 # this is used for the plugin. It uses some things from libz.a,
267 # but somehow it consistently fails to resolve these symbols... or
268 # can I just not check them? nm claims they aren't...
269 SPLIB += $(OCGDIR)/blender/blenkernel/blenkernel_blc/$(DEBUG_DIR)libblenkernel_blc.a
270 SPLIB += $(OCGDIR)/blender/makesrna/$(DEBUG_DIR)librna.a
271 SPLIB += $(OCGDIR)/blender/blenlib/$(DEBUG_DIR)libblenlib.a
273 # These three need to be explicitly mentioned on the cl, because
274 # if they are offered as a lib, they are optimized away. (nzc)
275 NSPLUGLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)UnixShell.o
276 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)stubs.o
277 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)winstubs.o
278 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)Blender3DPlugin_native_implementation.o
280 # Here you can configure what sort of test to make for the plugin.
281 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_stub.a
282 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_colorcycle.a
283 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_gears.a
284 PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_threaded_gears.a
286 # XPCOM is done only for Linux for now
287 ifeq ($(OS),$(findstring $(OS), "linux"))
289 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)XPH_xpcom_hooks.o
293 PLUGAPPLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)libplugin_ketsji_hooks.a
295 ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
296 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)PLG_X11_windowing.o
297 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/unix/$(DEBUG_DIR)libunix.a
299 ifeq ($(OS),$(findstring $(OS), "windows"))
300 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)PLG_MSWindows_windowing.o
301 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)npB3DPlg.res
302 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/windows/$(DEBUG_DIR)libwindows.a
305 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/$(DEBUG_DIR)libcommon.a
307 ifeq ($(OS),$(findstring $(OS), "linux"))
309 PLUGAPPLIB_XPLINK = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)_Blender3DPlugin_implementation_.o
313 # A bit silly... but needed to resolve symbols.
314 PLUGREMLIB = $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
316 ######################## OS dependencies (alphabetic!) ################
320 ifeq ($(NAN_JUST_BLENDERDYNAMIC),true)
321 BINTARGETS = blenderdynamic
324 ifeq ($(WITH_BF_DYNAMICOPENGL), true)
325 BINTARGETS += blenderdynamic
328 ifeq ($(WITH_BF_STATICOPENGL), true)
329 BINTARGETS += blenderstatic
332 ifeq ($(WITH_BF_BLENDERPLAYER), true)
333 export WITH_BF_GAMEENGINE=true
334 BINTARGETS += blenderplayer
337 ifeq ($(WITH_BF_WEBPLUGIN), true)
347 PULIB += $(NAN_ZLIB)/lib/libz.a
348 SPLIB += $(NAN_ZLIB)/lib/libz.a
351 # OpenAL libs are already compiled as shared code!
353 # Some vars to keep the rest of this section mostly readable
355 SOUNDSYSTEM = $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
356 DUMMYSOUND = $(OCGDIR)/intern/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
357 OPENALSOUND = $(OCGDIR)/intern/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
358 SDLSOUND = $(OCGDIR)/intern/SDLSoundSystem/$(DEBUG_DIR)libSDLSoundSystem.a
360 # Some kooky logic going on here ...
361 ifeq ($(NAN_NO_OPENAL), true)
362 NAN_SND_LIBS = $(SOUNDSYSTEM)
363 NAN_SND_LIBS += $(DUMMYSOUND)
364 NAN_SND_LIBS += $(SOUNDSYSTEM)
366 ifeq ($(OS),$(findstring $(OS), "freebsd linux windows"))
367 ifeq ($(CPU),$(findstring $(CPU), "i386 powerpc x86_64 parisc64"))
368 NAN_SND_LIBS = $(SOUNDSYSTEM)
369 NAN_SND_LIBS += $(DUMMYSOUND)
370 NAN_SND_LIBS += $(OPENALSOUND)
371 NAN_SND_LIBS += $(SDLSOUND)
372 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
373 NAN_SND_LIBS += $(SOUNDSYSTEM)
376 NAN_SND_LIBS = $(SOUNDSYSTEM)
377 NAN_SND_LIBS += $(DUMMYSOUND)
378 NAN_SND_LIBS += $(OPENALSOUND)
379 NAN_SND_LIBS += $(SDLSOUND)
380 NAN_SND_LIBS += $(NAN_OPENAL)/lib/openal_static.lib
381 NAN_SND_LIBS += $(SOUNDSYSTEM)
383 NAN_SND_LIBS = $(SOUNDSYSTEM)
384 NAN_SND_LIBS += $(DUMMYSOUND)
385 NAN_SND_LIBS += $(SOUNDSYSTEM)
390 NAN_SND_LIBS = $(SOUNDSYSTEM)
391 NAN_SND_LIBS += $(DUMMYSOUND)
392 NAN_SND_LIBS += $(OPENALSOUND)
393 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
394 NAN_SND_LIBS += $(SOUNDSYSTEM)
396 ifeq ($(OS), solaris)
397 NAN_SND_LIBS = $(SOUNDSYSTEM)
398 NAN_SND_LIBS += $(DUMMYSOUND)
399 NAN_SND_LIBS += $(OPENALSOUND)
400 NAN_SND_LIBS += $(SDLSOUND)
401 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
402 NAN_SND_LIBS += $(SOUNDSYSTEM)
405 NAN_SND_LIBS = $(SOUNDSYSTEM)
406 NAN_SND_LIBS += $(DUMMYSOUND)
407 NAN_SND_LIBS += $(SDLSOUND)
408 NAN_SND_LIBS += $(SOUNDSYSTEM)
410 NAN_SND_LIBS = $(SOUNDSYSTEM)
411 NAN_SND_LIBS += $(DUMMYSOUND)
412 NAN_SND_LIBS += $(SOUNDSYSTEM)
421 # Might need to change this to $(NAN_MOZILLA_LIB)/nspr4.lib
422 NSPLUGLIB += $(NAN_NSPR)/lib/nspr4.lib
424 BINTARGETS = blenderdynamic
425 ifeq ($(FREE_WINDOWS),true)
426 ifneq ($(NAN_NO_KETSJI),true)
427 BINTARGETS += blenderplayer
430 BINTARGETS += blenderplayer
431 BINTARGETS += blenderdynplayer
435 PULIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winblender.res
436 PULIB += $(NAN_ZLIB)/lib/libz.a
437 SPLIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winblender.res
438 SPLIB += $(NAN_ZLIB)/lib/libz.a
442 # prepare for NAN_BUILDINFO compile at the *sigh* link rules below
447 include nan_compile.mk
450 ################## target rules ########################
453 @echo "****> Make $@ by $(ID)@$(HOST) at $(MAKE_START) on $(CONFIG_GUESS)"
455 @for n in $(NANENV); do \
463 include nan_subdirs.mk
465 ################## target rules ########################
470 @$(MAKE) link DEBUG_DIR="debug/" NANENV=$(NANENV)
472 clean:: linkclean debuglinkclean
475 @echo "****> Build $(MAKE_START) - `date '+%H:%M:%S %d-%b-%Y'`"
477 @for n in $(NANENV); do \
483 @$(RM) -r $(DIR)/blenderstatic* \
484 $(DIR)/blenderplayer* \
488 @$(RM) -r $(DIR)/debug/blenderstatic* \
489 $(DIR)/debug/blenderplayer* \
492 # Shortcut for Tinderbox release builds. Mortals don't use this.
494 @$(MAKE) -C ../release/ all || exit 1;
496 ############### Linker rules ###############
498 blenderstatic: $(DIR)/$(DEBUG_DIR)bin/blenderstatic
499 blenderdynamic: $(DIR)/$(DEBUG_DIR)bin/blender$(EXT)
500 blenderplayer: $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT)
501 blenderdynplayer: $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT)
503 # XPCOM connector only for linux so far...
505 xplink: $(DIR)/$(DEBUG_DIR)bin/Blender3DPlugin$(SOEXT)
509 ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
510 plugin: $(DIR)/$(DEBUG_DIR)bin/npBlender3DPlugin$(SOEXT)
511 ptest: $(DIR)/$(DEBUG_DIR)bin/npTestPlugin$(SOEXT)
513 # Windows needs a 8.3 name... Why? Dunno...
515 ifneq ($(FREE_WINDOWS),true)
516 plugin: $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT)
520 $(DIR)/$(DEBUG_DIR)bin/blenderstatic: $(OBJS) $(GRPLIB) $(PULIB) $(COMLIB)
521 @echo "****> Link $@"
523 $(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
525 mkdir -p $(DIR)/$(DEBUG_DIR)bin
526 $(CCC) $(CCFLAGS) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderstatic $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(PULIB) $(COMLIB) $(LLIBS) $(SADD) $(LOPTS)
528 /bin/rm $(BUILDINFO_O)
531 @$(MAKE) -C darwin/ APPLICATION=blenderstatic
534 $(DIR)/$(DEBUG_DIR)bin/blender$(EXT): $(OBJS) $(GRPLIB) $(PULIB) $(COMLIB)
535 @echo "****> Link $@"
537 $(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
539 mkdir -p $(DIR)/$(DEBUG_DIR)bin
540 $(CCC) $(CCFLAGS) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blender$(EXT) $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(PULIB) $(COMLIB) $(LLIBS) $(DADD) $(LOPTS)
542 /bin/rm $(BUILDINFO_O)
545 @$(MAKE) -C darwin/ APPLICATION=blender
548 $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT): $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB)
549 @echo "****> Link $@"
551 $(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
553 mkdir -p $(DIR)/$(DEBUG_DIR)bin
554 $(CCC) $(CCFLAGS) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(LLIBS) $(DADD) $(LOPTS)
556 /bin/rm $(BUILDINFO_O)
559 @$(MAKE) -C darwin/ APPLICATION=blenderplayer
562 $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT): $(OBJS) $(COMLIB) $(SPLIB)
563 @echo "****> Link $@"
565 $(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
567 mkdir -p $(DIR)/$(DEBUG_DIR)bin
568 $(CCC) $(CCFLAGS) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(LLIBS) $(DADD) $(LOPTS)
570 /bin/rm $(BUILDINFO_O)
573 @$(MAKE) -C darwin/ APPLICATION=blenderplayer
576 $(DIR)/$(DEBUG_DIR)bin/Blender3DPlugin$(SOEXT): $(PLUGAPPLIB_XPLINK)
577 @echo "****> Link $@"
579 $(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
581 mkdir -p $(DIR)/$(DEBUG_DIR)bin
582 $(CCC) $(CCFLAGS) $(DYNLDFLAGS) -o $@ $(PLUGAPPLIB_XPLINK) $(LOPTS)
584 /bin/rm $(BUILDINFO_O)
587 # Windows build needs a def file? Why? For exposing functions from the
588 # dll to the outside world. However, this is alsi done internally..
589 DEFFILE = ./gameengine/GamePlayer/netscape/src/npB3DPlg.def
591 # Windows needs a specific name format for dll.s so we give it one.
592 $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
593 @echo "****> Link $@"
595 $(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
597 # $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS)
598 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS) /def:$(DEFFILE)
600 /bin/rm $(BUILDINFO_O)
603 $(DIR)/$(DEBUG_DIR)bin/npBlender3DPlugin$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
604 @echo "****> Link $@"
606 $(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
608 mkdir -p $(DIR)/$(DEBUG_DIR)bin
609 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS)
611 /bin/rm $(BUILDINFO_O)
614 $(DIR)/$(DEBUG_DIR)bin/npTestPlugin$(SOEXT): $(NSPLUGLIB)
615 @echo "****> Link $@"
617 $(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
619 mkdir -p $(DIR)/$(DEBUG_DIR)bin
620 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGTESTLIB) $(LLIBS) $(DADD) $(LOPTS)
622 /bin/rm $(BUILDINFO_O)