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