Merge branch 'bl/light'
[plumiferos.git] / source / nan_link.mk
blobedddacacef542f4326a4d851724a7fb76977f18f
2 # $Id: nan_link.mk 8804 2006-11-09 15:45:19Z sirdude $
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
12 # about this.
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 # linking only
34 include nan_definitions.mk
36 ifdef NAN_DEBUG
37 LDFLAGS += $(NAN_DEBUG)
38 endif
40 DBG_LDFLAGS += -g
42 ifneq (x$(DEBUG_DIR), x)
43 LDFLAGS+=$(DBG_LDFLAGS)
44 else
45 LDFLAGS+=$(REL_LDFLAGS)
46 endif
48 ######################## OS dependencies (alphabetic!) ################
50 # default (overriden by windows)
51 SOEXT = .so
53 ifeq ($(OS),beos)
54 LLIBS = -L/boot/develop/lib/x86/ -lGL -lbe -L/boot/home/config/lib/
55 LLIBS += -lpython1.5
56 endif
58 ifeq ($(OS),darwin)
59 LLIBS += -lGLU -lGL
60 LLIBS += -lz -lstdc++
61 ifdef USE_OSX10.4STUBS
62 LLIBS +=-lSystemStubs
63 endif
64 LLIBS += -framework Carbon -framework AGL -framework OpenGL
65 LLIBS += -framework QuickTime -framework CoreAudio
66 LLIBS += -framework AudioUnit -framework AudioToolbox
67 LDFLAGS += -L/System/Library/Frameworks/OpenGL.framework/Libraries
68 DBG_LDFLAGS += -L/System/Library/Frameworks/OpenGL.framework/Libraries
69 endif
71 ifeq ($(OS),freebsd)
72 LLIBS = -L/usr/X11R6/lib -lX11 -lXmu -lXi -lm -lutil -lz -pthread -lc_r
73 DADD = -lGL -lGLU
74 DYNLDFLAGS = -shared $(LDFLAGS)
75 LOPTS = -Wl,--export-dynamic
76 endif
78 ifeq ($(OS),irix)
79 LDFLAGS += -mips3
80 LLIBS = -lmovieGL -lGLU -lGL -lXmu -lXext -lX11 -lc -lm -ldmedia
81 LLIBS += -lcl -laudio -ldb -lCio -lz
82 LLIBS += -lpthread
83 LLIBS += -woff 84,171
84 DYNLDFLAGS = -shared $(LDFLAGS)
85 endif
87 ifeq ($(OS),linux)
88 ifeq ($(CPU),alpha)
89 COMMENT = "MESA 3.1"
90 LLIBS = -lGL -lGLU -L/usr/X11R6/lib/ -lXmu -lXext -lX11
91 LLIBS += -lc -lm -ldl -lutil
92 LOPTS = -export-dynamic
93 endif
94 ifeq ($(CPU),$(findstring $(CPU), "i386 x86_64 ia64"))
95 COMMENT = "MESA 3.1"
96 LLIBS = -L$(NAN_MESA)/lib -L/usr/X11R6/lib -lXmu -lXext -lX11 -lXi
97 LLIBS += -lutil -lc -lm -ldl -lpthread
98 # LLIBS += -L$(NAN_ODE)/lib -lode
99 LOPTS = -export-dynamic
100 DADD = -lGL -lGLU
101 SADD = $(NAN_MESA)/lib/libGL.a $(NAN_MESA)/lib/libGLU.a
102 DYNLDFLAGS = -shared $(LDFLAGS)
103 endif
104 ifeq ($(CPU),$(findstring $(CPU), "powerpc sparc64"))
105 LLIBS = -L/usr/X11R6/lib/ -lXmu -lXext -lX11 -lc -ldl -lm -lutil
106 DADD = -lGL -lGLU
107 SADD = /usr/lib/libGL.a /usr/lib/libGLU.a
108 LOPTS = -export-dynamic
109 DYNLDFLAGS = -shared $(LDFLAGS)
110 endif
111 LLIBS += -lz
112 endif
114 ifeq ($(OS),openbsd)
115 SADD = /usr/local/lib/libGL.a /usr/local/lib/libGLU.a
116 SADD += /usr/X11R6/lib/libXmu.a /usr/X11R6/lib/libXext.a
117 SADD += /usr/X11R6/lib/libX11.a /usr/lib/libm.a -pthread
118 endif
120 ifeq ($(OS),solaris)
121 LLIBS = -lGLU -lGL -lXmu -lXext -lXi -lX11 -lc -lm -ldl -lsocket -lnsl
122 DYNLDFLAGS = -shared $(LDFLAGS)
123 endif
125 ifeq ($(OS),windows)
126 EXT = .exe
127 SOEXT = .dll
128 ifeq ($(FREE_WINDOWS),true)
129 MINGWLIB = /usr/lib/w32api
130 LDFLAGS += -mwindows -mno-cygwin -mconsole
131 DADD += -L/usr/lib/w32api -lnetapi32 -lopengl32 -lglu32 -lshfolder
132 DADD += -L/usr/lib/w32api -lwinmm -lwsock32
133 ifeq ($(WITH_VERSE),true)
134 DADD += -lws2_32
135 endif
136 else
137 DADD = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
138 DADD += advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
139 DADD += vfw32.lib winmm.lib opengl32.lib glu32.lib largeint.lib dxguid.lib
140 DADD += libcmt.lib
141 LOPTS = /link
142 LOPTS += /NODEFAULTLIB:"libc"
143 LOPTS += /NODEFAULTLIB:"libcd"
144 LOPTS += /NODEFAULTLIB:"libcp"
145 LOPTS += /NODEFAULTLIB:"libcpd"
146 LOPTS += /NODEFAULTLIB:"python20"
147 LOPTS += /NODEFAULTLIB:"msvcrt"
148 LOPTS += /SUBSYSTEM:CONSOLE
149 LDFLAGS += /MT
150 DYNLDFLAGS = /LD
151 endif
152 endif
154 ifneq ($(OS), irix)
155 LLIBS += $(NAN_SDLLIBS)
156 endif
158 ifeq ($(WITH_ICONV),true)
159 LLIBS += $(NAN_ICONV_LIBS)
160 endif
162 ifeq ($(WITH_FFMPEG),true)
163 LLIBS += $(NAN_FFMPEGLIBS)
164 endif