]> git.sesse.net Git - vlc/blob - Makefile.opts.in
* ./plugins/ogg/*: added preliminary files for an Ogg/Vorbis decoder a
[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 CPROF = @CPROF@
39 GPROF = @GPROF@
40 OPTIMS = @OPTIMS@
41 TUNING = @TUNING@
42 RELEASE = @RELEASE@
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 DLL_PATH = @DLL_PATH@
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_COMMON = @LIB_COMMON@
69 LIB_VLC = @LIB_VLC@
70
71 LIB_A52 = @LIB_A52@
72 LIB_AA = @LIB_AA@
73 LIB_ALSA = @LIB_ALSA@
74 LIB_ARTS = @LIB_ARTS@
75 LIB_BEOS = @LIB_BEOS@
76 LIB_CHROMA_I420_RGB = @LIB_CHROMA_I420_RGB@
77 LIB_DARWIN = @LIB_DARWIN@
78 LIB_DIRECTX = @LIB_DIRECTX@
79 LIB_DSP = @LIB_DSP@
80 LIB_DVD = @LIB_DVD@
81 LIB_DVDREAD = @LIB_DVDREAD@
82 LIB_ESD = @LIB_ESD@
83 LIB_FILTER_DISTORT = @LIB_FILTER_DISTORT@
84 LIB_GGI = @LIB_GGI@
85 LIB_GLIDE = @LIB_GLIDE@
86 LIB_GNOME = @LIB_GNOME@
87 LIB_GTK = @LIB_GTK@
88 LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@
89 LIB_IMDCT = @LIB_IMDCT@
90 LIB_IMDCT3DN = @LIB_IMDCT3DN@
91 LIB_IMDCTSSE = @LIB_IMDCTSSE@
92 LIB_IPV4 = @LIB_IPV4@
93 LIB_IPV6 = @LIB_IPV6@
94 LIB_KDE = @LIB_KDE@
95 LIB_LIRC = @LIB_LIRC@
96 LIB_MACOSX = @LIB_MACOSX@
97 LIB_MAD = @LIB_MAD@
98 LIB_MOTIONALTIVEC = @LIB_MOTIONALTIVEC@
99 LIB_MPEG_TS = @LIB_MPEG_TS@
100 LIB_NCURSES = @LIB_NCURSES@
101 LIB_QNX = @LIB_QNX@
102 LIB_QT = @LIB_QT@
103 LIB_RC = @LIB_RC@
104 LIB_SDL = @LIB_SDL@
105 LIB_VCD = @LIB_VCD@
106 LIB_VORBIS = @LIB_VORBIS@
107 LIB_WAVEOUT = @LIB_WAVEOUT@
108 LIB_WIN32 = @LIB_WIN32@
109 LIB_X11 = @LIB_X11@
110 LIB_XVIDEO = @LIB_XVIDEO@
111
112 #
113 # CFLAGS for special cases
114 #
115 CFLAGS_COMMON = @CFLAGS_COMMON@
116 CFLAGS_VLC = @CFLAGS_VLC@
117
118 CFLAGS_ARTS = @CFLAGS_ARTS@
119 CFLAGS_DVD = @CFLAGS_DVD@
120 CFLAGS_DVDREAD = @CFLAGS_DVDREAD@
121 CFLAGS_ESD = @CFLAGS_ESD@
122 CFLAGS_GLIDE = @CFLAGS_GLIDE@
123 CFLAGS_GNOME = @CFLAGS_GNOME@
124 CFLAGS_GTK = @CFLAGS_GTK@
125 CFLAGS_KDE = @CFLAGS_KDE@
126 CFLAGS_IDCTALTIVEC = @CFLAGS_IDCTALTIVEC@
127 CFLAGS_MACOSX = @CFLAGS_MACOSX@
128 CFLAGS_MAD = @CFLAGS_MAD@
129 CFLAGS_MOTIONALTIVEC = @CFLAGS_MOTIONALTIVEC@
130 CFLAGS_QT = @CFLAGS_QT@
131 CFLAGS_SDL = @CFLAGS_SDL@
132 CFLAGS_WIN32 = @CFLAGS_WIN32@
133 CFLAGS_X11 = @CFLAGS_X11@
134 CFLAGS_XVIDEO = @CFLAGS_XVIDEO@
135
136 #
137 # Other special cases
138 #
139 NEED_GETOPT = @NEED_GETOPT@
140
141 ###############################################################################
142 # Configuration pre-processing
143 ###############################################################################
144
145 # PROGRAM_OPTIONS is an identification string of the compilation options
146 PROGRAM_OPTIONS = $(SYS) $(ARCH)
147 ifeq ($(DEBUG),1)
148 PROGRAM_OPTIONS += DEBUG
149 DEFINE += -DDEBUG
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 # DEFINE will contain some of the constants definitions decided in Makefile, 
171 # including SYS_xx. It will be passed to C compiler.
172 DEFINE_SYS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
173 DEFINE += $(DEFINE_SYS)
174
175 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
176 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE
177
178 # Gettext support
179 DEFINE += -DLOCALEDIR=\"$(datadir)/locale\"
180
181 # Data and plugin location
182 DEFINE += -DDATA_PATH=\"@prefix@/share/videolan\"
183 DEFINE += -DPLUGIN_PATH=\"@prefix@/lib/videolan/vlc\"
184
185 ###############################################################################
186 # Tuning and other variables - do not change anything except if you know
187 # exactly what you are doing
188 ###############################################################################
189
190 #
191 # C headers directories
192 #
193 INCLUDE += @INCLUDE@
194 INCLUDE += -Iinclude -Iextras
195
196 #
197 # Libraries needed by built-in modules
198 #
199 LIB_BUILTINS := $(patsubst %,$$LIB_%,$(shell echo $(BUILTINS) | tr '[a-z]' '[A-Z]'))
200
201 #
202 # Libraries needed by the vlc executable
203 #
204 ifneq (,$(findstring mingw32,$(SYS)))
205 LIB_VLC += -lws2_32 -lnetapi32
206 endif
207
208 #
209 # C compiler flags: mainstream compilation
210 #
211 CFLAGS += $(DEFINE) $(INCLUDE)
212 CFLAGS += -D_REENTRANT
213 CFLAGS += -D_GNU_SOURCE
214
215 ifeq ($(RELEASE),1)
216 CFLAGS += -DHAVE_RELEASE
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 += @CFLAGS_OPTIM@
239 ifneq ($(DEBUG),1)
240 ifneq ($(GPROF),1)
241 ifneq ($(CPROF),1)
242 CFLAGS += @CFLAGS_OPTIM_NODEBUG@
243 endif
244 endif
245 endif
246
247 ifneq (,$(findstring powerpc,$(ARCH)))
248 # Optimizations for PowerPC
249 CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
250 ifneq (,$(TUNING))
251 CFLAGS += -mtune=$(TUNING)
252 endif
253 else
254 ifneq (,$(findstring sparc,$(ARCH)))
255 # Optimizations for Sparc
256 CFLAGS += -mhard-float
257 ifneq (,$(TUNING))
258 CFLAGS += -mcpu=$(TUNING)
259 endif
260 else
261 # Generic optimizations
262 ifneq (,$(TUNING))
263 CFLAGS += -mcpu=$(TUNING)
264 endif
265 endif
266 endif
267
268 #end of optimisations
269 endif
270
271 #
272 # C compiler flags: dependancies
273 #
274 DCFLAGS += $(INCLUDE)
275 DCFLAGS += -M
276
277 #
278 # C compiler flags: linking
279 #
280 LDFLAGS += @LDFLAGS@
281 LDFLAGS += $(LIB)
282 LDFLAGS += -Wall
283 ifneq ($(DEBUG),1)
284 ifneq ($(GPROF),1)
285 ifneq ($(CPROF),1)
286 #LDFLAGS += -s
287 endif
288 endif
289 endif
290 ifneq (,$(findstring mingw32,$(SYS)))
291 LDFLAGS += -mwindows -Xlinker --force-exe-suffix
292 endif
293
294 #
295 # C compiler flags: plugin compilation
296 #
297 ifneq (,$(findstring mingw32,$(SYS)))
298 PCFLAGS += -fnative-struct
299 else
300 PCFLAGS += -fPIC
301 endif
302
303 #
304 # C compiler flags: plugin linking
305 #
306 PLDFLAGS += @PLDFLAGS@
307
308 #
309 # Debugging and profiling support
310 #
311 ifeq ($(DEBUG),1)
312 CFLAGS += -g
313 endif
314
315 ifeq ($(CPROF),1)
316 CFLAGS += -finstrument-functions
317 endif
318
319 ifeq ($(GPROF),1)
320 CFLAGS += -pg
321 endif
322
323