2002-10-12 11:37:38 +00:00
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
#
|
|
|
|
# ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version. The Blender
|
|
|
|
# Foundation also sells licenses for use in proprietary software under
|
|
|
|
# the Blender License. See http://www.blender.org/BL/ for information
|
|
|
|
# about this.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
|
|
|
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
#
|
|
|
|
# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
|
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# The Original Code is: all of this file.
|
|
|
|
#
|
|
|
|
# Contributor(s): none yet.
|
|
|
|
#
|
|
|
|
# ***** END GPL/BL DUAL LICENSE BLOCK *****
|
|
|
|
#
|
|
|
|
# linking only
|
|
|
|
|
|
|
|
include nan_definitions.mk
|
|
|
|
|
|
|
|
ifdef NAN_DEBUG
|
|
|
|
LDFLAGS += $(NAN_DEBUG)
|
|
|
|
endif
|
|
|
|
|
|
|
|
DBG_LDFLAGS += -g
|
|
|
|
|
|
|
|
ifneq (x$(DEBUG_DIR), x)
|
|
|
|
LDFLAGS+=$(DBG_LDFLAGS)
|
|
|
|
else
|
|
|
|
LDFLAGS+=$(REL_LDFLAGS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
######################## OS dependencies (alphabetic!) ################
|
|
|
|
|
2006-02-05 19:49:29 +00:00
|
|
|
# default (overriden by windows)
|
2002-10-12 11:37:38 +00:00
|
|
|
SOEXT = .so
|
|
|
|
|
|
|
|
ifeq ($(OS),beos)
|
|
|
|
LLIBS = -L/boot/develop/lib/x86/ -lGL -lbe -L/boot/home/config/lib/
|
|
|
|
LLIBS += -lpython1.5
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OS),darwin)
|
|
|
|
LLIBS += -lGLU -lGL
|
2005-09-18 11:19:53 +00:00
|
|
|
LLIBS += -lz -lstdc++
|
|
|
|
ifdef USE_OSX10.4STUBS
|
2006-01-10 06:29:57 +00:00
|
|
|
LLIBS +=-lSystemStubs
|
2005-09-18 11:19:53 +00:00
|
|
|
endif
|
|
|
|
LLIBS += -framework Carbon -framework AGL -framework OpenGL
|
2004-04-14 13:00:36 +00:00
|
|
|
LLIBS += -framework QuickTime -framework CoreAudio
|
|
|
|
LLIBS += -framework AudioUnit -framework AudioToolbox
|
2002-10-12 11:37:38 +00:00
|
|
|
LDFLAGS += -L/System/Library/Frameworks/OpenGL.framework/Libraries
|
|
|
|
DBG_LDFLAGS += -L/System/Library/Frameworks/OpenGL.framework/Libraries
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OS),freebsd)
|
2006-10-24 13:34:15 +00:00
|
|
|
LLIBS = -L/usr/X11R6/lib -lX11 -lXmu -lXi -lm -lutil -lz -pthread -lc_r
|
2002-10-12 11:37:38 +00:00
|
|
|
DADD = -lGL -lGLU
|
|
|
|
DYNLDFLAGS = -shared $(LDFLAGS)
|
2003-06-12 19:17:33 +00:00
|
|
|
LOPTS = -Wl,--export-dynamic
|
2002-10-12 11:37:38 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OS),irix)
|
2003-08-04 03:26:07 +00:00
|
|
|
LDFLAGS += -mips3
|
2002-10-12 11:37:38 +00:00
|
|
|
LLIBS = -lmovieGL -lGLU -lGL -lXmu -lXext -lX11 -lc -lm -ldmedia
|
2003-06-28 03:47:05 +00:00
|
|
|
LLIBS += -lcl -laudio -ldb -lCio -lz
|
2003-07-12 00:46:43 +00:00
|
|
|
LLIBS += -lpthread
|
2003-06-28 03:47:05 +00:00
|
|
|
LLIBS += -woff 84,171
|
2002-10-12 11:37:38 +00:00
|
|
|
DYNLDFLAGS = -shared $(LDFLAGS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OS),linux)
|
|
|
|
ifeq ($(CPU),alpha)
|
|
|
|
COMMENT = "MESA 3.1"
|
|
|
|
LLIBS = -lGL -lGLU -L/usr/X11R6/lib/ -lXmu -lXext -lX11
|
|
|
|
LLIBS += -lc -lm -ldl -lutil
|
|
|
|
LOPTS = -export-dynamic
|
|
|
|
endif
|
2005-04-05 14:33:43 +00:00
|
|
|
ifeq ($(CPU),$(findstring $(CPU), "i386 x86_64 ia64"))
|
2002-10-12 11:37:38 +00:00
|
|
|
COMMENT = "MESA 3.1"
|
|
|
|
LLIBS = -L$(NAN_MESA)/lib -L/usr/X11R6/lib -lXmu -lXext -lX11 -lXi
|
2006-02-06 00:10:43 +00:00
|
|
|
LLIBS += -lutil -lc -lm -ldl -lpthread
|
2004-08-26 22:42:44 +00:00
|
|
|
# LLIBS += -L$(NAN_ODE)/lib -lode
|
2002-10-12 11:37:38 +00:00
|
|
|
LOPTS = -export-dynamic
|
|
|
|
DADD = -lGL -lGLU
|
|
|
|
SADD = $(NAN_MESA)/lib/libGL.a $(NAN_MESA)/lib/libGLU.a
|
|
|
|
DYNLDFLAGS = -shared $(LDFLAGS)
|
|
|
|
endif
|
Work done to build blender on Linux [sparc64].
extern/ode/dist/ode/test/test_ode.cpp:
- Don't include <ieeefp.h> on sparc linux, it doesn't exist.
extern/ode/Makefile:
- While hacking on ode, get rid of that annoying infinite rebuild
source/Makefile:
- Define a default BINTARGETS (just blenderdynamic) for linux, individual archs
can override/add to that if they so please
source/nan_link.nmk:
- Add a sparc64 arch target to the linux section of nan_link.mk, using the same
options as powerpc
After the first ode problem, the build completed all but the linking of a
blender binary, because there wasn't any target defined!
On the rebuilding: The usersettings would have a newer date than targets
depending on it, so it would rebuild entirely. I haven't really fixed this, but
isolated it to the platforms where usersettings need to be moved around (darwin
and windows). FBSD patches the usersettings, so it might still happen there. I
didn't bother with a proper fix, as it looks like we're moving to scons soon.
I'm amazed no one got annoyed enough before to take care of this.
2004-01-01 23:19:08 +00:00
|
|
|
ifeq ($(CPU),$(findstring $(CPU), "powerpc sparc64"))
|
2002-10-12 11:37:38 +00:00
|
|
|
LLIBS = -L/usr/X11R6/lib/ -lXmu -lXext -lX11 -lc -ldl -lm -lutil
|
|
|
|
DADD = -lGL -lGLU
|
|
|
|
SADD = /usr/lib/libGL.a /usr/lib/libGLU.a
|
|
|
|
LOPTS = -export-dynamic
|
Work done to build blender on Linux [sparc64].
extern/ode/dist/ode/test/test_ode.cpp:
- Don't include <ieeefp.h> on sparc linux, it doesn't exist.
extern/ode/Makefile:
- While hacking on ode, get rid of that annoying infinite rebuild
source/Makefile:
- Define a default BINTARGETS (just blenderdynamic) for linux, individual archs
can override/add to that if they so please
source/nan_link.nmk:
- Add a sparc64 arch target to the linux section of nan_link.mk, using the same
options as powerpc
After the first ode problem, the build completed all but the linking of a
blender binary, because there wasn't any target defined!
On the rebuilding: The usersettings would have a newer date than targets
depending on it, so it would rebuild entirely. I haven't really fixed this, but
isolated it to the platforms where usersettings need to be moved around (darwin
and windows). FBSD patches the usersettings, so it might still happen there. I
didn't bother with a proper fix, as it looks like we're moving to scons soon.
I'm amazed no one got annoyed enough before to take care of this.
2004-01-01 23:19:08 +00:00
|
|
|
DYNLDFLAGS = -shared $(LDFLAGS)
|
2002-10-12 11:37:38 +00:00
|
|
|
endif
|
|
|
|
LLIBS += -lz
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OS),openbsd)
|
|
|
|
SADD = /usr/local/lib/libGL.a /usr/local/lib/libGLU.a
|
|
|
|
SADD += /usr/X11R6/lib/libXmu.a /usr/X11R6/lib/libXext.a
|
|
|
|
SADD += /usr/X11R6/lib/libX11.a /usr/lib/libm.a -pthread
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OS),solaris)
|
|
|
|
LLIBS = -lGLU -lGL -lXmu -lXext -lX11 -lc -lm -ldl -lsocket -lnsl
|
|
|
|
DYNLDFLAGS = -shared $(LDFLAGS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OS),windows)
|
|
|
|
EXT = .exe
|
|
|
|
SOEXT = .dll
|
2003-05-24 20:04:37 +00:00
|
|
|
ifeq ($(FREE_WINDOWS),true)
|
|
|
|
MINGWLIB = /usr/lib/w32api
|
|
|
|
LDFLAGS += -mwindows -mno-cygwin -mconsole
|
2006-03-20 17:25:42 +00:00
|
|
|
DADD += -L/usr/lib/w32api -lnetapi32 -lopengl32 -lglu32 -lshfolder
|
2006-02-06 04:25:20 +00:00
|
|
|
DADD += -L/usr/lib/w32api -lwinmm -lwsock32
|
2006-08-20 15:22:56 +00:00
|
|
|
ifeq ($(WITH_VERSE),true)
|
|
|
|
DADD += -lws2_32
|
|
|
|
endif
|
2003-05-24 20:04:37 +00:00
|
|
|
else
|
|
|
|
DADD = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
|
|
|
|
DADD += advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
|
|
|
|
DADD += vfw32.lib winmm.lib opengl32.lib glu32.lib largeint.lib dxguid.lib
|
|
|
|
DADD += libcmt.lib
|
|
|
|
LOPTS = /link
|
|
|
|
LOPTS += /NODEFAULTLIB:"libc"
|
|
|
|
LOPTS += /NODEFAULTLIB:"libcd"
|
|
|
|
LOPTS += /NODEFAULTLIB:"libcp"
|
|
|
|
LOPTS += /NODEFAULTLIB:"libcpd"
|
|
|
|
LOPTS += /NODEFAULTLIB:"python20"
|
|
|
|
LOPTS += /NODEFAULTLIB:"msvcrt"
|
|
|
|
LOPTS += /SUBSYSTEM:CONSOLE
|
|
|
|
LDFLAGS += /MT
|
|
|
|
DYNLDFLAGS = /LD
|
|
|
|
endif
|
2002-10-12 11:37:38 +00:00
|
|
|
endif
|
|
|
|
|
2003-07-18 10:11:40 +00:00
|
|
|
ifneq ($(OS), irix)
|
2003-07-16 23:53:09 +00:00
|
|
|
LLIBS += $(NAN_SDLLIBS)
|
|
|
|
endif
|
2006-02-06 06:22:39 +00:00
|
|
|
|
|
|
|
ifeq ($(WITH_FFMPEG),true)
|
|
|
|
LLIBS += $(NAN_FFMPEGLIBS)
|
|
|
|
endif
|