]> git.sesse.net Git - vlc/blob - Makefile.opts.in
* Fixed a segfault at EOF in input_es.c and input_ts.c (when i_read == 0).
[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_ALTIVEC = @LIB_ALTIVEC@
71 LIB_ARTS = @LIB_ARTS@
72 LIB_BEOS = @LIB_BEOS@
73 LIB_DARWIN = @LIB_DARWIN@
74 LIB_DIRECTX = @LIB_DIRECTX@
75 LIB_DVD = @LIB_DVD@
76 LIB_DVD_PLUGIN = @LIB_DVD_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_IMDCT = @LIB_IMDCT@
86 LIB_IMDCT3DN = @LIB_IMDCT3DN@
87 LIB_IMDCTSSE = @LIB_IMDCTSSE@
88 LIB_KDE = @LIB_KDE@
89 LIB_LIBDVDCSS = @LIB_LIBDVDCSS@
90 LIB_MACOSX = @LIB_MACOSX@
91 LIB_MAD = @LIB_MAD@
92 LIB_MPEG_TS = @LIB_MPEG_TS@
93 LIB_NCURSES = @LIB_NCURSES@
94 LIB_QNX = @LIB_QNX@
95 LIB_QT = @LIB_QT@
96 LIB_RC = @LIB_RC@
97 LIB_SDL = @LIB_SDL@
98 LIB_X11 = @LIB_X11@
99 LIB_XVIDEO = @LIB_XVIDEO@
100
101 #
102 # CFLAGS for special cases
103 #
104 CFLAGS_VLC = @CFLAGS_VLC@
105 CFLAGS_ALTIVEC = @CFLAGS_ALTIVEC@
106 CFLAGS_DVD = @CFLAGS_DVD@
107 CFLAGS_DVDREAD = @CFLAGS_DVDREAD@
108 CFLAGS_ARTS = @CFLAGS_ARTS@
109 CFLAGS_ESD = @CFLAGS_ESD@
110 CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
111 CFLAGS_ESD = @CFLAGS_ESD@
112 CFLAGS_GTK = @CFLAGS_GTK@
113 CFLAGS_MAD = @CFLAGS_MAD@
114 CFLAGS_SDL = @CFLAGS_SDL@
115 CFLAGS_X11 = @CFLAGS_X11@
116 CFLAGS_XVIDEO = @CFLAGS_XVIDEO@
117
118 #
119 # Additional objects
120 #
121 OBJ_DVD = @OBJ_DVD@
122 OBJ_LIBDVDCSS = @OBJ_LIBDVDCSS@
123
124 #
125 # Other special cases
126 #
127 NEED_GETOPT = @NEED_GETOPT@
128 NEED_LIBDVDCSS = @NEED_LIBDVDCSS@
129
130 ###############################################################################
131 # Configuration pre-processing
132 ###############################################################################
133
134 # PROGRAM_OPTIONS is an identification string of the compilation options
135 PROGRAM_OPTIONS = $(SYS) $(ARCH)
136 ifeq ($(DEBUG),1)
137 PROGRAM_OPTIONS += DEBUG
138 DEFINE += -DDEBUG
139 endif
140 ifeq ($(TRACE),1)
141 PROGRAM_OPTIONS += TRACE
142 DEFINE += -DTRACE
143 endif
144 ifeq ($(CPROF),1)
145 PROGRAM_OPTIONS += CPROF
146 DEFINE += -DCPROF
147 endif
148 ifeq ($(GPROF),1)
149 PROGRAM_OPTIONS += GPROF
150 DEFINE += -DGPROF
151 endif
152
153 # PROGRAM_BUILD is a complete identification of the build
154 # (we can't use fancy options with date since OSes like Solaris
155 # or FreeBSD have strange date implementations)
156 ifeq ($(SYS),beos)
157 # XXX: beos does not support hostname (how lame...)
158 PROGRAM_BUILD = `date` $(USER)
159 else
160 PROGRAM_BUILD = `date` $(USER)@`hostname`
161 endif
162
163 # PROGRAM_VERSION is the current vlc version
164 PROGRAM_VERSION=@VLC_VERSION@
165 LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
166
167 # DEFINE will contain some of the constants definitions decided in Makefile, 
168 # including SYS_xx. It will be passed to C compiler.
169 DEFINE_CONSTANTS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
170 DEFINE += $(DEFINE_CONSTANTS)
171
172 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
173 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 
174
175 # Gettext support
176 DEFINE += -DLOCALEDIR=\"$(datadir)/locale\"
177
178 ###############################################################################
179 # Tuning and other variables - do not change anything except if you know
180 # exactly what you are doing
181 ###############################################################################
182
183 #
184 # C headers directories
185 #
186 INCLUDE += @INCLUDE@
187 INCLUDE += -Iinclude -Iextras
188
189 #
190 # Libraries needed by built-in modules
191 #
192 # Let's go for a crude hack !
193 LIB_MOTIONALTIVEC := $(LIB_ALTIVEC)
194 LIB_IDCTALTIVEC := $(LIB_ALTIVEC)
195 ifneq (,$(BUILTINS))
196 LIB_BUILTINS := $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
197 LIB += $(LIB_BUILTINS)
198 endif
199
200 #
201 # Libraries
202 #
203 ifneq (,$(findstring mingw32,$(SYS)))
204 LIB += -lws2_32 -lnetapi32
205 endif
206
207 LIB += @LIB@
208
209 #
210 # C compiler flags: mainstream compilation
211 #
212 DEFINE += @DEFINE@
213 CFLAGS += $(DEFINE) $(INCLUDE)
214 CFLAGS += -Wall -Winline
215 CFLAGS += -pipe
216 CFLAGS += -D_REENTRANT
217 CFLAGS += -D_GNU_SOURCE
218
219 ifeq ($(RELEASE),1)
220 CFLAGS += -DRELEASE
221 endif
222
223 # flags needed for clean beos compilation
224 ifeq ($(SYS),beos)
225 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
226 endif
227
228 ifneq (,$(findstring darwin,$(SYS)))
229 CFLAGS += -no-cpp-precomp
230 endif
231
232 ifneq (,$(findstring mingw32,$(SYS)))
233 CFLAGS += -fnative-struct -D_OFF_T_ -D_off_t=long
234 endif
235
236 ifneq (,$(findstring bsd,$(SYS)))
237 CFLAGS += -pthread
238 endif
239
240 # Optimizations : don't compile debug versions with them
241 ifeq ($(OPTIMS),1)
242 CFLAGS += -O3
243 CFLAGS += -ffast-math -funroll-loops
244 ifneq ($(DEBUG),1)
245 ifneq ($(GPROF),1)
246 ifneq ($(CPROF),1)
247 CFLAGS += -fomit-frame-pointer
248 endif
249 endif
250 endif
251
252 ifneq (,$(findstring powerpc,$(ARCH)))
253 # Optimizations for PowerPC
254 CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
255 ifneq (,$(TUNING))
256 CFLAGS += -mtune=$(TUNING)
257 endif
258 else
259 ifneq (,$(findstring sparc,$(ARCH)))
260 # Optimizations for Sparc
261 CFLAGS += -mhard-float
262 ifneq (,$(TUNING))
263 CFLAGS += -mcpu=$(TUNING)
264 endif
265 else
266 # Generic optimizations
267 ifneq (,$(TUNING))
268 CFLAGS += -mcpu=$(TUNING)
269 endif
270 endif
271 endif
272
273 #end of optimisations
274 endif
275
276 #
277 # C compiler flags: dependancies
278 #
279 DCFLAGS += $(INCLUDE)
280 DCFLAGS += -MM
281
282 #
283 # C compiler flags: linking
284 #
285 LCFLAGS += @LCFLAGS@ $(LIB)
286 LCFLAGS += -Wall
287 ifneq ($(DEBUG),1)
288 ifneq ($(GPROF),1)
289 ifneq ($(CPROF),1)
290 #LCFLAGS += -s
291 endif
292 endif
293 endif
294 ifneq (,$(findstring mingw32,$(SYS)))
295 LCFLAGS += -mwindows -Xlinker --force-exe-suffix
296 endif
297
298 #
299 # C compiler and linker flags: setting soname
300 #
301 SOFLAGS = @SOFLAGS@
302
303 #
304 # C compiler flags: plugin compilation
305 #
306 ifneq (,$(findstring mingw32,$(SYS)))
307 PCFLAGS += -fnative-struct
308 else
309 PCFLAGS += -fPIC
310 endif
311
312 #
313 # C compiler flags: plugin linking
314 #
315 PLCFLAGS += @PLCFLAGS@
316
317 #
318 # Debugging and profiling support
319 #
320 ifeq ($(DEBUG),1)
321 CFLAGS += -g
322 endif
323
324 ifeq ($(CPROF),1)
325 CFLAGS += -finstrument-functions
326 endif
327
328 ifeq ($(GPROF),1)
329 CFLAGS += -pg
330 endif
331
332