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