]> git.sesse.net Git - vlc/blob - Makefile.opts.in
* fixed typo in the win32 change to the input parser.
[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_ALSA = @LIB_ALSA@
69 LIB_ARTS = @LIB_ARTS@
70 LIB_BEOS = @LIB_BEOS@
71 LIB_DARWIN = @LIB_DARWIN@
72 LIB_DIRECTX = @LIB_DIRECTX@
73 LIB_DSP = @LIB_DSP@
74 LIB_DVD = @LIB_DVD@
75 LIB_DVDREAD = @LIB_DVDREAD@
76 LIB_ESD = @LIB_ESD@
77 LIB_FILTER_DISTORT = @LIB_FILTER_DISTORT@
78 LIB_GGI = @LIB_GGI@
79 LIB_GLIDE = @LIB_GLIDE@
80 LIB_GNOME = @LIB_GNOME@
81 LIB_GTK = @LIB_GTK@
82 LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@
83 LIB_IMDCT = @LIB_IMDCT@
84 LIB_IMDCT3DN = @LIB_IMDCT3DN@
85 LIB_IMDCTSSE = @LIB_IMDCTSSE@
86 LIB_KDE = @LIB_KDE@
87 LIB_A52 = @LIB_A52@
88 LIB_LIBDVDCSS = @LIB_LIBDVDCSS@
89 LIB_LIBDVDREAD = @LIB_LIBDVDREAD@
90 LIB_LIRC = @LIB_LIRC@
91 LIB_MACOSX = @LIB_MACOSX@
92 LIB_MAD = @LIB_MAD@
93 LIB_MOTIONALTIVEC = @LIB_MOTIONALTIVEC@
94 LIB_MPEG_TS = @LIB_MPEG_TS@
95 LIB_NCURSES = @LIB_NCURSES@
96 LIB_QNX = @LIB_QNX@
97 LIB_QT = @LIB_QT@
98 LIB_RC = @LIB_RC@
99 LIB_SDL = @LIB_SDL@
100 LIB_VCD = @LIB_VCD@
101 LIB_WAVEOUT = @LIB_WAVEOUT@
102 LIB_WIN32 = @LIB_WIN32@
103 LIB_X11 = @LIB_X11@
104 LIB_XVIDEO = @LIB_XVIDEO@
105
106 #
107 # CFLAGS for special cases
108 #
109 CFLAGS_VLC = @CFLAGS_VLC@
110 CFLAGS_ARTS = @CFLAGS_ARTS@
111 CFLAGS_DVD = @CFLAGS_DVD@
112 CFLAGS_DVDREAD = @CFLAGS_DVDREAD@
113 CFLAGS_ESD = @CFLAGS_ESD@
114 CFLAGS_GLIDE = @CFLAGS_GLIDE@
115 CFLAGS_GNOME = @CFLAGS_GNOME@
116 CFLAGS_GTK = @CFLAGS_GTK@
117 CFLAGS_KDE = @CFLAGS_KDE@
118 CFLAGS_IDCTALTIVEC = @CFLAGS_IDCTALTIVEC@
119 CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
120 CFLAGS_MACOSX = @CFLAGS_MACOSX@
121 CFLAGS_MAD = @CFLAGS_MAD@
122 CFLAGS_MOTIONALTIVEC = @CFLAGS_MOTIONALTIVEC@
123 CFLAGS_QT = @CFLAGS_QT@
124 CFLAGS_SDL = @CFLAGS_SDL@
125 CFLAGS_WIN32 = @CFLAGS_WIN32@
126 CFLAGS_X11 = @CFLAGS_X11@
127 CFLAGS_XVIDEO = @CFLAGS_XVIDEO@
128
129 #
130 # Additional objects
131 #
132 SRC_DVD_EXTRA = @SRC_DVD_EXTRA@
133 SRC_DVDCSS_EXTRA = @SRC_DVDCSS_EXTRA@
134
135 #
136 # Other special cases
137 #
138 NEED_GETOPT = @NEED_GETOPT@
139 NEED_LIBDVDCSS = @NEED_LIBDVDCSS@
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 # PROGRAM_VERSION is the current vlc version
171 PROGRAM_VERSION=@VLC_VERSION@
172 LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
173
174 # DEFINE will contain some of the constants definitions decided in Makefile, 
175 # including SYS_xx. It will be passed to C compiler.
176 DEFINE_SYS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
177 DEFINE += $(DEFINE_SYS)
178
179 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
180 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE
181
182 # Gettext support
183 DEFINE += -DLOCALEDIR=\"$(datadir)/locale\"
184
185 # Data and plugin location
186 DEFINE += -DDATA_PATH=\"@prefix@/share/videolan\"
187 DEFINE += -DPLUGIN_PATH=\"@prefix@/lib/videolan/vlc\"
188
189 ###############################################################################
190 # Tuning and other variables - do not change anything except if you know
191 # exactly what you are doing
192 ###############################################################################
193
194 #
195 # C headers directories
196 #
197 INCLUDE += @INCLUDE@
198 INCLUDE += -Iinclude -Iextras
199
200 #
201 # Libraries needed by built-in modules
202 #
203 LIB_BUILTINS := $(patsubst %,$$LIB_%,$(shell echo $(BUILTINS) | tr '[a-z]' '[A-Z]'))
204 LIB += $(LIB_BUILTINS)
205
206 #
207 # Libraries
208 #
209 ifneq (,$(findstring mingw32,$(SYS)))
210 LIB += -lws2_32 -lnetapi32
211 endif
212
213 LIB += @LIB@
214
215 #
216 # C compiler flags: mainstream compilation
217 #
218 CFLAGS += $(DEFINE) $(INCLUDE)
219 CFLAGS += -D_REENTRANT
220 CFLAGS += -D_GNU_SOURCE
221
222 ifeq ($(RELEASE),1)
223 CFLAGS += -DHAVE_RELEASE
224 endif
225
226 # flags needed for clean beos compilation
227 ifeq ($(SYS),beos)
228 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
229 endif
230
231 ifneq (,$(findstring darwin,$(SYS)))
232 CFLAGS += -no-cpp-precomp
233 endif
234
235 ifneq (,$(findstring mingw32,$(SYS)))
236 CFLAGS += -fnative-struct -D_OFF_T_ -D_off_t=long
237 endif
238
239 ifneq (,$(findstring bsd,$(SYS)))
240 CFLAGS += -pthread
241 endif
242
243 # Optimizations : don't compile debug versions with them
244 ifeq ($(OPTIMS),1)
245 CFLAGS += @CFLAGS_OPTIM@
246 ifneq ($(DEBUG),1)
247 ifneq ($(GPROF),1)
248 ifneq ($(CPROF),1)
249 CFLAGS += @CFLAGS_OPTIM_NODEBUG@
250 endif
251 endif
252 endif
253
254 ifneq (,$(findstring powerpc,$(ARCH)))
255 # Optimizations for PowerPC
256 CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
257 ifneq (,$(TUNING))
258 CFLAGS += -mtune=$(TUNING)
259 endif
260 else
261 ifneq (,$(findstring sparc,$(ARCH)))
262 # Optimizations for Sparc
263 CFLAGS += -mhard-float
264 ifneq (,$(TUNING))
265 CFLAGS += -mcpu=$(TUNING)
266 endif
267 else
268 # Generic optimizations
269 ifneq (,$(TUNING))
270 CFLAGS += -mcpu=$(TUNING)
271 endif
272 endif
273 endif
274
275 #end of optimisations
276 endif
277
278 #
279 # C compiler flags: dependancies
280 #
281 DCFLAGS += $(INCLUDE)
282 DCFLAGS += -M
283
284 #
285 # C compiler flags: linking
286 #
287 LDFLAGS += @LDFLAGS@
288 LDFLAGS += $(LIB)
289 LDFLAGS += -Wall
290 ifneq ($(DEBUG),1)
291 ifneq ($(GPROF),1)
292 ifneq ($(CPROF),1)
293 #LDFLAGS += -s
294 endif
295 endif
296 endif
297 ifneq (,$(findstring mingw32,$(SYS)))
298 LDFLAGS += -mwindows -Xlinker --force-exe-suffix
299 endif
300
301 #
302 # C compiler and linker flags: setting soname
303 #
304 SOFLAGS = @SOFLAGS@
305
306 #
307 # C compiler flags: plugin compilation
308 #
309 ifneq (,$(findstring mingw32,$(SYS)))
310 PCFLAGS += -fnative-struct
311 else
312 PCFLAGS += -fPIC
313 endif
314
315 #
316 # C compiler flags: plugin linking
317 #
318 PLDFLAGS += @PLDFLAGS@
319
320 #
321 # Debugging and profiling support
322 #
323 ifeq ($(DEBUG),1)
324 CFLAGS += -g
325 endif
326
327 ifeq ($(CPROF),1)
328 CFLAGS += -finstrument-functions
329 endif
330
331 ifeq ($(GPROF),1)
332 CFLAGS += -pg
333 endif
334
335