]> git.sesse.net Git - vlc/blob - Makefile.opts.in
./debian/control: updated list of supported architectures.
[vlc] / Makefile.opts.in
1 ###############################################################################
2 # vlc (VideoLAN Client) options Makefile
3 # (c)1998 VideoLAN
4 ###############################################################################
5
6 HAVE_MAKEFILE_OPTS = 1
7
8 ###############################################################################
9 # Configuration
10 ###############################################################################
11
12
13 # Plugins to build
14 # WARNING: if you do not have a dynamic loader on your platform, remove
15 # the plugins in this line and put them as built-ins, otherwise your
16 # application won't be able to load them.
17
18 PLUGINS :=@PLUGINS@
19
20
21 # Built-in modules to build
22 # WARNING: do NOT put gtk and gnome together in this rule.
23
24 BUILTINS :=@BUILTINS@
25
26
27 # Additional build options
28
29 SYS = @SYS@
30 ALIASES =@ALIASES@
31 INSTALL = @INSTALL@
32 ARCH = @ARCH@
33
34 #
35 # Compilation options
36 #
37 DEBUG = @DEBUG@
38 TRACE = @TRACE@
39 CPROF = @CPROF@
40 GPROF = @GPROF@
41 OPTIMS = @OPTIMS@
42 TUNING = @TUNING@
43 RELEASE = @RELEASE@
44
45
46 # Build environment
47
48 CC = @CC@
49 CFLAGS = @CFLAGS@
50 SHELL = @SHELL@
51 RANLIB = @RANLIB@
52 WINDRES = @WINDRES@
53 MOC = @MOC@
54 DLL_PATH = @DLL_PATH@
55
56
57 # Installation environment
58
59 exec_prefix = @exec_prefix@
60 prefix = @prefix@
61 bindir = @bindir@
62 datadir = @datadir@
63 libdir = @libdir@
64 includedir = @includedir@
65
66 #
67 # Libraries for special cases
68 #
69 LIB_ALSA = @LIB_ALSA@
70 LIB_ARTS = @LIB_ARTS@
71 LIB_BEOS = @LIB_BEOS@
72 LIB_DARWIN = @LIB_DARWIN@
73 LIB_DIRECTX = @LIB_DIRECTX@
74 LIB_DVD = @LIB_DVD@
75 LIB_DVD_PLUGIN = @LIB_DVD_PLUGIN@
76 LIB_DVDREAD_PLUGIN = @LIB_DVDREAD_PLUGIN@
77 LIB_DVDREAD = @LIB_DVDREAD@
78 LIB_DVDREAD_PLUGIN = @LIB_DVDREAD_PLUGIN@
79 LIB_ESD = @LIB_ESD@
80 LIB_FILTER_DISTORT = @LIB_FILTER_DISTORT@
81 LIB_GGI = @LIB_GGI@
82 LIB_GLIDE = @LIB_GLIDE@
83 LIB_GNOME = @LIB_GNOME@
84 LIB_GTK = @LIB_GTK@
85 LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@
86 LIB_IMDCT = @LIB_IMDCT@
87 LIB_IMDCT3DN = @LIB_IMDCT3DN@
88 LIB_IMDCTSSE = @LIB_IMDCTSSE@
89 LIB_KDE = @LIB_KDE@
90 LIB_LIBDVDCSS = @LIB_LIBDVDCSS@
91 LIB_MACOSX = @LIB_MACOSX@
92 LIB_MAD = @LIB_MAD@
93 LIB_MOTIONALTIVEC = @LIB_MOTIONALTIVEC@
94 LIB_MPEG_TS = @LIB_MPEG_TS@
95 LIB_NCURSES = @LIB_NCURSES@
96 LIB_QNX = @LIB_QNX@
97 LIB_QT = @LIB_QT@
98 LIB_RC = @LIB_RC@
99 LIB_SDL = @LIB_SDL@
100 LIB_X11 = @LIB_X11@
101 LIB_XVIDEO = @LIB_XVIDEO@
102
103 #
104 # CFLAGS for special cases
105 #
106 CFLAGS_VLC = @CFLAGS_VLC@
107 CFLAGS_ARTS = @CFLAGS_ARTS@
108 CFLAGS_DVD = @CFLAGS_DVD@
109 CFLAGS_DVDREAD = @CFLAGS_DVDREAD@
110 CFLAGS_ESD = @CFLAGS_ESD@
111 CFLAGS_GLIDE = @CFLAGS_GLIDE@
112 CFLAGS_GNOME = @CFLAGS_GNOME@
113 CFLAGS_GTK = @CFLAGS_GTK@
114 CFLAGS_KDE = @CFLAGS_KDE@
115 CFLAGS_IDCTALTIVEC = @CFLAGS_IDCTALTIVEC@
116 CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
117 CFLAGS_MACOSX = @CFLAGS_MACOSX@
118 CFLAGS_MAD = @CFLAGS_MAD@
119 CFLAGS_MOTIONALTIVEC = @CFLAGS_MOTIONALTIVEC@
120 CFLAGS_QT = @CFLAGS_QT@
121 CFLAGS_SDL = @CFLAGS_SDL@
122 CFLAGS_X11 = @CFLAGS_X11@
123 CFLAGS_XVIDEO = @CFLAGS_XVIDEO@
124
125 #
126 # Additional objects
127 #
128 SRC_DVD_EXTRA = @SRC_DVD_EXTRA@
129 SRC_DVDCSS_EXTRA = @SRC_DVDCSS_EXTRA@
130
131 #
132 # Other special cases
133 #
134 NEED_GETOPT = @NEED_GETOPT@
135 NEED_LIBDVDCSS = @NEED_LIBDVDCSS@
136
137 ###############################################################################
138 # Configuration pre-processing
139 ###############################################################################
140
141 # PROGRAM_OPTIONS is an identification string of the compilation options
142 PROGRAM_OPTIONS = $(SYS) $(ARCH)
143 ifeq ($(DEBUG),1)
144 PROGRAM_OPTIONS += DEBUG
145 DEFINE += -DDEBUG
146 endif
147 ifeq ($(TRACE),1)
148 PROGRAM_OPTIONS += TRACE
149 DEFINE += -DTRACE
150 endif
151 ifeq ($(CPROF),1)
152 PROGRAM_OPTIONS += CPROF
153 DEFINE += -DCPROF
154 endif
155 ifeq ($(GPROF),1)
156 PROGRAM_OPTIONS += GPROF
157 DEFINE += -DGPROF
158 endif
159
160 # PROGRAM_BUILD is a complete identification of the build
161 # (we can't use fancy options with date since OSes like Solaris
162 # or FreeBSD have strange date implementations)
163 ifeq ($(SYS),beos)
164 # XXX: beos does not support hostname (how lame...)
165 PROGRAM_BUILD = `date` $(USER)
166 else
167 PROGRAM_BUILD = `date` $(USER)@`hostname`
168 endif
169
170 # PROGRAM_VERSION is the current vlc version
171 PROGRAM_VERSION=@VLC_VERSION@
172 LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
173
174 # DEFINE will contain some of the constants definitions decided in Makefile, 
175 # including SYS_xx. It will be passed to C compiler.
176 DEFINE_SYS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
177 DEFINE += $(DEFINE_SYS)
178
179 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
180 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 
181
182 # Gettext support
183 DEFINE += -DLOCALEDIR=\"$(datadir)/locale\"
184
185 # Data and plugin location
186 DEFINE += -DDATA_PATH=\"@prefix@/share/videolan\"
187 DEFINE += -DPLUGIN_PATH=\"@prefix@/lib/videolan/vlc\"
188
189 ###############################################################################
190 # Tuning and other variables - do not change anything except if you know
191 # exactly what you are doing
192 ###############################################################################
193
194 #
195 # C headers directories
196 #
197 INCLUDE += @INCLUDE@
198 INCLUDE += -Iinclude -Iextras
199
200 #
201 # Libraries needed by built-in modules
202 #
203 LIB_BUILTINS := $(patsubst %,$$LIB_%,$(shell echo $(BUILTINS) | tr '[a-z]' '[A-Z]'))
204 LIB += $(LIB_BUILTINS)
205
206 #
207 # Libraries
208 #
209 ifneq (,$(findstring mingw32,$(SYS)))
210 LIB += -lws2_32 -lnetapi32
211 endif
212
213 LIB += @LIB@
214
215 #
216 # C compiler flags: mainstream compilation
217 #
218 DEFINE += @DEFINE@
219 CFLAGS += $(DEFINE) $(INCLUDE)
220 CFLAGS += -Wall -Winline
221 CFLAGS += -pipe
222 CFLAGS += -D_REENTRANT
223 CFLAGS += -D_GNU_SOURCE
224
225 ifeq ($(RELEASE),1)
226 CFLAGS += -DRELEASE
227 endif
228
229 # flags needed for clean beos compilation
230 ifeq ($(SYS),beos)
231 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
232 endif
233
234 ifneq (,$(findstring darwin,$(SYS)))
235 CFLAGS += -no-cpp-precomp
236 endif
237
238 ifneq (,$(findstring mingw32,$(SYS)))
239 CFLAGS += -fnative-struct -D_OFF_T_ -D_off_t=long
240 endif
241
242 ifneq (,$(findstring bsd,$(SYS)))
243 CFLAGS += -pthread
244 endif
245
246 # Optimizations : don't compile debug versions with them
247 ifeq ($(OPTIMS),1)
248 CFLAGS += -O3
249 CFLAGS += -ffast-math -funroll-loops
250 ifneq ($(DEBUG),1)
251 ifneq ($(GPROF),1)
252 ifneq ($(CPROF),1)
253 CFLAGS += -fomit-frame-pointer
254 endif
255 endif
256 endif
257
258 ifneq (,$(findstring powerpc,$(ARCH)))
259 # Optimizations for PowerPC
260 CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
261 ifneq (,$(TUNING))
262 CFLAGS += -mtune=$(TUNING)
263 endif
264 else
265 ifneq (,$(findstring sparc,$(ARCH)))
266 # Optimizations for Sparc
267 CFLAGS += -mhard-float
268 ifneq (,$(TUNING))
269 CFLAGS += -mcpu=$(TUNING)
270 endif
271 else
272 # Generic optimizations
273 ifneq (,$(TUNING))
274 CFLAGS += -mcpu=$(TUNING)
275 endif
276 endif
277 endif
278
279 #end of optimisations
280 endif
281
282 #
283 # C compiler flags: dependancies
284 #
285 DCFLAGS += $(INCLUDE)
286 DCFLAGS += -MM
287
288 #
289 # C compiler flags: linking
290 #
291 LDFLAGS += @LDFLAGS@
292 LDFLAGS += $(LIB)
293 LDFLAGS += -Wall
294 ifneq ($(DEBUG),1)
295 ifneq ($(GPROF),1)
296 ifneq ($(CPROF),1)
297 #LDFLAGS += -s
298 endif
299 endif
300 endif
301 ifneq (,$(findstring mingw32,$(SYS)))
302 LDFLAGS += -mwindows -Xlinker --force-exe-suffix
303 endif
304
305 #
306 # C compiler and linker flags: setting soname
307 #
308 SOFLAGS = @SOFLAGS@
309
310 #
311 # C compiler flags: plugin compilation
312 #
313 ifneq (,$(findstring mingw32,$(SYS)))
314 PCFLAGS += -fnative-struct
315 else
316 PCFLAGS += -fPIC
317 endif
318
319 #
320 # C compiler flags: plugin linking
321 #
322 PLDFLAGS += @PLDFLAGS@
323
324 #
325 # Debugging and profiling support
326 #
327 ifeq ($(DEBUG),1)
328 CFLAGS += -g
329 endif
330
331 ifeq ($(CPROF),1)
332 CFLAGS += -finstrument-functions
333 endif
334
335 ifeq ($(GPROF),1)
336 CFLAGS += -pg
337 endif
338
339