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/blenlib/$(DEBUG_DIR)libblenlib.a
100 COMLIB += $(OCGDIR)/blender/ikplugin/$(DEBUG_DIR)libikplugin.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_DECIMATION)/lib/$(DEBUG_DIR)libdecimation.a
123 ifeq ($(WITH_FFMPEG),true)
124 COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_ffmpeg.a
127 ifeq ($(WITH_OPENAL),true)
128 COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_openal.a
131 ifeq ($(WITH_JACK),true)
132 COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_jack.a
135 ifeq ($(WITH_SNDFILE),true)
136 COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_sndfile.a
139 ifneq ($(NAN_NO_KETSJI),true)
140 COMLIB += $(OCGDIR)/gameengine/bloutines/$(DEBUG_DIR)libbloutines.a
141 COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
142 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
143 COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
144 COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
145 COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
146 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
147 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
148 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
149 COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
150 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
151 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
152 COMLIB += $(OCGDIR)/gameengine/blphys/blbullet/$(DEBUG_DIR)libblbullet.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/logic/$(DEBUG_DIR)liblogic.a
157 COMLIB += $(OCGDIR)/gameengine/logic/Joystick/$(DEBUG_DIR)libJoystick.a
158 COMLIB += $(OCGDIR)/gameengine/rasterizer/$(DEBUG_DIR)librasterizer.a
159 COMLIB += $(OCGDIR)/gameengine/OpenGLrasterizer/$(DEBUG_DIR)libOpenGLrasterizer.a
160 COMLIB += $(OCGDIR)/gameengine/expression/$(DEBUG_DIR)libexpression.a
161 COMLIB += $(OCGDIR)/gameengine/scenegraph/$(DEBUG_DIR)libscenegraph.a
162 COMLIB += $(OCGDIR)/gameengine/videotex/$(DEBUG_DIR)libvideotex.a
163 COMLIB += $(NAN_MOTO)/lib/libmoto.a
164 COMLIB += $(NAN_SND_LIBS)
165 COMLIB += $(OCGDIR)/kernel/gen_system/$(DEBUG_DIR)libgen_system.a
166 COMLIB += $(OCGDIR)/kernel/gen_messaging/$(DEBUG_DIR)libgen_messaging.a
167 COMLIB += $(OCGDIR)/gameengine/ketsji/KXNetwork/$(DEBUG_DIR)libKXNetwork.a
168 COMLIB += $(OCGDIR)/gameengine/Network/$(DEBUG_DIR)libNetwork.a
169 COMLIB += $(OCGDIR)/gameengine/Network/LoopBackNetwork/$(DEBUG_DIR)libLoopBackNetwork.a
170 COMLIB += $(NAN_BULLET2)/lib/libbullet2.a
173 # Cloth requires bullet2, gameegine does not matter anymore
174 #COMLIB += $(NAN_BULLET2)/lib/libbullet2.a
176 COMLIB += $(OCGDIR)/blender/makesdna/$(DEBUG_DIR)libdna.a
177 COMLIB += $(NAN_GUARDEDALLOC)/lib/libguardedalloc.a
178 COMLIB += $(NAN_MEMUTIL)/lib/libmemutil.a
179 COMLIB += $(NAN_PNG)/lib/libpng.a
180 COMLIB += $(OCGDIR)/blender/python/$(DEBUG_DIR)libpython.a # This was a PULIB up to circa r25248
181 COMLIB += $(OCGDIR)/blender/gen_python/$(DEBUG_DIR)libgen_python.a
183 ifeq ($(WITH_QUICKTIME), true)
184 COMLIB += $(OCGDIR)/blender/blenderqt/$(DEBUG_DIR)libblenderqt.a
187 ifeq ($(WITH_OPENEXR), true)
188 COMLIB += $(OCGDIR)/blender/imbuf/openexr/$(DEBUG_DIR)libopenexr.a
191 ifeq ($(WITH_OPENJPEG), true)
192 ifndef BF_OPENJPEG_LIBS
193 COMLIB += $(OCGDIR)/extern/openjpeg/$(DEBUG_DIR)libopenjpeg.a
195 COMLIB += $(BF_OPENJPEG_LIBS)
199 COMLIB += $(OCGDIR)/blender/imbuf/cineon/$(DEBUG_DIR)libcineon.a
201 ifeq ($(WITH_DDS), true)
202 COMLIB += $(OCGDIR)/blender/imbuf/dds/$(DEBUG_DIR)libdds.a
205 ifeq ($(WITH_BINRELOC), true)
206 COMLIB += $(OCGDIR)/extern/binreloc/$(DEBUG_DIR)libbinreloc.a
209 ifeq ($(OS), windows)
210 ifeq ($(FREE_WINDOWS), true)
211 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
213 COMLIB += $(NAN_FREETYPE)/lib/freetype2ST.lib
217 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
219 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
224 COMLIB += $(NAN_SDL)/lib/libSDL.a
227 ifeq ($(OS), windows)
228 ifeq ($(FREE_WINDOWS), true)
229 COMLIB += $(NAN_SDL)/lib/libSDL.a
230 COMLIB += $(NAN_PTHREADS)/lib/libpthreadGC2.a
232 COMLIB += $(NAN_SDL)/lib/SDL.lib
236 ifeq ($(WITH_OPENEXR), true)
237 COMLIB += $(NAN_OPENEXR_LIBS)
240 # note: space_api.a in begin of editors, screen.a in end
241 PULIB = $(NAN_MOTO)/lib/libmoto.a
242 PULIB += $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
243 PULIB += $(OCGDIR)/blender/ed_space/$(DEBUG_DIR)libed_space.a
244 PULIB += $(OCGDIR)/blender/ed_sound/$(DEBUG_DIR)libed_sound.a
245 PULIB += $(OCGDIR)/blender/ed_action/$(DEBUG_DIR)libed_action.a
246 PULIB += $(OCGDIR)/blender/ed_nla/$(DEBUG_DIR)libed_nla.a
247 PULIB += $(OCGDIR)/blender/ed_script/$(DEBUG_DIR)libed_script.a
248 PULIB += $(OCGDIR)/blender/ed_text/$(DEBUG_DIR)libed_text.a
249 PULIB += $(OCGDIR)/blender/ed_logic/$(DEBUG_DIR)libed_logic.a
250 PULIB += $(OCGDIR)/blender/ed_sequencer/$(DEBUG_DIR)libed_sequencer.a
251 PULIB += $(OCGDIR)/blender/ed_file/$(DEBUG_DIR)libed_file.a
252 PULIB += $(OCGDIR)/blender/ed_info/$(DEBUG_DIR)libed_info.a
253 PULIB += $(OCGDIR)/blender/ed_buttons/$(DEBUG_DIR)libed_buttons.a
254 PULIB += $(OCGDIR)/blender/ed_graph/$(DEBUG_DIR)libed_graph.a
255 PULIB += $(OCGDIR)/blender/ed_node/$(DEBUG_DIR)libed_node.a
256 PULIB += $(OCGDIR)/blender/ed_outliner/$(DEBUG_DIR)libed_outliner.a
257 PULIB += $(OCGDIR)/blender/ed_time/$(DEBUG_DIR)libed_time.a
258 PULIB += $(OCGDIR)/blender/ed_render/$(DEBUG_DIR)libed_render.a
259 PULIB += $(OCGDIR)/blender/ed_view3d/$(DEBUG_DIR)libed_view3d.a
260 PULIB += $(OCGDIR)/blender/ed_interface/$(DEBUG_DIR)libed_interface.a
261 PULIB += $(OCGDIR)/blender/ed_object/$(DEBUG_DIR)libed_object.a
262 PULIB += $(OCGDIR)/blender/ed_curve/$(DEBUG_DIR)libed_curve.a
263 PULIB += $(OCGDIR)/blender/ed_metaball/$(DEBUG_DIR)libed_metaball.a
264 PULIB += $(OCGDIR)/blender/ed_armature/$(DEBUG_DIR)libed_armature.a
265 PULIB += $(OCGDIR)/blender/ed_mesh/$(DEBUG_DIR)libed_mesh.a
266 PULIB += $(OCGDIR)/blender/ed_sculpt_paint/$(DEBUG_DIR)libed_sculpt_paint.a
267 PULIB += $(OCGDIR)/blender/ed_physics/$(DEBUG_DIR)libed_physics.a
268 PULIB += $(OCGDIR)/blender/ed_animation/$(DEBUG_DIR)libed_animation.a
269 PULIB += $(OCGDIR)/blender/ed_transform/$(DEBUG_DIR)libed_transform.a
270 PULIB += $(OCGDIR)/blender/ed_util/$(DEBUG_DIR)libed_util.a
271 PULIB += $(OCGDIR)/blender/ed_datafiles/$(DEBUG_DIR)libed_datafiles.a
272 PULIB += $(OCGDIR)/blender/ed_image/$(DEBUG_DIR)libed_image.a
273 PULIB += $(OCGDIR)/blender/ed_uvedit/$(DEBUG_DIR)libed_uvedit.a
274 PULIB += $(OCGDIR)/blender/ed_screen/$(DEBUG_DIR)libed_screen.a
275 PULIB += $(OCGDIR)/blender/ed_console/$(DEBUG_DIR)libed_console.a
276 PULIB += $(OCGDIR)/blender/ed_userpref/$(DEBUG_DIR)libed_userpref.a
277 PULIB += $(OCGDIR)/blender/ed_gpencil/$(DEBUG_DIR)libed_gpencil.a
278 PULIB += $(OCGDIR)/blender/ed_opsound/$(DEBUG_DIR)libed_opsound.a
279 PULIB += $(OCGDIR)/blender/windowmanager/$(DEBUG_DIR)libwindowmanager.a
280 PULIB += $(OCGDIR)/blender/makesrna/$(DEBUG_DIR)librna.a
281 # note, no idea but it suddenly doesn't compile :(
282 PULIB += $(OCGDIR)/blender/blenlib/$(DEBUG_DIR)libblenlib.a
283 PULIB += $(NAN_OPENNL)/lib/$(DEBUG_DIR)libopennl.a
284 PULIB += $(NAN_ELBEEM)/lib/$(DEBUG_DIR)libelbeem.a
285 PULIB += $(NAN_SMOKE)/lib/$(DEBUG_DIR)libsmoke.a
287 ifeq ($(NAN_NO_KETSJI),true)
288 PULIB += $(NAN_MOTO)/lib/$(DEBUG_DIR)libmoto.a
289 PULIB += $(OCGDIR)/kernel/gen_system/$(DEBUG_DIR)libgen_system.a
290 PULIB += $(OCGDIR)/kernel/gen_messaging/$(DEBUG_DIR)libgen_messaging.a
291 COMLIB += $(NAN_SND_LIBS)
294 SPLIB1 = $(OCGDIR)/gameengine/GamePlayer/ghost/$(DEBUG_DIR)libghost.a
295 SPLIB1 += $(OCGDIR)/gameengine/GamePlayer/common/$(DEBUG_DIR)libcommon.a
296 SPLIB1 += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
297 SPLIB1 += $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
298 SPLIB1 += $(NAN_GHOST)/lib/$(DEBUG_DIR)libghost.a
300 SPLIB = $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
301 # this is used for the plugin. It uses some things from libz.a,
302 # but somehow it consistently fails to resolve these symbols... or
303 # can I just not check them? nm claims they aren't...
304 SPLIB += $(OCGDIR)/blender/blenkernel/blenkernel_blc/$(DEBUG_DIR)libblenkernel_blc.a
305 SPLIB += $(OCGDIR)/blender/makesrna/$(DEBUG_DIR)librna.a
306 SPLIB += $(OCGDIR)/blender/blenlib/$(DEBUG_DIR)libblenlib.a
308 # These three need to be explicitly mentioned on the cl, because
309 # if they are offered as a lib, they are optimized away. (nzc)
310 NSPLUGLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)UnixShell.o
311 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)stubs.o
312 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)winstubs.o
313 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)Blender3DPlugin_native_implementation.o
315 # Here you can configure what sort of test to make for the plugin.
316 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_stub.a
317 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_colorcycle.a
318 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_gears.a
319 PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_threaded_gears.a
321 # XPCOM is done only for Linux for now
322 ifeq ($(OS),$(findstring $(OS), "linux"))
324 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)XPH_xpcom_hooks.o
328 PLUGAPPLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)libplugin_ketsji_hooks.a
330 ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
331 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)PLG_X11_windowing.o
332 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/unix/$(DEBUG_DIR)libunix.a
334 ifeq ($(OS),$(findstring $(OS), "windows"))
335 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)PLG_MSWindows_windowing.o
336 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)npB3DPlg.res
337 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/windows/$(DEBUG_DIR)libwindows.a
340 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/$(DEBUG_DIR)libcommon.a
342 ifeq ($(OS),$(findstring $(OS), "linux"))
344 PLUGAPPLIB_XPLINK = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)_Blender3DPlugin_implementation_.o
348 # A bit silly... but needed to resolve symbols.
349 PLUGREMLIB = $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
351 ######################## OS dependencies (alphabetic!) ################
355 ifeq ($(NAN_JUST_BLENDERDYNAMIC),true)
356 BINTARGETS = blenderdynamic
359 ifeq ($(WITH_BF_DYNAMICOPENGL), true)
360 BINTARGETS += blenderdynamic
363 ifeq ($(WITH_BF_STATICOPENGL), true)
364 BINTARGETS += blenderstatic
367 ifeq ($(WITH_BF_BLENDERPLAYER), true)
368 export WITH_BF_GAMEENGINE=true
369 BINTARGETS += blenderplayer
372 ifeq ($(WITH_BF_WEBPLUGIN), true)
382 PULIB += $(NAN_ZLIB)/lib/libz.a
383 SPLIB += $(NAN_ZLIB)/lib/libz.a
386 ifeq ($(WITH_OPENAL),true)
387 ifeq ($(OS),$(findstring $(OS), "freebsd linux windows"))
388 ifeq ($(CPU),$(findstring $(CPU), "i386 powerpc x86_64 parisc64"))
389 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
392 NAN_SND_LIBS += $(NAN_OPENAL)/lib/openal_static.lib
397 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
399 ifeq ($(OS), solaris)
400 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
406 ifeq ($(WITH_JACK),true)
407 ifeq ($(OS),$(findstring $(OS), "linux"))
408 NAN_SND_LIBS += $(NAN_JACKLIBS)
412 ifeq ($(WITH_SNDFILE),true)
413 ifeq ($(OS),$(findstring $(OS), "linux"))
414 NAN_SND_LIBS += $(NAN_SNDFILELIBS)
420 # Might need to change this to $(NAN_MOZILLA_LIB)/nspr4.lib
421 NSPLUGLIB += $(NAN_NSPR)/lib/nspr4.lib
423 BINTARGETS = blenderdynamic
424 ifeq ($(FREE_WINDOWS),true)
425 ifneq ($(NAN_NO_KETSJI),true)
426 BINTARGETS += blenderplayer
429 BINTARGETS += blenderplayer
430 BINTARGETS += blenderdynplayer
434 PULIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winblender.res
435 PULIB += $(NAN_ZLIB)/lib/libz.a
436 SPLIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winblender.res
437 SPLIB += $(NAN_ZLIB)/lib/libz.a
441 # prepare for NAN_BUILDINFO compile at the *sigh* link rules below
446 include nan_compile.mk
449 ################## target rules ########################
452 @echo "****> Make $@ by $(ID)@$(HOST) at $(MAKE_START) on $(CONFIG_GUESS)"
454 @for n in $(NANENV); do \
462 include nan_subdirs.mk
464 ################## target rules ########################
469 @$(MAKE) link DEBUG_DIR="debug/" NANENV=$(NANENV)
471 clean:: linkclean debuglinkclean
474 @echo "****> Build $(MAKE_START) - `date '+%H:%M:%S %d-%b-%Y'`"
476 @for n in $(NANENV); do \
482 @$(RM) -r $(DIR)/blenderstatic* \
483 $(DIR)/blenderplayer* \
487 @$(RM) -r $(DIR)/debug/blenderstatic* \
488 $(DIR)/debug/blenderplayer* \
491 # Shortcut for Tinderbox release builds. Mortals don't use this.
493 @$(MAKE) -C ../release/ all || exit 1;
495 ############### Linker rules ###############
497 blenderstatic: $(DIR)/$(DEBUG_DIR)bin/blenderstatic
498 blenderdynamic: $(DIR)/$(DEBUG_DIR)bin/blender$(EXT)
499 blenderplayer: $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT)
500 blenderdynplayer: $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT)
502 # XPCOM connector only for linux so far...
504 xplink: $(DIR)/$(DEBUG_DIR)bin/Blender3DPlugin$(SOEXT)
508 ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
509 plugin: $(DIR)/$(DEBUG_DIR)bin/npBlender3DPlugin$(SOEXT)
510 ptest: $(DIR)/$(DEBUG_DIR)bin/npTestPlugin$(SOEXT)
512 # Windows needs a 8.3 name... Why? Dunno...
514 ifneq ($(FREE_WINDOWS),true)
515 plugin: $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT)
519 $(DIR)/$(DEBUG_DIR)bin/blenderstatic: $(OBJS) $(GRPLIB) $(PULIB) $(COMLIB)
520 @echo "****> Link $@"
522 $(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
524 mkdir -p $(DIR)/$(DEBUG_DIR)bin
525 $(CCC) $(CCFLAGS) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderstatic $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(PULIB) $(COMLIB) $(LLIBS) $(SADD) $(LOPTS)
527 /bin/rm $(BUILDINFO_O)
530 @$(MAKE) -C darwin/ APPLICATION=blenderstatic
533 $(DIR)/$(DEBUG_DIR)bin/blender$(EXT): $(OBJS) $(GRPLIB) $(PULIB) $(COMLIB)
534 @echo "****> Link $@"
536 $(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
538 mkdir -p $(DIR)/$(DEBUG_DIR)bin
539 $(CCC) $(CCFLAGS) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blender$(EXT) $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(PULIB) $(COMLIB) $(LLIBS) $(DADD) $(LOPTS)
541 /bin/rm $(BUILDINFO_O)
544 @$(MAKE) -C darwin/ APPLICATION=blender
547 $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT): $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB)
548 @echo "****> Link $@"
550 $(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
552 mkdir -p $(DIR)/$(DEBUG_DIR)bin
553 $(CCC) $(CCFLAGS) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(LLIBS) $(DADD) $(LOPTS)
555 /bin/rm $(BUILDINFO_O)
558 @$(MAKE) -C darwin/ APPLICATION=blenderplayer
561 $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT): $(OBJS) $(COMLIB) $(SPLIB)
562 @echo "****> Link $@"
564 $(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
566 mkdir -p $(DIR)/$(DEBUG_DIR)bin
567 $(CCC) $(CCFLAGS) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(LLIBS) $(DADD) $(LOPTS)
569 /bin/rm $(BUILDINFO_O)
572 @$(MAKE) -C darwin/ APPLICATION=blenderplayer
575 $(DIR)/$(DEBUG_DIR)bin/Blender3DPlugin$(SOEXT): $(PLUGAPPLIB_XPLINK)
576 @echo "****> Link $@"
578 $(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
580 mkdir -p $(DIR)/$(DEBUG_DIR)bin
581 $(CCC) $(CCFLAGS) $(DYNLDFLAGS) -o $@ $(PLUGAPPLIB_XPLINK) $(LOPTS)
583 /bin/rm $(BUILDINFO_O)
586 # Windows build needs a def file? Why? For exposing functions from the
587 # dll to the outside world. However, this is alsi done internally..
588 DEFFILE = ./gameengine/GamePlayer/netscape/src/npB3DPlg.def
590 # Windows needs a specific name format for dll.s so we give it one.
591 $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
592 @echo "****> Link $@"
594 $(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
596 # $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS)
597 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS) /def:$(DEFFILE)
599 /bin/rm $(BUILDINFO_O)
602 $(DIR)/$(DEBUG_DIR)bin/npBlender3DPlugin$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
603 @echo "****> Link $@"
605 $(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
607 mkdir -p $(DIR)/$(DEBUG_DIR)bin
608 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS)
610 /bin/rm $(BUILDINFO_O)
613 $(DIR)/$(DEBUG_DIR)bin/npTestPlugin$(SOEXT): $(NSPLUGLIB)
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 mkdir -p $(DIR)/$(DEBUG_DIR)bin
619 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGTESTLIB) $(LLIBS) $(DADD) $(LOPTS)
621 /bin/rm $(BUILDINFO_O)