]> git.sesse.net Git - vlc/blob - Makefile.opts.in
7ad341481c7e3c4c762b1ed698f7bc656d995f1d
[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_LIBDVDCSS = @LIB_LIBDVDCSS@
96 LIB_LIBDVDREAD = @LIB_LIBDVDREAD@
97 LIB_LIRC = @LIB_LIRC@
98 LIB_MACOSX = @LIB_MACOSX@
99 LIB_MAD = @LIB_MAD@
100 LIB_MOTIONALTIVEC = @LIB_MOTIONALTIVEC@
101 LIB_MPEG_TS = @LIB_MPEG_TS@
102 LIB_NCURSES = @LIB_NCURSES@
103 LIB_QNX = @LIB_QNX@
104 LIB_QT = @LIB_QT@
105 LIB_RC = @LIB_RC@
106 LIB_SDL = @LIB_SDL@
107 LIB_VCD = @LIB_VCD@
108 LIB_WAVEOUT = @LIB_WAVEOUT@
109 LIB_WIN32 = @LIB_WIN32@
110 LIB_X11 = @LIB_X11@
111 LIB_XVIDEO = @LIB_XVIDEO@
112
113 #
114 # CFLAGS for special cases
115 #
116 CFLAGS_COMMON = @CFLAGS_COMMON@
117 CFLAGS_VLC = @CFLAGS_VLC@
118
119 CFLAGS_ARTS = @CFLAGS_ARTS@
120 CFLAGS_DVD = @CFLAGS_DVD@
121 CFLAGS_DVDREAD = @CFLAGS_DVDREAD@
122 CFLAGS_ESD = @CFLAGS_ESD@
123 CFLAGS_GLIDE = @CFLAGS_GLIDE@
124 CFLAGS_GNOME = @CFLAGS_GNOME@
125 CFLAGS_GTK = @CFLAGS_GTK@
126 CFLAGS_KDE = @CFLAGS_KDE@
127 CFLAGS_IDCTALTIVEC = @CFLAGS_IDCTALTIVEC@
128 CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
129 CFLAGS_MACOSX = @CFLAGS_MACOSX@
130 CFLAGS_MAD = @CFLAGS_MAD@
131 CFLAGS_MOTIONALTIVEC = @CFLAGS_MOTIONALTIVEC@
132 CFLAGS_QT = @CFLAGS_QT@
133 CFLAGS_SDL = @CFLAGS_SDL@
134 CFLAGS_WIN32 = @CFLAGS_WIN32@
135 CFLAGS_X11 = @CFLAGS_X11@
136 CFLAGS_XVIDEO = @CFLAGS_XVIDEO@
137
138 #
139 # Additional objects
140 #
141 SRC_DVD_EXTRA = @SRC_DVD_EXTRA@
142 SRC_DVDCSS_EXTRA = @SRC_DVDCSS_EXTRA@
143
144 #
145 # Other special cases
146 #
147 NEED_GETOPT = @NEED_GETOPT@
148 NEED_LIBDVDCSS = @NEED_LIBDVDCSS@
149
150 ###############################################################################
151 # Configuration pre-processing
152 ###############################################################################
153
154 # PROGRAM_OPTIONS is an identification string of the compilation options
155 PROGRAM_OPTIONS = $(SYS) $(ARCH)
156 ifeq ($(DEBUG),1)
157 PROGRAM_OPTIONS += DEBUG
158 DEFINE += -DDEBUG
159 endif
160 ifeq ($(CPROF),1)
161 PROGRAM_OPTIONS += CPROF
162 DEFINE += -DCPROF
163 endif
164 ifeq ($(GPROF),1)
165 PROGRAM_OPTIONS += GPROF
166 DEFINE += -DGPROF
167 endif
168
169 # PROGRAM_BUILD is a complete identification of the build
170 # (we can't use fancy options with date since OSes like Solaris
171 # or FreeBSD have strange date implementations)
172 ifeq ($(SYS),beos)
173 # XXX: beos does not support hostname (how lame...)
174 PROGRAM_BUILD = `date` $(USER)
175 else
176 PROGRAM_BUILD = `date` $(USER)@`hostname`
177 endif
178
179 # PROGRAM_VERSION is the current vlc version
180 PROGRAM_VERSION=@VLC_VERSION@
181 LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
182
183 # DEFINE will contain some of the constants definitions decided in Makefile, 
184 # including SYS_xx. It will be passed to C compiler.
185 DEFINE_SYS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
186 DEFINE += $(DEFINE_SYS)
187
188 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
189 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE
190
191 # Gettext support
192 DEFINE += -DLOCALEDIR=\"$(datadir)/locale\"
193
194 # Data and plugin location
195 DEFINE += -DDATA_PATH=\"@prefix@/share/videolan\"
196 DEFINE += -DPLUGIN_PATH=\"@prefix@/lib/videolan/vlc\"
197
198 ###############################################################################
199 # Tuning and other variables - do not change anything except if you know
200 # exactly what you are doing
201 ###############################################################################
202
203 #
204 # C headers directories
205 #
206 INCLUDE += @INCLUDE@
207 INCLUDE += -Iinclude -Iextras
208
209 #
210 # Libraries needed by built-in modules
211 #
212 LIB_BUILTINS := $(patsubst %,$$LIB_%,$(shell echo $(BUILTINS) | tr '[a-z]' '[A-Z]'))
213
214 #
215 # Libraries needed by the vlc executable
216 #
217 ifneq (,$(findstring mingw32,$(SYS)))
218 LIB_VLC += -lws2_32 -lnetapi32
219 endif
220
221 #
222 # C compiler flags: mainstream compilation
223 #
224 CFLAGS += $(DEFINE) $(INCLUDE)
225 CFLAGS += -D_REENTRANT
226 CFLAGS += -D_GNU_SOURCE
227
228 ifeq ($(RELEASE),1)
229 CFLAGS += -DHAVE_RELEASE
230 endif
231
232 # flags needed for clean beos compilation
233 ifeq ($(SYS),beos)
234 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
235 endif
236
237 ifneq (,$(findstring darwin,$(SYS)))
238 CFLAGS += -no-cpp-precomp
239 endif
240
241 ifneq (,$(findstring mingw32,$(SYS)))
242 CFLAGS += -fnative-struct -D_OFF_T_ -D_off_t=long
243 endif
244
245 ifneq (,$(findstring bsd,$(SYS)))
246 CFLAGS += -pthread
247 endif
248
249 # Optimizations : don't compile debug versions with them
250 ifeq ($(OPTIMS),1)
251 CFLAGS += @CFLAGS_OPTIM@
252 ifneq ($(DEBUG),1)
253 ifneq ($(GPROF),1)
254 ifneq ($(CPROF),1)
255 CFLAGS += @CFLAGS_OPTIM_NODEBUG@
256 endif
257 endif
258 endif
259
260 ifneq (,$(findstring powerpc,$(ARCH)))
261 # Optimizations for PowerPC
262 CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
263 ifneq (,$(TUNING))
264 CFLAGS += -mtune=$(TUNING)
265 endif
266 else
267 ifneq (,$(findstring sparc,$(ARCH)))
268 # Optimizations for Sparc
269 CFLAGS += -mhard-float
270 ifneq (,$(TUNING))
271 CFLAGS += -mcpu=$(TUNING)
272 endif
273 else
274 # Generic optimizations
275 ifneq (,$(TUNING))
276 CFLAGS += -mcpu=$(TUNING)
277 endif
278 endif
279 endif
280
281 #end of optimisations
282 endif
283
284 #
285 # C compiler flags: dependancies
286 #
287 DCFLAGS += $(INCLUDE)
288 DCFLAGS += -M
289
290 #
291 # C compiler flags: linking
292 #
293 LDFLAGS += @LDFLAGS@
294 LDFLAGS += $(LIB)
295 LDFLAGS += -Wall
296 ifneq ($(DEBUG),1)
297 ifneq ($(GPROF),1)
298 ifneq ($(CPROF),1)
299 #LDFLAGS += -s
300 endif
301 endif
302 endif
303 ifneq (,$(findstring mingw32,$(SYS)))
304 LDFLAGS += -mwindows -Xlinker --force-exe-suffix
305 endif
306
307 #
308 # C compiler and linker flags: setting soname
309 #
310 SOFLAGS = @SOFLAGS@
311
312 #
313 # C compiler flags: plugin compilation
314 #
315 ifneq (,$(findstring mingw32,$(SYS)))
316 PCFLAGS += -fnative-struct
317 else
318 PCFLAGS += -fPIC
319 endif
320
321 #
322 # C compiler flags: plugin linking
323 #
324 PLDFLAGS += @PLDFLAGS@
325
326 #
327 # Debugging and profiling support
328 #
329 ifeq ($(DEBUG),1)
330 CFLAGS += -g
331 endif
332
333 ifeq ($(CPROF),1)
334 CFLAGS += -finstrument-functions
335 endif
336
337 ifeq ($(GPROF),1)
338 CFLAGS += -pg
339 endif
340
341