correct fsf address
[blender.git] / source / nan_link.mk
index 186fe07e09ae84d7662b079e3989acafc28cfe09..3ab4f9710dbb38271c11838c86915a68bc4967b9 100644 (file)
@@ -1,3 +1,5 @@
+# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*-
+# vim: tabstop=8
 #
 # $Id$
 #
 #
 # 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.
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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.
+# Contributor(s): GSR
 #
 # ***** END GPL LICENSE BLOCK *****
 #
@@ -34,7 +36,7 @@ ifdef NAN_DEBUG
     LDFLAGS += $(NAN_DEBUG)
 endif
 
-DBG_LDFLAGS    += -g
+DBG_LDFLAGS += -g
 
 ifneq (x$(DEBUG_DIR), x)
     LDFLAGS+=$(DBG_LDFLAGS)
@@ -47,20 +49,29 @@ endif
 # default (overriden by windows)
 SOEXT = .so
 
-ifeq ($(OS),beos)
-    LLIBS = -L/boot/develop/lib/x86/ -lGL -lbe -L/boot/home/config/lib/
-endif
-
 ifeq ($(OS),darwin)
     LLIBS    += -lGLU -lGL
     LLIBS    += -lz -lstdc++
     ifdef USE_OSX10.4STUBS
        LLIBS    +=-lSystemStubs
-    endif 
-    LLIBS    += -framework Carbon -framework AGL -framework OpenGL
-    LLIBS    += -framework QuickTime -framework CoreAudio
-    LLIBS    += -framework AudioUnit -framework AudioToolbox
+    endif
+    ifeq ($(WITH_COCOA), true)
+        LLIBS += -framework Cocoa
+    endif
+    LLIBS += -framework Carbon -framework AGL -framework OpenGL
+    ifeq ($(WITH_QUICKTIME), true)
+        ifeq ($(USE_QTKIT), true)
+            LLIBS += -framework QTKit
+        else
+            LLIBS  += -framework QuickTime
+        endif
+    endif
+    LLIBS += -framework CoreAudio
+    LLIBS += -framework AudioUnit -framework AudioToolbox
     LDFLAGS += -L/System/Library/Frameworks/OpenGL.framework/Libraries
+    # useful for crosscompiling
+    LDFLAGS += -arch $(MACOSX_ARCHITECTURE) #-isysroot $(MACOSX_SDK) -mmacosx-version-min=$(MACOSX_MIN_VERS)
+    
     DBG_LDFLAGS += -L/System/Library/Frameworks/OpenGL.framework/Libraries
 endif
 
@@ -99,7 +110,7 @@ ifeq ($(OS),linux)
     COMMENT = "MESA 3.1"
     LLIBS = -L$(NAN_MESA)/lib -L/usr/X11R6/lib -lXmu -lXext -lX11 -lXi
     LLIBS += -lutil -lc -lm -ldl -lpthread
-#    LLIBS += -L$(NAN_ODE)/lib -lode
+    LLIBS += -L$(NAN_PYTHON)/lib -Wl,-rpath -Wl,$(NAN_PYTHON)/lib -lpython$(NAN_PYTHON_VERSION)
     LOPTS = -export-dynamic
     DADD = -lGL -lGLU
     SADD = $(NAN_MESA)/lib/libGL.a $(NAN_MESA)/lib/libGLU.a
@@ -122,37 +133,34 @@ ifeq ($(OS),solaris)
         LLIBS += -L$(NAN_MESA)/lib
     endif
     
-    LLIBS += -lGLU -lGL -lXmu -lXext -lXi -lX11 -lc -lm -ldl -lsocket -lnsl 
+    LLIBS += $(NAN_ZLIB)/lib/libz.a -lGLU -lGL -lXmu -lXext -lXi -lX11 -lc -lm -ldl -lsocket -lnsl 
     DYNLDFLAGS = -shared $(LDFLAGS)
 endif
 
 ifeq ($(OS),windows)
     EXT = .exe
-       SOEXT = .dll
-       ifeq ($(FREE_WINDOWS),true)
-               MINGWLIB = /usr/lib/w32api
-               LDFLAGS += -mwindows -mno-cygwin -mconsole
-               DADD += -L/usr/lib/w32api -lnetapi32 -lopengl32 -lglu32 -lshfolder
-               DADD += -L/usr/lib/w32api -lwinmm -lwsock32
-               ifeq ($(WITH_VERSE),true)
-                       DADD += -lws2_32
-               endif
+    SOEXT = .dll
+    ifeq ($(FREE_WINDOWS),true)
+        MINGWLIB = /usr/lib/w32api
+        LDFLAGS += -mwindows -mno-cygwin -mconsole
+        DADD += -L/usr/lib/w32api -lnetapi32 -lopengl32 -lglu32 -lshfolder
+        DADD += -L/usr/lib/w32api -lwinmm -lwsock32
     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
+        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
 endif
 
 ifneq ($(OS), irix)
@@ -175,4 +183,12 @@ ifeq ($(WITH_BF_OPENMP),true)
    LLIBS += -lgomp
 endif
 
+ifeq ($(WITH_FFTW3),true)
+    LLIBS += $(BF_FFTW3_LIBS)
+endif
+
+ifeq ($(WITH_OPENCOLLADA),true)
+    LLIBS += $(BF_OPENCOLLADA_LIBS)
+endif
+
 LLIBS += $(NAN_PYTHON_LIB)