4 # ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License
8 # as published by the Free Software Foundation; either version 2
9 # of the License, or (at your option) any later version. The Blender
10 # Foundation also sells licenses for use in proprietary software under
11 # the Blender License. See http://www.blender.org/BL/ for information
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software Foundation,
21 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 # The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
24 # All rights reserved.
26 # The Original Code is: all of this file.
28 # Contributor(s): none yet.
30 # ***** END GPL/BL DUAL LICENSE BLOCK *****
32 # Top level makefile. Start looping through subdirs and link....
36 export NANENV := $(shell env | grep NAN_)
39 include nan_definitions.mk
41 DIRS = creator blender kernel gameengine
47 ########## buildinfo kludge ###################
48 CPPFLAGS += -I../Physics/common
49 CPPFLAGS += -I../Physics/Dummy
51 BUILDINFO_O = $(DIR)/$(DEBUG_DIR)buildinfo.o
52 BUILDINFO_C = $(SRCHOME)/creator/buildinfo.c
53 BUILD_DATE := $(shell date "+%Y-%m-%d")
54 BUILD_TIME := $(shell date "+%H:%M:%S")
57 ############# set pyplayerlib ##################
59 PYPLAYERLIB ?= $(PYLIB)
61 ############# libraries ##################
62 # COMLIB COMmon LIBraries for all targets
63 # BPLIB Browser Plugin LIBraries
64 # SPLIB1 Standalone Player LIBraries (pre COMLIB)
65 # SPLIB Standalone Player LIBraries (post COMLIB)
66 # PULIB PUblisher LIBraries
67 # GRPLIB Gui and Render LIBraries for Publisher
68 # LLIBS dynamic system libraries
69 # SADD Static OpenGL libraries
70 # DADD Dynamic OpenGL libraries
71 # NSPLUGLIB PLUGin LIBraries for ns-style api
72 # PLUGAPPLIB libs that form the application to be plugged in
73 # Note: the order is important here
75 GRPLIB = $(OCGDIR)/creator/$(DEBUG_DIR)libcreator.a
76 GRPLIB += $(OCGDIR)/blender/src/$(DEBUG_DIR)libsrcpublisher.a
77 GRPLIB += $(OCGDIR)/blender/misc/$(DEBUG_DIR)libmisc.a
78 GRPLIB += $(OCGDIR)/blender/radiosity/$(DEBUG_DIR)libradiosity.a
79 GRPLIB += $(NAN_DECIMATION)/lib/libdecimation.a
80 GRPLIB += $(NAN_BSP)/lib/$(DEBUG_DIR)libbsp.a
81 GRPLIB += $(NAN_GHOST)/lib/$(DEBUG_DIR)libghost.a
82 GRPLIB += $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
83 GRPLIB += $(OCGDIR)/blender/img/$(DEBUG_DIR)libimg.a
84 GRPLIB += $(OCGDIR)/blender/renderconverter/$(DEBUG_DIR)librenderconverter.a
85 GRPLIB += $(OCGDIR)/blender/render/$(DEBUG_DIR)librender.a
86 GRPLIB += $(OCGDIR)/blender/bpython/$(DEBUG_DIR)libbpython.a
87 GRPLIB += $(OCGDIR)/blender/bpython/$(DEBUG_DIR)libfrozen.a
89 # nlin: the reason that some libraries appear more than once below is
90 # to handle circular dependencies in linking among libraries... some
91 # linkers (e.g. under Linux) need libs to be specified multiple times
92 # to properly resolve circular dependencies. ugly, but it works...
93 # the repeat entries could probably be trimmed down.
94 COMLIB = $(OCGDIR)/blender/blenkernel/$(DEBUG_DIR)libblenkernel.a
95 COMLIB += $(OCGDIR)/blender/blenloader/$(DEBUG_DIR)libblenloader.a
96 COMLIB += $(OCGDIR)/blender/blenpluginapi/$(DEBUG_DIR)libblenpluginapi.a
97 COMLIB += $(OCGDIR)/blender/imbuf/$(DEBUG_DIR)libimbuf.a
98 COMLIB += $(OCGDIR)/blender/blenlib/$(DEBUG_DIR)libblenlib.a
99 COMLIB += $(OCGDIR)/blender/avi/$(DEBUG_DIR)libavi.a
100 COMLIB += $(NAN_JPEG)/lib/libjpeg.a
101 COMLIB += $(OCGDIR)/gameengine/bloutines/$(DEBUG_DIR)libbloutines.a
102 COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
103 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
104 ifneq ($(OS),$(findstring $(OS), "irix"))
105 COMLIB += $(OCGDIR)/gameengine/blphys/blode/$(DEBUG_DIR)libblode.a
106 COMLIB += $(NAN_ODE)/lib/libode.a
108 # COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a
109 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
110 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
111 # COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a
112 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
113 COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
114 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
115 ifneq ($(OS),$(findstring $(OS), "irix"))
116 COMLIB += $(OCGDIR)/gameengine/blphys/blode/$(DEBUG_DIR)libblode.a
118 # COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.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/sumo/$(DEBUG_DIR)libsumo.a
122 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
123 COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
124 COMLIB += $(OCGDIR)/gameengine/logic/$(DEBUG_DIR)liblogic.a
125 COMLIB += $(OCGDIR)/gameengine/rasterizer/$(DEBUG_DIR)librasterizer.a
126 COMLIB += $(OCGDIR)/gameengine/OpenGLrasterizer/$(DEBUG_DIR)libOpenGLrasterizer.a
127 COMLIB += $(OCGDIR)/gameengine/expression/$(DEBUG_DIR)libexpression.a
128 COMLIB += $(OCGDIR)/gameengine/scenegraph/$(DEBUG_DIR)libscenegraph.a
129 # COMLIB += $(OCGDIR)/sumo/$(DEBUG_DIR)libfuzzics.a
130 # COMLIB += $(OCGDIR)/sumo/$(DEBUG_DIR)libsolid.a
131 COMLIB += $(NAN_MOTO)/lib/libmoto.a
132 COMLIB += $(NAN_SND_LIBS)
133 COMLIB += $(OCGDIR)/kernel/gen_system/$(DEBUG_DIR)libgen_system.a
134 COMLIB += $(OCGDIR)/kernel/gen_messaging/$(DEBUG_DIR)libgen_messaging.a
135 COMLIB += $(OCGDIR)/gameengine/ketsji/KXNetwork/$(DEBUG_DIR)libKXNetwork.a
136 COMLIB += $(OCGDIR)/gameengine/Network/$(DEBUG_DIR)libNetwork.a
137 COMLIB += $(OCGDIR)/gameengine/Network/LoopBackNetwork/$(DEBUG_DIR)libLoopBackNetwork.a
138 COMLIB += $(NAN_GUARDEDALLOC)/lib/libguardedalloc.a
139 COMLIB += $(NAN_BMFONT)/lib/$(DEBUG_DIR)libbmfont.a
140 COMLIB += $(NAN_PNG)/lib/libpng.a
142 PULIB = $(NAN_IKSOLVER)/lib/libiksolver.a
143 PULIB += $(NAN_MOTO)/lib/libmoto.a
144 PULIB += $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
145 PULIB += $(OCGDIR)/blender/readstreamglue/$(DEBUG_DIR)libreadstreamglue.a
146 PULIB += $(OCGDIR)/blender/writestreamglue/$(DEBUG_DIR)libwritestreamglue.a
147 # toggle 2 writestreamglue libs for the Uber-Publisher :)
148 #PULIB += $(OCGDIR)/blender/writestreamglueSTUB/$(DEBUG_DIR)libwritestreamglueSTUB.a
149 PULIB += $(OCGDIR)/blender/inflate/$(DEBUG_DIR)libinflate.a
150 PULIB += $(OCGDIR)/blender/deflate/$(DEBUG_DIR)libdeflate.a
151 PULIB += $(OCGDIR)/blender/encrypt/$(DEBUG_DIR)libencrypt.a
152 PULIB += $(OCGDIR)/blender/decrypt/$(DEBUG_DIR)libdecrypt.a
153 PULIB += $(OCGDIR)/blender/sign/$(DEBUG_DIR)libsign.a
154 PULIB += $(OCGDIR)/blender/verify/$(DEBUG_DIR)libverify.a
155 PULIB += $(OCGDIR)/blender/writeblenfile/$(DEBUG_DIR)libwriteblenfile.a
156 PULIB += $(OCGDIR)/blender/writestreamglue/$(DEBUG_DIR)libwritestreamglue.a
157 # toggle 2 writestreamglue libs for the Uber-Publisher :)
158 #PULIB += $(OCGDIR)/blender/writestreamglueSTUB/$(DEBUG_DIR)libwritestreamglueSTUB.a
159 PULIB += $(OCGDIR)/blender/readstreamglue/$(DEBUG_DIR)libreadstreamglue.a # KEY_dependkludge fix.. Remove me
160 PULIB += $(OCGDIR)/blender/src/$(DEBUG_DIR)libsrcpublisher.a
162 SPLIB1 = $(OCGDIR)/gameengine/GamePlayer/ghost/$(DEBUG_DIR)libghost.a
163 SPLIB1 += $(OCGDIR)/gameengine/GamePlayer/common/$(DEBUG_DIR)libcommon.a
164 SPLIB1 += $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
165 SPLIB1 += $(NAN_GHOST)/lib/$(DEBUG_DIR)libghost.a
167 SPLIB = $(OCGDIR)/blender/makesdna/$(DEBUG_DIR)DNA.o
168 SPLIB += $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
169 SPLIB += $(OCGDIR)/blender/readstreamglue/$(DEBUG_DIR)libreadstreamglue.a
170 # this is used for the plugin. It uses some things from libz.a,
171 # but somehow it consistently fails to resolve these symbols... or
172 # can I just not check them? nm claims they aren't...
173 SPLIB += $(OCGDIR)/blender/inflate/$(DEBUG_DIR)libinflate.a
174 SPLIB += $(OCGDIR)/blender/decrypt/$(DEBUG_DIR)libdecrypt.a
175 SPLIB += $(OCGDIR)/blender/writestreamglueSTUB/$(DEBUG_DIR)libwritestreamglueSTUB.a
176 SPLIB += $(OCGDIR)/blender/verify/$(DEBUG_DIR)libverify.a
177 SPLIB += $(OCGDIR)/blender/blenkernel/blenkernel_blc/$(DEBUG_DIR)libblenkernel_blc.a
179 PULIB += $(NAN_BLENKEY)/lib/libblenkey.a
180 SPLIB += $(NAN_BLENKEY)/lib/libblenkey.a
182 PULIB += $(NAN_OPENSSL)/lib/libeay32.lib
183 SPLIB += $(NAN_OPENSSL)/lib/libeay32.lib
185 PULIB += $(NAN_OPENSSL)/lib/libcrypto.a
186 SPLIB += $(NAN_OPENSSL)/lib/libcrypto.a
189 # These three need to be explicitly mentioned on the cl, because
190 # if they are offered as a lib, they are optimized away. (nzc)
191 NSPLUGLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)UnixShell.o
192 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)stubs.o
193 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)winstubs.o
194 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)Blender3DPlugin_native_implementation.o
196 # Here you can configure what sort of test to make for the plugin.
197 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_stub.a
198 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_colorcycle.a
199 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_gears.a
200 PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_threaded_gears.a
202 # XPCOM is done only for Linux for now
203 ifeq ($(OS),$(findstring $(OS), "linux"))
205 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)XPH_xpcom_hooks.o
209 PLUGAPPLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)libplugin_ketsji_hooks.a
211 ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
212 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)PLG_X11_windowing.o
213 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/unix/$(DEBUG_DIR)libunix.a
215 ifeq ($(OS),$(findstring $(OS), "windows"))
216 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)PLG_MSWindows_windowing.o
217 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)npB3DPlg.res
218 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/windows/$(DEBUG_DIR)libwindows.a
220 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/$(DEBUG_DIR)libcommon.a
223 ifeq ($(OS),$(findstring $(OS), "linux"))
225 PLUGAPPLIB_XPLINK = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)_Blender3DPlugin_implementation_.o
229 # A bit silly... but needed to resolve symbols.
230 PLUGREMLIB = $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
232 PLUGREMLIB += $(NAN_OPENSSL)/lib/libeay32.lib
234 PLUGREMLIB += $(NAN_OPENSSL)/lib/libcrypto.a
237 ######################## OS dependencies (alphabetic!) ################
242 BINTARGETS = blenderdynamic
246 BINTARGETS = blenderdynamic.app
247 BINTARGETS += blenderplayer.app
248 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
249 # Next line would enable MxTextTools (for VRML2 import)
250 # but results in a link error
251 # PYLIB += $(NAN_MXTEXTTOOLS)
255 ifeq ($(OS_VERSION),$(findstring $(OS_VERSION), "3.4 4.0"))
256 BINTARGETS = blenderdynamic
257 BINTARGETS += blenderstatic
259 BINTARGETS = blenderdynamic
260 BINTARGETS += blenderplayer
263 PYLIB = /usr/local/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
264 PYLIB += $(NAN_MXTEXTTOOLS)
268 BINTARGETS = blenderdynamic
269 BINTARGETS += blenderplayer
271 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
272 PYLIB += $(NAN_MXTEXTTOOLS)
277 BINTARGETS = blenderdynamic
278 BINTARGETS += blenderplayer
282 # BINTARGETS += ptest
284 BINTARGETS += blenderdynamic
285 BINTARGETS += blenderplayer
286 BINTARGETS += blenderstatic
288 ifeq ($(CPU),powerpc)
289 BINTARGETS = blenderdynamic
290 BINTARGETS += blenderstatic
292 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
293 PYLIB += $(NAN_MXTEXTTOOLS)
297 BINTARGETS = blenderstatic
298 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
302 BINTARGETS = blenderdynamic
303 BINTARGETS += blenderplayer
307 PYLIB = $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a
308 PYLIB += $(NAN_MXTEXTTOOLS)
309 PYLIB += $(NAN_ZLIB)/lib/libz.a
311 PULIB += $(NAN_ZLIB)/lib/libz.a
312 SPLIB += $(NAN_ZLIB)/lib/libz.a
316 # OpenAL libs are already compiled as shared code! Check FMod if we switch to that. (nzc)
317 ifeq ($(OS),$(findstring $(OS), "freebsd linux windows"))
320 NAN_SND_LIBS = $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
321 NAN_SND_LIBS += $(OCGDIR)/gameengine/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
322 NAN_SND_LIBS += $(OCGDIR)/gameengine/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
323 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
324 NAN_SND_LIBS += $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
326 NAN_SND_LIBS = $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
327 NAN_SND_LIBS += $(OCGDIR)/gameengine/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
328 NAN_SND_LIBS += $(OCGDIR)/gameengine/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
329 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
330 # NAN_SND_LIBS += $(OCGDIR)/gameengine/FmodSoundSystem/$(DEBUG_DIR)libFmodSoundSystem.a
331 # NAN_SND_LIBS += $(NAN_FMOD)/lib/libfmod.a
332 # NAN_SND_LIBS += $(OCGDIR)/gameengine/FmodSoundSystem/$(DEBUG_DIR)libFmodSoundSystem.a
333 NAN_SND_LIBS += $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
337 NAN_SND_LIBS = $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
338 NAN_SND_LIBS += $(OCGDIR)/gameengine/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
339 NAN_SND_LIBS += $(OCGDIR)/gameengine/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
340 NAN_SND_LIBS += $(NAN_OPENAL)/lib/openal_static.lib
341 # NAN_SND_LIBS += $(OCGDIR)/gameengine/FmodSoundSystem/$(DEBUG_DIR)libFmodSoundSystem.a
342 # NAN_SND_LIBS += $(NAN_FMOD)/lib/fmodvc.lib
343 NAN_SND_LIBS += $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
345 NAN_SND_LIBS = $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
346 NAN_SND_LIBS += $(OCGDIR)/gameengine/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
347 NAN_SND_LIBS += $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
352 NAN_SND_LIBS = $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
353 NAN_SND_LIBS += $(OCGDIR)/gameengine/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
354 # NAN_SND_LIBS += $(OCGDIR)/gameengine/FmodSoundSystem/$(DEBUG_DIR)libFmodSoundSystem.a
355 # NAN_SND_LIBS += $(NAN_FMOD)/lib/libfmod.a
356 NAN_SND_LIBS += $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
358 NAN_SND_LIBS = $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
359 NAN_SND_LIBS += $(OCGDIR)/gameengine/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
360 NAN_SND_LIBS += $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
365 PYLIB = $(NAN_PYTHON)/lib/python22.lib
366 PYPLAYERLIB = $(NAN_PYTHON)/static/*.obj
367 PYPLAYERLIB = $(PYLIB)
369 # Might need to change this to $(NAN_MOZILLA_LIB)/nspr4.lib
370 NSPLUGLIB += $(NAN_NSPR)/lib/nspr4.lib
372 BINTARGETS = blenderdynamic
373 BINTARGETS += blenderplayer
374 BINTARGETS += blenderdynplayer
377 PULIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winpublisher.res
378 PULIB += $(NAN_ZLIB)/lib/libz.a
379 SPLIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winplayer.res
380 SPLIB += $(NAN_ZLIB)/lib/libz.a
382 ifdef NAN_PLAYERSTATIC
383 PYPLAYERLIB = $(NAN_PYTHON)/static/python20.lib
384 BINTARGETS = blenderplayer
386 NAN_SND_LIBS = $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
387 NAN_SND_LIBS += $(OCGDIR)/gameengine/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
388 NAN_SND_LIBS += $(OCGDIR)/gameengine/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
389 NAN_SND_LIBS += $(NAN_OPENAL)/lib/openal_static.lib
390 NAN_SND_LIBS += $(OCGDIR)/gameengine/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
392 PYINCLUDEOK := $(shell diff -qbB gameengine/Ketsji/KX_Python.h gameengine/Ketsji/KX_Python_static.h)
393 ifneq (x$(PYINCLUDEOK),x)
394 DUMMY := $(shell cat gameengine/Ketsji/KX_Python_static.h > gameengine/Ketsji/KX_Python.h)
397 PYINCLUDEOK := $(shell diff -qbB gameengine/Ketsji/KX_Python.h gameengine/Ketsji/KX_Python_dynamic.h)
398 ifneq (x$(PYINCLUDEOK),x)
399 DUMMY := $(shell cat gameengine/Ketsji/KX_Python_dynamic.h > gameengine/Ketsji/KX_Python.h)
404 # prepare for NAN_BUILDINFO compile at the *sigh* link rules below
409 include nan_compile.mk
412 ################## target rules ########################
415 @echo "****> Make $@ by $(ID)@$(HOST) at $(MAKE_START) on $(CONFIG_GUESS)"
417 @for n in $(NANENV); do \
425 include nan_subdirs.mk
427 ################## target rules ########################
432 @$(MAKE) link DEBUG_DIR="debug/" NANENV=$(NANENV)
434 clean:: linkclean debuglinkclean
437 @echo "****> Build $(MAKE_START) - `date '+%H:%M:%S %d-%b-%Y'`"
439 @for n in $(NANENV); do \
445 @$(RM) $(DIR)/blenderstatic* \
446 $(DIR)/blenderplayer* \
450 @$(RM) $(DIR)/debug/blenderstatic* \
451 $(DIR)/debug/blenderplayer* \
454 # Shortcut for Tinderbox release builds. Mortals don't use this.
456 @$(MAKE) -C ../release/ all || exit 1;
458 ############### Linker rules ###############
460 blenderstatic: $(DIR)/$(DEBUG_DIR)blenderstatic
461 blenderdynamic: $(DIR)/$(DEBUG_DIR)blenderdynamic$(EXT)
462 blenderplayer: $(DIR)/$(DEBUG_DIR)blenderplayer$(EXT)
463 blenderdynplayer: $(DIR)/$(DEBUG_DIR)blenderdynplayer$(EXT)
465 blenderplayer.app: blenderplayer
466 @$(MAKE) -C darwin/ APPLICATION=blenderplayer
468 blenderdynamic.app: blenderdynamic
469 @$(MAKE) -C darwin/ APPLICATION=blender
471 # XPCOM connector only for linux so far...
473 xplink: $(DIR)/$(DEBUG_DIR)Blender3DPlugin$(SOEXT)
477 ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
478 plugin: $(DIR)/$(DEBUG_DIR)npBlender3DPlugin$(SOEXT)
479 ptest: $(DIR)/$(DEBUG_DIR)npTestPlugin$(SOEXT)
481 # Windows needs a 8.3 name... Why? Dunno...
483 plugin: $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT)
486 $(DIR)/$(DEBUG_DIR)blenderstatic: $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB)
487 @echo "****> Link $@"
489 $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"static"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
491 mkdir -p $(DIR)/$(DEBUG_DIR)bin
492 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderstatic $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB) $(PYLIB) $(LLIBS) $(SADD) $(LOPTS)
494 /bin/rm $(BUILDINFO_O)
497 $(DIR)/$(DEBUG_DIR)blenderdynamic$(EXT): $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB)
498 @echo "****> Link $@"
500 $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
502 mkdir -p $(DIR)/$(DEBUG_DIR)bin
503 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blender$(EXT) $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB) $(PYLIB) $(LLIBS) $(DADD) $(LOPTS)
505 /bin/rm $(BUILDINFO_O)
508 $(DIR)/$(DEBUG_DIR)blenderplayer$(EXT): $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB)
509 @echo "****> Link $@"
511 $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
513 mkdir -p $(DIR)/$(DEBUG_DIR)bin
514 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(PYPLAYERLIB) $(LLIBS) $(DADD) $(LOPTS)
516 /bin/rm $(BUILDINFO_O)
519 $(DIR)/$(DEBUG_DIR)blenderdynplayer$(EXT): $(OBJS) $(COMLIB) $(SPLIB)
520 @echo "****> Link $@"
522 $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
524 mkdir -p $(DIR)/$(DEBUG_DIR)bin
525 $(CCC) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(PYLIB) $(LLIBS) $(DADD) $(LOPTS)
527 /bin/rm $(BUILDINFO_O)
531 $(DIR)/$(DEBUG_DIR)Blender3DPlugin$(SOEXT): $(PLUGAPPLIB_XPLINK)
532 @echo "****> Link $(DIR)/$(DEBUG_DIR)Blender3DPlugin.so"
534 $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
536 $(CCC) $(DYNLDFLAGS) -o $@ $(PLUGAPPLIB_XPLINK) $(LOPTS)
538 /bin/rm $(BUILDINFO_O)
542 # Windows build needs a def file? Why? For exposing functions from the
543 # dll to the outside world. However, this is alsi done internally..
544 DEFFILE = ./gameengine/GamePlayer/netscape/src/npB3DPlg.def
546 # Windows needs a specific name format for dll.s so we give it one.
548 $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
549 @echo "****> Link $(DIR)/$(DEBUG_DIR)npBl3DPlg.$(SOEXT)"
551 $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
553 # $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PYLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS)
554 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PYLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS) /def:$(DEFFILE)
556 /bin/rm $(BUILDINFO_O)
560 ifeq ($(OS),$(findstring $(OS), "linux freebsd irix solaris"))
561 $(DIR)/$(DEBUG_DIR)npBlender3DPlugin$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
562 @echo "****> Link $(DIR)/$(DEBUG_DIR)Blender3DPlugin.so"
564 $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
566 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PYLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS)
568 /bin/rm $(BUILDINFO_O)
571 $(DIR)/$(DEBUG_DIR)npTestPlugin$(SOEXT): $(NSPLUGLIB)
572 @echo "****> Link $@"
574 $(CCC) $(REL_CFLAGS) -DBUILD_DATE='"$(BUILD_DATE)"' -DBUILD_TIME='"$(BUILD_TIME)"' -DBUILD_PLATFORM='"$(CONFIG_GUESS)"' -DBUILD_TYPE='"dynamic"' $(BUILDINFO_C) -c -o $(BUILDINFO_O) -DNAN_BUILDINFO
576 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGTESTLIB) $(LLIBS) $(DADD) $(LOPTS)
578 /bin/rm $(BUILDINFO_O)