4 # ***** BEGIN GPL 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.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software Foundation,
18 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 # The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
21 # All rights reserved.
23 # The Original Code is: all of this file.
25 # Contributor(s): none yet.
27 # ***** END GPL LICENSE BLOCK *****
29 # Top level makefile. Start looping through subdirs and link....
33 export NANENV := $(shell env | grep NAN_)
36 include nan_definitions.mk
38 DIRS = creator blender kernel
40 ifneq ($(NAN_NO_KETSJI),true)
48 ########## buildinfo kludge ###################
49 CPPFLAGS += -I../Physics/common
50 CPPFLAGS += -I../Physics/Dummy
52 BUILDINFO_O = $(DIR)/$(DEBUG_DIR)buildinfo.o
53 BUILDINFO_C = $(SRCHOME)/creator/buildinfo.c
54 BUILD_DATE := $(shell date "+%Y-%m-%d")
55 BUILD_TIME := $(shell date "+%H:%M:%S")
56 BUILD_REV := $(shell svnversion)
59 ############# set pyplayerlib ##################
62 ############# libraries ##################
63 # COMLIB COMmon LIBraries for all targets
64 # BPLIB Browser Plugin LIBraries
65 # SPLIB1 Standalone Player LIBraries (pre COMLIB)
66 # SPLIB Standalone Player LIBraries (post COMLIB)
67 # PULIB PUblisher LIBraries
68 # GRPLIB Gui and Render LIBraries for Publisher
69 # LLIBS dynamic system libraries
70 # SADD Static OpenGL libraries
71 # DADD Dynamic OpenGL libraries
72 # NSPLUGLIB PLUGin LIBraries for ns-style api
73 # PLUGAPPLIB libs that form the application to be plugged in
74 # Note: the order is important here
76 GRPLIB = $(OCGDIR)/creator/$(DEBUG_DIR)libcreator.a
77 GRPLIB += $(OCGDIR)/blender/src/$(DEBUG_DIR)libsrcpublisher.a
78 GRPLIB += $(NAN_BSP)/lib/$(DEBUG_DIR)libbsp.a
79 GRPLIB += $(NAN_BOOLOP)/lib/$(DEBUG_DIR)libboolop.a
80 GRPLIB += $(NAN_SOUNDSYSTEM)/lib/$(DEBUG_DIR)libSoundSystem.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/radiosity/$(DEBUG_DIR)libradiosity.a
85 GRPLIB += $(NAN_OPENNL)/lib/$(DEBUG_DIR)libopennl.a
86 GRPLIB += $(NAN_SUPERLU)/lib/$(DEBUG_DIR)libsuperlu.a
87 GRPLIB += $(OCGDIR)/blender/python/$(DEBUG_DIR)libpython.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/nodes_shd/$(DEBUG_DIR)libnodes_shd.a
98 COMLIB += $(OCGDIR)/blender/nodes_cmp/$(DEBUG_DIR)libnodes_cmp.a
99 COMLIB += $(OCGDIR)/blender/nodes_tex/$(DEBUG_DIR)libnodes_tex.a
100 COMLIB += $(OCGDIR)/blender/nodes/$(DEBUG_DIR)libnodes.a
101 COMLIB += $(OCGDIR)/blender/imbuf/$(DEBUG_DIR)libimbuf.a
102 COMLIB += $(OCGDIR)/blender/blenlib/$(DEBUG_DIR)libblenlib.a
103 COMLIB += $(NAN_IKSOLVER)/lib/libiksolver.a
104 COMLIB += $(NAN_SUPERLU)/lib/$(DEBUG_DIR)libsuperlu.a
105 COMLIB += $(OCGDIR)/blender/avi/$(DEBUG_DIR)libavi.a
106 COMLIB += $(NAN_JPEG)/lib/libjpeg.a
107 COMLIB += $(OCGDIR)/blender/gpu/$(DEBUG_DIR)libgpu.a
108 COMLIB += $(NAN_GLEW)/lib/libglew.a
110 ifneq ($(NAN_NO_KETSJI),true)
111 COMLIB += $(OCGDIR)/gameengine/bloutines/$(DEBUG_DIR)libbloutines.a
112 COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
113 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
114 COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
115 COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
116 COMLIB += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
117 COMLIB += $(NAN_SOLID)/lib/libsolid.a
118 COMLIB += $(NAN_SOLID)/lib/libsolid_broad.a
119 COMLIB += $(NAN_SOLID)/lib/libsolid_complex.a
120 COMLIB += $(NAN_SOLID)/lib/libsolid_convex.a
121 COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a
122 COMLIB += $(OCGDIR)/gameengine/blphys/fuzzics/$(DEBUG_DIR)libfuzzics.a
123 COMLIB += $(NAN_QHULL)/lib/libqhull.a
124 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
125 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
126 # COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a
127 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
128 COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
129 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
130 # COMLIB += $(OCGDIR)/gameengine/blphys/blode/$(DEBUG_DIR)libblode.a
131 # COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a
132 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
133 COMLIB += $(OCGDIR)/gameengine/blphys/blbullet/$(DEBUG_DIR)libblbullet.a
134 COMLIB += $(OCGDIR)/gameengine/blphys/common/$(DEBUG_DIR)libcommon.a
135 # COMLIB += $(OCGDIR)/gameengine/blphys/sumo/$(DEBUG_DIR)libsumo.a
136 COMLIB += $(OCGDIR)/gameengine/blphys/dummy/$(DEBUG_DIR)libdummy.a
137 COMLIB += $(OCGDIR)/gameengine/ketsji/$(DEBUG_DIR)libketsji.a
138 COMLIB += $(OCGDIR)/gameengine/logic/$(DEBUG_DIR)liblogic.a
139 COMLIB += $(OCGDIR)/gameengine/logic/Joystick/$(DEBUG_DIR)libJoystick.a
140 COMLIB += $(OCGDIR)/gameengine/rasterizer/$(DEBUG_DIR)librasterizer.a
141 COMLIB += $(OCGDIR)/gameengine/OpenGLrasterizer/$(DEBUG_DIR)libOpenGLrasterizer.a
142 COMLIB += $(OCGDIR)/gameengine/expression/$(DEBUG_DIR)libexpression.a
143 COMLIB += $(OCGDIR)/gameengine/scenegraph/$(DEBUG_DIR)libscenegraph.a
144 COMLIB += $(OCGDIR)/gameengine/videotex/$(DEBUG_DIR)libvideotex.a
145 # COMLIB += $(OCGDIR)/sumo/$(DEBUG_DIR)libfuzzics.a
146 # COMLIB += $(OCGDIR)/sumo/$(DEBUG_DIR)libsolid.a
147 COMLIB += $(NAN_MOTO)/lib/libmoto.a
148 COMLIB += $(NAN_SND_LIBS)
149 COMLIB += $(OCGDIR)/kernel/gen_system/$(DEBUG_DIR)libgen_system.a
150 COMLIB += $(OCGDIR)/kernel/gen_messaging/$(DEBUG_DIR)libgen_messaging.a
151 COMLIB += $(OCGDIR)/gameengine/ketsji/KXNetwork/$(DEBUG_DIR)libKXNetwork.a
152 COMLIB += $(OCGDIR)/gameengine/Network/$(DEBUG_DIR)libNetwork.a
153 COMLIB += $(OCGDIR)/gameengine/Network/LoopBackNetwork/$(DEBUG_DIR)libLoopBackNetwork.a
154 COMLIB += $(NAN_BULLET2)/lib/libbullet2.a
157 COMLIB += $(NAN_GUARDEDALLOC)/lib/libguardedalloc.a
158 COMLIB += $(NAN_MEMUTIL)/lib/libmemutil.a
159 COMLIB += $(NAN_BMFONT)/lib/$(DEBUG_DIR)libbmfont.a
160 COMLIB += $(NAN_PNG)/lib/libpng.a
161 COMLIB += $(OCGDIR)/blender/yafray/$(DEBUG_DIR)libyafrayexport.a
162 COMLIB += $(OCGDIR)/blender/blenlib/$(DEBUG_DIR)libblenlib.a
164 ifeq ($(WITH_QUICKTIME), true)
165 COMLIB += $(OCGDIR)/blender/blenderqt/$(DEBUG_DIR)libblenderqt.a
168 ifeq ($(WITH_OPENEXR), true)
169 COMLIB += $(OCGDIR)/blender/imbuf/openexr/$(DEBUG_DIR)libopenexr.a
172 ifeq ($(WITH_OPENJPEG), true)
173 COMLIB += $(OCGDIR)/extern/openjpeg/$(DEBUG_DIR)libopenjpeg.a
176 COMLIB += $(OCGDIR)/blender/imbuf/cineon/$(DEBUG_DIR)libcineon.a
178 ifeq ($(WITH_DDS), true)
179 COMLIB += $(OCGDIR)/blender/imbuf/dds/$(DEBUG_DIR)libdds.a
182 ifeq ($(WITH_BINRELOC), true)
183 COMLIB += $(OCGDIR)/extern/binreloc/$(DEBUG_DIR)libbinreloc.a
186 ifeq ($(WITH_FREETYPE2), true)
187 COMLIB += $(OCGDIR)/blender/ftfont/$(DEBUG_DIR)libftfont.a
188 ifeq ($(OS), windows)
189 ifeq ($(FREE_WINDOWS), true)
190 COMLIB += $(NAN_FTGL)/lib/libftgl.a
191 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
193 COMLIB += $(NAN_FTGL)/lib/ftgl_static_ST.lib
194 COMLIB += $(NAN_FREETYPE)/lib/freetype2ST.lib
197 COMLIB += $(NAN_FTGL)/lib/libftgl.a
199 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
201 COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
206 ifeq ($(WITH_VERSE), true)
207 ifeq ($(OS), windows)
208 ifeq ($(FREE_WINDOWS), true)
209 COMLIB += $(NAN_VERSE)/lib/libverse.a
211 COMLIB += $(NAN_VERSE)/lib/verse.lib
214 COMLIB += $(NAN_VERSE)/lib/libverse.a
219 COMLIB += $(NAN_SDL)/lib/libSDL.a
222 ifeq ($(OS), windows)
223 ifeq ($(FREE_WINDOWS), true)
224 COMLIB += $(NAN_SDL)/lib/libSDL.a
225 COMLIB += $(NAN_PTHREADS)/lib/libpthreadGC2.a
227 COMLIB += $(NAN_SDL)/lib/SDL.lib
231 ifeq ($(WITH_OPENEXR), true)
232 COMLIB += $(NAN_OPENEXR_LIBS)
235 PULIB = $(NAN_MOTO)/lib/libmoto.a
236 PULIB += $(NAN_DECIMATION)/lib/libdecimation.a
237 PULIB += $(NAN_ELBEEM)/lib/$(DEBUG_DIR)libelbeem.a
238 PULIB += $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
239 PULIB += $(OCGDIR)/blender/src/$(DEBUG_DIR)libsrcpublisher.a
241 ifeq ($(NAN_NO_KETSJI),true)
242 PULIB += $(NAN_MOTO)/lib/libmoto.a
243 PULIB += $(OCGDIR)/kernel/gen_system/$(DEBUG_DIR)libgen_system.a
244 PULIB += $(OCGDIR)/kernel/gen_messaging/$(DEBUG_DIR)libgen_messaging.a
245 COMLIB += $(NAN_SND_LIBS)
248 SPLIB1 = $(OCGDIR)/gameengine/GamePlayer/ghost/$(DEBUG_DIR)libghost.a
249 SPLIB1 += $(OCGDIR)/gameengine/GamePlayer/common/$(DEBUG_DIR)libcommon.a
250 SPLIB1 += $(OCGDIR)/gameengine/blconverter/$(DEBUG_DIR)libblconverter.a
251 SPLIB1 += $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
252 SPLIB1 += $(NAN_GHOST)/lib/$(DEBUG_DIR)libghost.a
254 SPLIB = $(OCGDIR)/blender/makesdna/$(DEBUG_DIR)DNA.o
255 SPLIB += $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
256 # this is used for the plugin. It uses some things from libz.a,
257 # but somehow it consistently fails to resolve these symbols... or
258 # can I just not check them? nm claims they aren't...
259 SPLIB += $(OCGDIR)/blender/blenkernel/blenkernel_blc/$(DEBUG_DIR)libblenkernel_blc.a
260 SPLIB += $(OCGDIR)/blender/python/$(DEBUG_DIR)libpython.a
262 # These three need to be explicitly mentioned on the cl, because
263 # if they are offered as a lib, they are optimized away. (nzc)
264 NSPLUGLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)UnixShell.o
265 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)stubs.o
266 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)winstubs.o
267 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)Blender3DPlugin_native_implementation.o
269 # Here you can configure what sort of test to make for the plugin.
270 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_stub.a
271 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_colorcycle.a
272 # PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_gears.a
273 PLUGTESTLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/test/$(DEBUG_DIR)libns_api_test_threaded_gears.a
275 # XPCOM is done only for Linux for now
276 ifeq ($(OS),$(findstring $(OS), "linux"))
278 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)XPH_xpcom_hooks.o
282 PLUGAPPLIB = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)libplugin_ketsji_hooks.a
284 ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
285 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)PLG_X11_windowing.o
286 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/unix/$(DEBUG_DIR)libunix.a
288 ifeq ($(OS),$(findstring $(OS), "windows"))
289 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)PLG_MSWindows_windowing.o
290 NSPLUGLIB += $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)npB3DPlg.res
291 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/windows/$(DEBUG_DIR)libwindows.a
294 PLUGAPPLIB += $(OCGDIR)/gameengine/GamePlayer/common/$(DEBUG_DIR)libcommon.a
296 ifeq ($(OS),$(findstring $(OS), "linux"))
298 PLUGAPPLIB_XPLINK = $(OCGDIR)/gameengine/GamePlayer/netscape/src/$(DEBUG_DIR)_Blender3DPlugin_implementation_.o
302 # A bit silly... but needed to resolve symbols.
303 PLUGREMLIB = $(NAN_STRING)/lib/$(DEBUG_DIR)libstring.a
305 ######################## OS dependencies (alphabetic!) ################
309 ifeq ($(NAN_JUST_BLENDERDYNAMIC),true)
310 BINTARGETS = blenderdynamic
313 ifeq ($(WITH_BF_DYNAMICOPENGL), true)
314 BINTARGETS += blenderdynamic
317 ifeq ($(WITH_BF_STATICOPENGL), true)
318 BINTARGETS += blenderstatic
321 ifeq ($(WITH_BF_BLENDERPLAYER), true)
322 export WITH_BF_GAMEENGINE=true
323 BINTARGETS += blenderplayer
326 ifeq ($(WITH_BF_WEBPLUGIN), true)
336 PULIB += $(NAN_ZLIB)/lib/libz.a
337 SPLIB += $(NAN_ZLIB)/lib/libz.a
340 # OpenAL libs are already compiled as shared code!
342 # Some vars to keep the rest of this section mostly readable
344 SOUNDSYSTEM = $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
345 DUMMYSOUND = $(OCGDIR)/intern/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
346 OPENALSOUND = $(OCGDIR)/intern/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
347 SDLSOUND = $(OCGDIR)/intern/SDLSoundSystem/$(DEBUG_DIR)libSDLSoundSystem.a
349 # Some kooky logic going on here ...
350 ifeq ($(NAN_NO_OPENAL), true)
351 NAN_SND_LIBS = $(SOUNDSYSTEM)
352 NAN_SND_LIBS += $(DUMMYSOUND)
353 NAN_SND_LIBS += $(SOUNDSYSTEM)
355 ifeq ($(OS),$(findstring $(OS), "freebsd linux windows"))
356 ifeq ($(CPU),$(findstring $(CPU), "i386 powerpc x86_64 parisc64"))
357 NAN_SND_LIBS = $(SOUNDSYSTEM)
358 NAN_SND_LIBS += $(DUMMYSOUND)
359 NAN_SND_LIBS += $(OPENALSOUND)
360 NAN_SND_LIBS += $(SDLSOUND)
361 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
362 ALUT = $(wildcard $(NAN_OPENAL)/lib/libalut.a)
363 NAN_SND_LIBS += $(ALUT)
364 NAN_SND_LIBS += $(SOUNDSYSTEM)
367 NAN_SND_LIBS = $(SOUNDSYSTEM)
368 NAN_SND_LIBS += $(DUMMYSOUND)
369 NAN_SND_LIBS += $(OPENALSOUND)
370 NAN_SND_LIBS += $(SDLSOUND)
371 NAN_SND_LIBS += $(NAN_OPENAL)/lib/openal_static.lib
372 ALUT = $(wildcard $(NAN_OPENAL)/lib/alut_static.lib)
373 NAN_SND_LIBS += $(ALUT)
374 NAN_SND_LIBS += $(SOUNDSYSTEM)
376 NAN_SND_LIBS = $(SOUNDSYSTEM)
377 NAN_SND_LIBS += $(DUMMYSOUND)
378 NAN_SND_LIBS += $(SOUNDSYSTEM)
383 NAN_SND_LIBS = $(SOUNDSYSTEM)
384 NAN_SND_LIBS += $(DUMMYSOUND)
385 NAN_SND_LIBS += $(OPENALSOUND)
386 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
387 ALUT = $(wildcard $(NAN_OPENAL)/lib/libalut.a)
388 NAN_SND_LIBS += $(ALUT)
389 NAN_SND_LIBS += $(SOUNDSYSTEM)
391 ifeq ($(OS), solaris)
392 NAN_SND_LIBS = $(SOUNDSYSTEM)
393 NAN_SND_LIBS += $(DUMMYSOUND)
394 NAN_SND_LIBS += $(OPENALSOUND)
395 NAN_SND_LIBS += $(SDLSOUND)
396 NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
397 ALUT = $(wildcard $(NAN_OPENAL)/lib/libalut.a)
398 NAN_SND_LIBS += $(ALUT)
399 NAN_SND_LIBS += $(SOUNDSYSTEM)
402 NAN_SND_LIBS = $(SOUNDSYSTEM)
403 NAN_SND_LIBS += $(DUMMYSOUND)
404 NAN_SND_LIBS += $(SDLSOUND)
405 NAN_SND_LIBS += $(SOUNDSYSTEM)
407 NAN_SND_LIBS = $(SOUNDSYSTEM)
408 NAN_SND_LIBS += $(DUMMYSOUND)
409 NAN_SND_LIBS += $(SOUNDSYSTEM)
418 # Might need to change this to $(NAN_MOZILLA_LIB)/nspr4.lib
419 NSPLUGLIB += $(NAN_NSPR)/lib/nspr4.lib
421 BINTARGETS = blenderdynamic
422 ifeq ($(FREE_WINDOWS),true)
423 ifneq ($(NAN_NO_KETSJI),true)
424 BINTARGETS += blenderplayer
427 BINTARGETS += blenderplayer
428 BINTARGETS += blenderdynplayer
432 PULIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winblender.res
433 PULIB += $(NAN_ZLIB)/lib/libz.a
434 SPLIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winblender.res
435 SPLIB += $(NAN_ZLIB)/lib/libz.a
439 # prepare for NAN_BUILDINFO compile at the *sigh* link rules below
444 include nan_compile.mk
447 ################## target rules ########################
450 @echo "****> Make $@ by $(ID)@$(HOST) at $(MAKE_START) on $(CONFIG_GUESS)"
452 @for n in $(NANENV); do \
460 include nan_subdirs.mk
462 ################## target rules ########################
467 @$(MAKE) link DEBUG_DIR="debug/" NANENV=$(NANENV)
469 clean:: linkclean debuglinkclean
472 @echo "****> Build $(MAKE_START) - `date '+%H:%M:%S %d-%b-%Y'`"
474 @for n in $(NANENV); do \
480 @$(RM) -r $(DIR)/blenderstatic* \
481 $(DIR)/blenderplayer* \
485 @$(RM) -r $(DIR)/debug/blenderstatic* \
486 $(DIR)/debug/blenderplayer* \
489 # Shortcut for Tinderbox release builds. Mortals don't use this.
491 @$(MAKE) -C ../release/ all || exit 1;
493 ############### Linker rules ###############
495 blenderstatic: $(DIR)/$(DEBUG_DIR)bin/blenderstatic
496 blenderdynamic: $(DIR)/$(DEBUG_DIR)bin/blender$(EXT)
497 blenderplayer: $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT)
498 blenderdynplayer: $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT)
500 # XPCOM connector only for linux so far...
502 xplink: $(DIR)/$(DEBUG_DIR)bin/Blender3DPlugin$(SOEXT)
506 ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
507 plugin: $(DIR)/$(DEBUG_DIR)bin/npBlender3DPlugin$(SOEXT)
508 ptest: $(DIR)/$(DEBUG_DIR)bin/npTestPlugin$(SOEXT)
510 # Windows needs a 8.3 name... Why? Dunno...
512 ifneq ($(FREE_WINDOWS),true)
513 plugin: $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT)
517 $(DIR)/$(DEBUG_DIR)bin/blenderstatic: $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB)
518 @echo "****> Link $@"
520 $(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
522 mkdir -p $(DIR)/$(DEBUG_DIR)bin
523 $(CCC) $(CCFLAGS) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderstatic $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB) $(LLIBS) $(SADD) $(LOPTS)
525 /bin/rm $(BUILDINFO_O)
528 @$(MAKE) -C darwin/ APPLICATION=blenderstatic
531 $(DIR)/$(DEBUG_DIR)bin/blender$(EXT): $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB)
532 @echo "****> Link $@"
534 $(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
536 mkdir -p $(DIR)/$(DEBUG_DIR)bin
537 $(CCC) $(CCFLAGS) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blender$(EXT) $(BUILDINFO_O) $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB) $(LLIBS) $(DADD) $(LOPTS)
539 /bin/rm $(BUILDINFO_O)
542 @$(MAKE) -C darwin/ APPLICATION=blender
545 $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT): $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB)
546 @echo "****> Link $@"
548 $(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
550 mkdir -p $(DIR)/$(DEBUG_DIR)bin
551 $(CCC) $(CCFLAGS) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(LLIBS) $(DADD) $(LOPTS)
553 /bin/rm $(BUILDINFO_O)
556 @$(MAKE) -C darwin/ APPLICATION=blenderplayer
559 $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT): $(OBJS) $(COMLIB) $(SPLIB)
560 @echo "****> Link $@"
562 $(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
564 mkdir -p $(DIR)/$(DEBUG_DIR)bin
565 $(CCC) $(CCFLAGS) $(LDFLAGS) -o $(DIR)/$(DEBUG_DIR)bin/blenderdynplayer$(EXT) $(BUILDINFO_O) $(OBJS) $(SPLIB1) $(COMLIB) $(SPLIB) $(LLIBS) $(DADD) $(LOPTS)
567 /bin/rm $(BUILDINFO_O)
570 @$(MAKE) -C darwin/ APPLICATION=blenderplayer
573 $(DIR)/$(DEBUG_DIR)bin/Blender3DPlugin$(SOEXT): $(PLUGAPPLIB_XPLINK)
574 @echo "****> Link $@"
576 $(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
578 mkdir -p $(DIR)/$(DEBUG_DIR)bin
579 $(CCC) $(CCFLAGS) $(DYNLDFLAGS) -o $@ $(PLUGAPPLIB_XPLINK) $(LOPTS)
581 /bin/rm $(BUILDINFO_O)
584 # Windows build needs a def file? Why? For exposing functions from the
585 # dll to the outside world. However, this is alsi done internally..
586 DEFFILE = ./gameengine/GamePlayer/netscape/src/npB3DPlg.def
588 # Windows needs a specific name format for dll.s so we give it one.
589 $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
590 @echo "****> Link $@"
592 $(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
594 # $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS)
595 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS) /def:$(DEFFILE)
597 /bin/rm $(BUILDINFO_O)
600 $(DIR)/$(DEBUG_DIR)bin/npBlender3DPlugin$(SOEXT): $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB)
601 @echo "****> Link $@"
603 $(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
605 mkdir -p $(DIR)/$(DEBUG_DIR)bin
606 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGAPPLIB) $(COMLIB) $(SPLIB) $(PLUGREMLIB) $(LLIBS) $(DADD) $(LOPTS)
608 /bin/rm $(BUILDINFO_O)
611 $(DIR)/$(DEBUG_DIR)bin/npTestPlugin$(SOEXT): $(NSPLUGLIB)
612 @echo "****> Link $@"
614 $(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
616 mkdir -p $(DIR)/$(DEBUG_DIR)bin
617 $(CCC) $(DYNLDFLAGS) -o $@ $(NSPLUGLIB) $(PLUGTESTLIB) $(LLIBS) $(DADD) $(LOPTS)
619 /bin/rm $(BUILDINFO_O)