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