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
79 GRPLIB = $(OCGDIR)/creator/$(DEBUG_DIR)libcreator.a
80 GRPLIB += $(OCGDIR)/blender/windowmanager/$(DEBUG_DIR)libwindowmanager.a
81 GRPLIB += $(NAN_GHOST)/lib/$(DEBUG_DIR)libghost.a
82 GRPLIB += $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
83 GRPLIB += $(OCGDIR)/blender/render/$(DEBUG_DIR)librender.a
84 GRPLIB += $(OCGDIR)/blender/render/$(DEBUG_DIR)librender_raytrace.a
86 # nlin: the reason that some libraries appear more than once below is
87 # to handle circular dependencies in linking among libraries... some
88 # linkers (e.g. under Linux) need libs to be specified multiple times
89 # to properly resolve circular dependencies. ugly, but it works...
90 # the repeat entries could probably be trimmed down.
91 COMLIB = $(OCGDIR)/blender/blenkernel/$(DEBUG_DIR)libblenkernel.a
92 COMLIB += $(OCGDIR)/blender/blenloader/$(DEBUG_DIR)libblenloader.a
93 COMLIB += $(OCGDIR)/blender/blenpluginapi/$(DEBUG_DIR)libblenpluginapi.a
94 COMLIB += $(OCGDIR)/blender/nodes_shd/$(DEBUG_DIR)libnodes_shd.a
95 COMLIB += $(OCGDIR)/blender/nodes_cmp/$(DEBUG_DIR)libnodes_cmp.a
96 COMLIB += $(OCGDIR)/blender/nodes_tex/$(DEBUG_DIR)libnodes_tex.a
97 COMLIB += $(OCGDIR)/blender/nodes/$(DEBUG_DIR)libnodes.a
98 COMLIB += $(OCGDIR)/blender/imbuf/$(DEBUG_DIR)libimbuf.a
99 COMLIB += $(OCGDIR)/blender/ikplugin/$(DEBUG_DIR)libikplugin.a
100 COMLIB += $(OCGDIR)/blender/modifiers/$(DEBUG_DIR)libmodifiers.a
101 COMLIB += $(NAN_IKSOLVER)/lib/$(DEBUG_DIR)libiksolver.a
102 COMLIB += $(NAN_ITASC)/lib/$(DEBUG_DIR)libitasc.a
103 COMLIB += $(NAN_ITASC)/lib/$(DEBUG_DIR)libitasc_kdl.a
104 COMLIB += $(NAN_ITASC)/lib/$(DEBUG_DIR)libitasc_kdl_util.a
105 COMLIB += $(NAN_MOTO)/lib/$(DEBUG_DIR)libmoto.a
106 COMLIB += $(NAN_SUPERLU)/lib/$(DEBUG_DIR)libsuperlu.a
107 COMLIB += $(OCGDIR)/blender/avi/$(DEBUG_DIR)libavi.a
108 COMLIB += $(NAN_JPEG)/lib/libjpeg.a
109 COMLIB += $(OCGDIR)/blender/gpu/$(DEBUG_DIR)libgpu.a
110 COMLIB += $(NAN_GLEW)/lib/$(DEBUG_DIR)libglew.a
111 COMLIB += $(OCGDIR)/blender/blenfont/$(DEBUG_DIR)libblenfont.a
112 COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaudaspace.a
113 COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_src.a
114 COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_fx.a
115 COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_sdl.a
116 COMLIB += $(NAN_SAMPLERATE)/lib/$(DEBUG_DIR)libsamplerate.a
117 COMLIB += $(NAN_LZO)/lib/$(DEBUG_DIR)libminilzo.a
118 COMLIB += $(NAN_LZMA)/lib/$(DEBUG_DIR)liblzma.a
119 COMLIB += $(NAN_BSP)/lib/$(DEBUG_DIR)libbsp.a
120 COMLIB += $(NAN_BOOLOP)/lib/$(DEBUG_DIR)libboolop.a
121 COMLIB += $(NAN_MOTO)/lib/$(DEBUG_DIR)libmoto.a
122 COMLIB += $(NAN_DECIMATION)/lib/$(DEBUG_DIR)libdecimation.a
123 COMLIB += $(NAN_GHOST)/lib/$(DEBUG_DIR)libghost.a
125 ifeq ($(WITH_FFMPEG),true)
126 COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_ffmpeg.a
129 ifeq ($(WITH_OPENAL),true)
130 COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_openal.a
133 ifeq ($(WITH_JACK),true)
134 COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_jack.a
137 ifeq ($(WITH_SNDFILE),true)
138 COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_sndfile.a
141 ifeq ($(WITH_FFTW3),true)
142 COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_fftw.a
145 ifneq ($(NAN_NO_KETSJI),true)
146 COMLIB += $(OCGDIR)/gameengine/bloutines/$(DEBUG_DIR)libbloutines.a
147 COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
148 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
149 COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
150 COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
151 COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
152 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
153 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
154 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
155 COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
156 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
157 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
158 COMLIB += $(OCGDIR)/gameengine/blphys/blbullet/$(DEBUG_DIR)libblbullet.a
159 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
160 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
161 COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
162 COMLIB += $(OCGDIR)/gameengine/logic/$(DEBUG_DIR)liblogic.a
163 COMLIB += $(OCGDIR)/gameengine/logic/Joystick/$(DEBUG_DIR)libJoystick.a
164 COMLIB += $(OCGDIR)/gameengine/rasterizer/$(DEBUG_DIR)librasterizer.a
165 COMLIB += $(OCGDIR)/gameengine/OpenGLrasterizer/$(DEBUG_DIR)libOpenGLrasterizer.a
166 COMLIB += $(OCGDIR)/gameengine/expression/$(DEBUG_DIR)libexpression.a
167 COMLIB += $(OCGDIR)/gameengine/scenegraph/$(DEBUG_DIR)libscenegraph.a
168 COMLIB += $(OCGDIR)/gameengine/videotex/$(DEBUG_DIR)libvideotex.a
169 COMLIB += $(NAN_MOTO)/lib/libmoto.a
170 COMLIB += $(NAN_SND_LIBS)
171 COMLIB += $(OCGDIR)/kernel/gen_system/$(DEBUG_DIR)libgen_system.a
172 COMLIB += $(OCGDIR)/kernel/gen_messaging/$(DEBUG_DIR)libgen_messaging.a
173 COMLIB += $(OCGDIR)/gameengine/ketsji/KXNetwork/$(DEBUG_DIR)libKXNetwork.a
174 COMLIB += $(OCGDIR)/gameengine/Network/$(DEBUG_DIR)libNetwork.a
175 COMLIB += $(OCGDIR)/gameengine/Network/LoopBackNetwork/$(DEBUG_DIR)libLoopBackNetwork.a
176 COMLIB += $(NAN_BULLET2)/lib/libbullet2.a
179 # Cloth requires bullet2, gameegine does not matter anymore
180 #COMLIB += $(NAN_BULLET2)/lib/libbullet2.a
182 COMLIB += $(OCGDIR)/blender/makesdna/$(DEBUG_DIR)libdna.a
183 COMLIB += $(NAN_GUARDEDALLOC)/lib/libguardedalloc.a
184 COMLIB += $(NAN_MEMUTIL)/lib/libmemutil.a
185 COMLIB += $(NAN_PNG)/lib/libpng.a
186 COMLIB += $(OCGDIR)/blender/python/$(DEBUG_DIR)libpython.a # This was a PULIB up to circa r25248
187 COMLIB += $(OCGDIR)/blender/gen_python/$(DEBUG_DIR)libgen_python.a
188 COMLIB += $(OCGDIR)/blender/blenlib/$(DEBUG_DIR)libblenlib.a
191 ifeq ($(WITH_QUICKTIME), true)
192 COMLIB += $(OCGDIR)/blender/blenderqt/$(DEBUG_DIR)libblenderqt.a
195 ifeq ($(WITH_OPENEXR), true)
196 COMLIB += $(OCGDIR)/blender/imbuf/openexr/$(DEBUG_DIR)libopenexr.a
199 ifeq ($(WITH_OPENJPEG), true)
200 ifndef BF_OPENJPEG_LIBS
201 COMLIB += $(OCGDIR)/extern/openjpeg/$(DEBUG_DIR)libopenjpeg.a
203 COMLIB += $(BF_OPENJPEG_LIBS)
207 COMLIB += $(OCGDIR)/blender/imbuf/cineon/$(DEBUG_DIR)libcineon.a
209 ifeq ($(WITH_DDS), true)
210 COMLIB += $(OCGDIR)/blender/imbuf/dds/$(DEBUG_DIR)libdds.a
213 ifeq ($(WITH_BINRELOC), true)
214 COMLIB += $(OCGDIR)/extern/binreloc/$(DEBUG_DIR)libbinreloc.a
217 ifeq ($(WITH_OPENCOLLADA), true)
218 COMLIB += $(OCGDIR)/blender/bf_collada/$(DEBUG_DIR)/libbf_collada.a
219 COMLIB += $(BF_PCRE_LIBS)
222 ifeq ($(OS), windows)
223 ifeq ($(FREE_WINDOWS), true)
224 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
226 COMLIB += $(NAN_FREETYPE)/lib/freetype2ST.lib
230 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
232 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
237 COMLIB += $(NAN_SDL)/lib/libSDL.a
240 ifeq ($(OS), windows)
241 ifeq ($(FREE_WINDOWS), true)
242 COMLIB += $(NAN_SDL)/lib/libSDL.a
243 COMLIB += $(NAN_PTHREADS)/lib/libpthreadGC2.a
245 COMLIB += $(NAN_SDL)/lib/SDL.lib
249 ifeq ($(WITH_OPENEXR), true)
250 COMLIB += $(NAN_OPENEXR_LIBS)
253 # note: space_api.a in begin of editors, screen.a in end
254 PULIB = $(NAN_MOTO)/lib/libmoto.a
255 PULIB += $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
256 PULIB += $(OCGDIR)/blender/ed_space/$(DEBUG_DIR)libed_space.a
257 PULIB += $(OCGDIR)/blender/ed_sound/$(DEBUG_DIR)libed_sound.a
258 PULIB += $(OCGDIR)/blender/ed_action/$(DEBUG_DIR)libed_action.a
259 PULIB += $(OCGDIR)/blender/ed_nla/$(DEBUG_DIR)libed_nla.a
260 PULIB += $(OCGDIR)/blender/ed_script/$(DEBUG_DIR)libed_script.a
261 PULIB += $(OCGDIR)/blender/ed_text/$(DEBUG_DIR)libed_text.a
262 PULIB += $(OCGDIR)/blender/ed_logic/$(DEBUG_DIR)libed_logic.a
263 PULIB += $(OCGDIR)/blender/ed_sequencer/$(DEBUG_DIR)libed_sequencer.a
264 PULIB += $(OCGDIR)/blender/ed_file/$(DEBUG_DIR)libed_file.a
265 PULIB += $(OCGDIR)/blender/ed_info/$(DEBUG_DIR)libed_info.a
266 PULIB += $(OCGDIR)/blender/ed_buttons/$(DEBUG_DIR)libed_buttons.a
267 PULIB += $(OCGDIR)/blender/ed_graph/$(DEBUG_DIR)libed_graph.a
268 PULIB += $(OCGDIR)/blender/ed_node/$(DEBUG_DIR)libed_node.a
269 PULIB += $(OCGDIR)/blender/ed_outliner/$(DEBUG_DIR)libed_outliner.a
270 PULIB += $(OCGDIR)/blender/ed_time/$(DEBUG_DIR)libed_time.a
271 PULIB += $(OCGDIR)/blender/ed_render/$(DEBUG_DIR)libed_render.a
272 PULIB += $(OCGDIR)/blender/ed_view3d/$(DEBUG_DIR)libed_view3d.a
273 PULIB += $(OCGDIR)/blender/ed_interface/$(DEBUG_DIR)libed_interface.a
274 PULIB += $(OCGDIR)/blender/ed_object/$(DEBUG_DIR)libed_object.a
275 PULIB += $(OCGDIR)/blender/ed_curve/$(DEBUG_DIR)libed_curve.a
276 PULIB += $(OCGDIR)/blender/ed_metaball/$(DEBUG_DIR)libed_metaball.a
277 PULIB += $(OCGDIR)/blender/ed_armature/$(DEBUG_DIR)libed_armature.a
278 PULIB += $(OCGDIR)/blender/ed_mesh/$(DEBUG_DIR)libed_mesh.a
279 PULIB += $(OCGDIR)/blender/ed_sculpt_paint/$(DEBUG_DIR)libed_sculpt_paint.a
280 PULIB += $(OCGDIR)/blender/ed_physics/$(DEBUG_DIR)libed_physics.a
281 PULIB += $(OCGDIR)/blender/ed_animation/$(DEBUG_DIR)libed_animation.a
282 PULIB += $(OCGDIR)/blender/ed_transform/$(DEBUG_DIR)libed_transform.a
283 PULIB += $(OCGDIR)/blender/ed_util/$(DEBUG_DIR)libed_util.a
284 PULIB += $(OCGDIR)/blender/ed_datafiles/$(DEBUG_DIR)libed_datafiles.a
285 PULIB += $(OCGDIR)/blender/ed_image/$(DEBUG_DIR)libed_image.a
286 PULIB += $(OCGDIR)/blender/ed_uvedit/$(DEBUG_DIR)libed_uvedit.a
287 PULIB += $(OCGDIR)/blender/ed_screen/$(DEBUG_DIR)libed_screen.a
288 PULIB += $(OCGDIR)/blender/ed_console/$(DEBUG_DIR)libed_console.a
289 PULIB += $(OCGDIR)/blender/ed_userpref/$(DEBUG_DIR)libed_userpref.a
290 PULIB += $(OCGDIR)/blender/ed_gpencil/$(DEBUG_DIR)libed_gpencil.a
291 PULIB += $(OCGDIR)/blender/ed_opsound/$(DEBUG_DIR)libed_opsound.a
292 PULIB += $(OCGDIR)/blender/windowmanager/$(DEBUG_DIR)libwindowmanager.a
293 PULIB += $(OCGDIR)/blender/makesrna/$(DEBUG_DIR)librna.a
294 # note, no idea but it suddenly doesn't compile :(
295 PULIB += $(OCGDIR)/blender/blenlib/$(DEBUG_DIR)libblenlib.a
296 PULIB += $(NAN_OPENNL)/lib/$(DEBUG_DIR)libopennl.a
297 PULIB += $(NAN_ELBEEM)/lib/$(DEBUG_DIR)libelbeem.a
298 PULIB += $(NAN_SMOKE)/lib/$(DEBUG_DIR)libsmoke.a
300 ifeq ($(NAN_NO_KETSJI),true)
301 PULIB += $(NAN_MOTO)/lib/$(DEBUG_DIR)libmoto.a
302 PULIB += $(OCGDIR)/kernel/gen_system/$(DEBUG_DIR)libgen_system.a
303 PULIB += $(OCGDIR)/kernel/gen_messaging/$(DEBUG_DIR)libgen_messaging.a
304 COMLIB += $(NAN_SND_LIBS)
307 SPLIB1 = $(OCGDIR)/gameengine/GamePlayer/ghost/$(DEBUG_DIR)libghost.a
308 SPLIB1 += $(OCGDIR)/gameengine/GamePlayer/common/$(DEBUG_DIR)libcommon.a
309 SPLIB1 += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
310 SPLIB1 += $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
311 SPLIB1 += $(NAN_GHOST)/lib/$(DEBUG_DIR)libghost.a
313 SPLIB = $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
314 # this is used for the plugin. It uses some things from libz.a,
315 # but somehow it consistently fails to resolve these symbols... or
316 # can I just not check them? nm claims they aren't...
317 SPLIB += $(OCGDIR)/blender/blenkernel/blenkernel_blc/$(DEBUG_DIR)libblenkernel_blc.a
318 SPLIB += $(OCGDIR)/blender/makesrna/$(DEBUG_DIR)librna.a
319 SPLIB += $(OCGDIR)/blender/blenlib/$(DEBUG_DIR)libblenlib.a
321 # These three need to be explicitly mentioned on the cl, because
322 # if they are offered as a lib, they are optimized away. (nzc)
323 NSPLUGLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)UnixShell.o
324 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)stubs.o
325 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)winstubs.o
326 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)Blender3DPlugin_native_implementation.o
328 # Here you can configure what sort of test to make for the plugin.
329 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_stub.a
330 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_colorcycle.a
331 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_gears.a
332 PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_threaded_gears.a
334 # XPCOM is done only for Linux for now
335 ifeq ($(OS),$(findstring $(OS), "linux"))
337 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)XPH_xpcom_hooks.o
341 PLUGAPPLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)libplugin_ketsji_hooks.a
343 ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
344 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)PLG_X11_windowing.o
345 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/unix/$(DEBUG_DIR)libunix.a
347 ifeq ($(OS),$(findstring $(OS), "windows"))
348 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)PLG_MSWindows_windowing.o
349 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)npB3DPlg.res
350 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/windows/$(DEBUG_DIR)libwindows.a
353 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/$(DEBUG_DIR)libcommon.a
355 ifeq ($(OS),$(findstring $(OS), "linux"))
357 PLUGAPPLIB_XPLINK = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)_Blender3DPlugin_implementation_.o
361 # A bit silly... but needed to resolve symbols.
362 PLUGREMLIB = $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
364 ######################## OS dependencies (alphabetic!) ################
368 ifeq ($(NAN_JUST_BLENDERDYNAMIC),true)
369 BINTARGETS = blenderdynamic
372 ifeq ($(WITH_BF_DYNAMICOPENGL), true)
373 BINTARGETS += blenderdynamic
376 ifeq ($(WITH_BF_STATICOPENGL), true)
377 BINTARGETS += blenderstatic
380 ifeq ($(WITH_BF_BLENDERPLAYER), true)
381 export WITH_BF_GAMEENGINE=true
382 BINTARGETS += blenderplayer
385 ifeq ($(WITH_BF_WEBPLUGIN), true)
394 ifeq ($(WITH_OPENAL),true)
395 ifeq ($(OS),$(findstring $(OS), "freebsd linux windows"))
396 ifeq ($(CPU),$(findstring $(CPU), "i386 powerpc x86_64 parisc64"))
397 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
400 NAN_SND_LIBS += $(NAN_OPENAL)/lib/openal_static.lib
405 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
407 ifeq ($(OS), solaris)
408 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
414 ifeq ($(WITH_JACK),true)
415 ifeq ($(OS),$(findstring $(OS), "linux"))
416 NAN_SND_LIBS += $(NAN_JACKLIBS)
420 ifeq ($(WITH_SNDFILE),true)
421 ifeq ($(OS),$(findstring $(OS), "linux"))
422 NAN_SND_LIBS += $(NAN_SNDFILELIBS)
428 # Might need to change this to $(NAN_MOZILLA_LIB)/nspr4.lib
429 NSPLUGLIB += $(NAN_NSPR)/lib/nspr4.lib
431 BINTARGETS = blenderdynamic
432 ifeq ($(FREE_WINDOWS),true)
433 ifneq ($(NAN_NO_KETSJI),true)
434 BINTARGETS += blenderplayer
437 BINTARGETS += blenderplayer
438 BINTARGETS += blenderdynplayer
442 PULIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winblender.res
443 PULIB += $(NAN_ZLIB)/lib/libz.a
444 SPLIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winblender.res
445 SPLIB += $(NAN_ZLIB)/lib/libz.a
449 # prepare for NAN_BUILDINFO compile at the *sigh* link rules below
454 include nan_compile.mk
457 ################## target rules ########################
460 @echo "****> Make $@ by $(ID)@$(HOST) at $(MAKE_START) on $(CONFIG_GUESS)"
462 @for n in $(NANENV); do \
470 include nan_subdirs.mk
472 ################## target rules ########################
477 @$(MAKE) link DEBUG_DIR="debug/" NANENV=$(NANENV)
479 clean:: linkclean debuglinkclean
482 @echo "****> Build SVN rev $(BUILD_REV), $(MAKE_START) - `date '+%H:%M:%S %d-%b-%Y'`"
484 @for n in $(NANENV); do \
490 @$(RM) -r $(DIR)/blenderstatic* \
491 $(DIR)/blenderplayer* \
495 @$(RM) -r $(DIR)/debug/blenderstatic* \
496 $(DIR)/debug/blenderplayer* \
499 # Shortcut for Tinderbox release builds. Mortals don't use this.
501 @$(MAKE) -C ../release/ all || exit 1;
503 ############### Linker rules ###############
505 blenderstatic: $(DIR)/$(DEBUG_DIR)bin/blenderstatic
506 blenderdynamic: $(DIR)/$(DEBUG_DIR)bin/blender$(EXT)
507 blenderplayer: $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT)
508 blenderdynplayer: $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT)
510 # XPCOM connector only for linux so far...
512 xplink: $(DIR)/$(DEBUG_DIR)bin/Blender3DPlugin$(SOEXT)
516 ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
517 plugin: $(DIR)/$(DEBUG_DIR)bin/npBlender3DPlugin$(SOEXT)
518 ptest: $(DIR)/$(DEBUG_DIR)bin/npTestPlugin$(SOEXT)
520 # Windows needs a 8.3 name... Why? Dunno...
522 ifneq ($(FREE_WINDOWS),true)
523 plugin: $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT)
527 $(DIR)/$(DEBUG_DIR)bin/blenderstatic: $(OBJS) $(GRPLIB) $(PULIB) $(COMLIB)
528 @echo "****> Link $@"
530 $(CCC) $(CCFLAGS) $(REL_CCFLAGS) -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
532 mkdir -p $(DIR)/$(DEBUG_DIR)bin
533 $(CCC) $(CCFLAGS) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderstatic $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(PULIB) $(COMLIB) $(LLIBS) $(SADD) $(LOPTS)
535 /bin/rm $(BUILDINFO_O)
538 @$(MAKE) -C darwin/ APPLICATION=blenderstatic
541 $(DIR)/$(DEBUG_DIR)bin/blender$(EXT): $(OBJS) $(GRPLIB) $(PULIB) $(COMLIB)
542 @echo "****> Link $@"
544 $(CCC) $(CCFLAGS) $(REL_CCFLAGS) -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
546 mkdir -p $(DIR)/$(DEBUG_DIR)bin
547 $(CCC) $(CCFLAGS) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blender$(EXT) $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(PULIB) $(COMLIB) $(LLIBS) $(DADD) $(LOPTS)
549 /bin/rm $(BUILDINFO_O)
552 @$(MAKE) -C darwin/ APPLICATION=blender
555 $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT): $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB)
556 @echo "****> Link $@"
558 $(CCC) $(CCFLAGS) $(REL_CCFLAGS) -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) $(CCFLAGS) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(LLIBS) $(DADD) $(LOPTS)
563 /bin/rm $(BUILDINFO_O)
566 @$(MAKE) -C darwin/ APPLICATION=blenderplayer
569 $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT): $(OBJS) $(COMLIB) $(SPLIB)
570 @echo "****> Link $@"
572 $(CCC) $(CCFLAGS) $(REL_CCFLAGS) -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) $(CCFLAGS) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(LLIBS) $(DADD) $(LOPTS)
577 /bin/rm $(BUILDINFO_O)
580 @$(MAKE) -C darwin/ APPLICATION=blenderplayer
583 $(DIR)/$(DEBUG_DIR)bin/Blender3DPlugin$(SOEXT): $(PLUGAPPLIB_XPLINK)
584 @echo "****> Link $@"
586 $(CCC) $(CCFLAGS) $(REL_CCFLAGS) -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) $(CCFLAGS) $(DYNLDFLAGS) -o $@ $(PLUGAPPLIB_XPLINK) $(LOPTS)
591 /bin/rm $(BUILDINFO_O)
594 # Windows build needs a def file? Why? For exposing functions from the
595 # dll to the outside world. However, this is alsi done internally..
596 DEFFILE = ./gameengine/GamePlayer/netscape/src/npB3DPlg.def
598 # Windows needs a specific name format for dll.s so we give it one.
599 $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
600 @echo "****> Link $@"
602 $(CCC) $(CCFLAGS) $(REL_CCFLAGS) -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
604 # $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS)
605 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS) /def:$(DEFFILE)
607 /bin/rm $(BUILDINFO_O)
610 $(DIR)/$(DEBUG_DIR)bin/npBlender3DPlugin$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
611 @echo "****> Link $@"
613 $(CCC) $(CCFLAGS) $(REL_CCFLAGS) -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
615 mkdir -p $(DIR)/$(DEBUG_DIR)bin
616 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS)
618 /bin/rm $(BUILDINFO_O)
621 $(DIR)/$(DEBUG_DIR)bin/npTestPlugin$(SOEXT): $(NSPLUGLIB)
622 @echo "****> Link $@"
624 $(CCC) $(CCFLAGS) $(REL_CCFLAGS) -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
626 mkdir -p $(DIR)/$(DEBUG_DIR)bin
627 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGTESTLIB) $(LLIBS) $(DADD) $(LOPTS)
629 /bin/rm $(BUILDINFO_O)