]> git.sesse.net Git - vlc/blob - Makefile.opts.in
* ./HACKING: we can now use automake-1.5 instead of automake-1.6. But now
[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 # Build options
14
15 SYS = @SYS@
16 ALIASES =@ALIASES@
17 MOZILLA = @MOZILLA@
18 INSTALL = @INSTALL@
19 ARCH = @ARCH@
20
21 #
22 # Compilation options
23 #
24 DEBUG = @DEBUG@
25 CPROF = @CPROF@
26 GPROF = @GPROF@
27 OPTIMS = @OPTIMS@
28 TUNING = @TUNING@
29 RELEASE = @RELEASE@
30
31
32 # Build environment
33
34 CC = @CC@
35 CFLAGS += @CFLAGS@
36 SHELL = @SHELL@
37 RANLIB = @RANLIB@
38 STRIP = @STRIP@
39 MOC = @MOC@
40 WINDRES = @WINDRES@
41 BCBUILDER = @BCBUILDER@
42
43
44 # Installation environment
45
46 exec_prefix = @exec_prefix@
47 prefix = @prefix@
48 bindir = @bindir@
49 datadir = @datadir@
50 libdir = @libdir@
51 includedir = @includedir@
52
53 #
54 # CFLAGS for special cases
55 #
56 vlc_CFLAGS = @vlc_CFLAGS@
57 plugins_CFLAGS = @plugins_CFLAGS@
58 builtins_CFLAGS = @builtins_CFLAGS@
59 mozilla_CFLAGS = @mozilla_CFLAGS@
60
61 a52_CFLAGS = @a52_CFLAGS@
62 arts_CFLAGS = @arts_CFLAGS@
63 i420_yuy2_mmx_CFLAGS = @i420_yuy2_mmx_CFLAGS@
64 directx_CFLAGS = @directx_CFLAGS@
65 dvd_CFLAGS = @dvd_CFLAGS@
66 dvdread_CFLAGS = @dvdread_CFLAGS@
67 dvdplay_CFLAGS = @dvdplay_CFLAGS@
68 esd_CFLAGS = @esd_CFLAGS@
69 familiar_CFLAGS = @familiar_CFLAGS@
70 faad_CFLAGS = @faad_CFLAGS@
71 ffmpeg_CFLAGS = @ffmpeg_CFLAGS@
72 glide_CFLAGS = @glide_CFLAGS@
73 gnome_CFLAGS = @gnome_CFLAGS@
74 gtk_CFLAGS = @gtk_CFLAGS@
75 gtk_main_CFLAGS = @gtk_main_CFLAGS@
76 idctaltivec_CFLAGS = @idctaltivec_CFLAGS@
77 kde_CFLAGS = @kde_CFLAGS@
78 mad_CFLAGS = @mad_CFLAGS@
79 memcpyaltivec_CFLAGS = @memcpyaltivec_CFLAGS@
80 motionaltivec_CFLAGS = @motionaltivec_CFLAGS@
81 ts_dvbpsi_CFLAGS = @ts_dvbpsi_CFLAGS@
82 qt_CFLAGS = @qt_CFLAGS@
83 qte_CFLAGS = @qte_CFLAGS@
84 sdl_CFLAGS = @sdl_CFLAGS@
85 svgalib_CFLAGS = @svgalib_CFLAGS@
86 x11_CFLAGS = @x11_CFLAGS@
87 xvideo_CFLAGS = @xvideo_CFLAGS@
88
89 #
90 # Libraries for special cases
91 #
92 vlc_LDFLAGS = @vlc_LDFLAGS@
93 plugins_LDFLAGS = @plugins_LDFLAGS@
94 builtins_LDFLAGS = @builtins_LDFLAGS@
95 mozilla_LDFLAGS = @mozilla_LDFLAGS@
96
97 a52_LDFLAGS = @a52_LDFLAGS@
98 aa_LDFLAGS = @aa_LDFLAGS@
99 alsa_LDFLAGS = @alsa_LDFLAGS@
100 arts_LDFLAGS = @arts_LDFLAGS@
101 beos_LDFLAGS = @beos_LDFLAGS@
102 i420_rgb_LDFLAGS = @i420_rgb_LDFLAGS@
103 directx_LDFLAGS = @directx_LDFLAGS@
104 dv_LDFLAGS = @dv_LDFLAGS@
105 dvd_LDFLAGS = @dvd_LDFLAGS@
106 dvdread_LDFLAGS = @dvdread_LDFLAGS@
107 dvdplay_LDFLAGS = @dvdplay_LDFLAGS@
108 esd_LDFLAGS = @esd_LDFLAGS@
109 familiar_LDFLAGS = @familiar_LDFLAGS@
110 distort_LDFLAGS = @distort_LDFLAGS@
111 faad_LDFLAGS = @faad_LDFLAGS@
112 ffmpeg_LDFLAGS = @ffmpeg_LDFLAGS@
113 mp4_LDFLAGS = @mp4_LDFLAGS@
114 ggi_LDFLAGS = @ggi_LDFLAGS@
115 glide_LDFLAGS = @glide_LDFLAGS@
116 gnome_LDFLAGS = @gnome_LDFLAGS@
117 gtk_LDFLAGS = @gtk_LDFLAGS@
118 gtk_main_LDFLAGS = @gtk_main_LDFLAGS@
119 http_LDFLAGS = @http_LDFLAGS@
120 idctaltivec_LDFLAGS = @idctaltivec_LDFLAGS@
121 imdct_LDFLAGS = @imdct_LDFLAGS@
122 imdct3dn_LDFLAGS = @imdct3dn_LDFLAGS@
123 imdctsse_LDFLAGS = @imdctsse_LDFLAGS@
124 ipv4_LDFLAGS = @ipv4_LDFLAGS@
125 ipv6_LDFLAGS = @ipv6_LDFLAGS@
126 kde_LDFLAGS = @kde_LDFLAGS@
127 lirc_LDFLAGS = @lirc_LDFLAGS@
128 macosx_LDFLAGS = @macosx_LDFLAGS@
129 mad_LDFLAGS = @mad_LDFLAGS@
130 memcpyaltivec_LDFLAGS = @memcpyaltivec_LDFLAGS@
131 motionaltivec_LDFLAGS = @motionaltivec_LDFLAGS@
132 ncurses_LDFLAGS = @ncurses_LDFLAGS@
133 oss_LDFLAGS = @oss_LDFLAGS@
134 qnx_LDFLAGS = @qnx_LDFLAGS@
135 qt_LDFLAGS = @qt_LDFLAGS@
136 qte_LDFLAGS = @qte_LDFLAGS@
137 rc_LDFLAGS = @rc_LDFLAGS@
138 sdl_LDFLAGS = @sdl_LDFLAGS@
139 svgalib_LDFLAGS = @svgalib_LDFLAGS@
140 audio_LDFLAGS = @audio_LDFLAGS@
141 ts_dvbpsi_LDFLAGS = @ts_dvbpsi_LDFLAGS@
142 vcd_LDFLAGS = @vcd_LDFLAGS@
143 vorbis_LDFLAGS = @vorbis_LDFLAGS@
144 waveout_LDFLAGS = @waveout_LDFLAGS@
145 x11_LDFLAGS = @x11_LDFLAGS@
146 xosd_LDFLAGS = @xosd_LDFLAGS@
147 xvideo_LDFLAGS = @xvideo_LDFLAGS@
148 id3tag_LDFLAGS = @id3tag_LDFLAGS@
149
150 #
151 # Other special cases
152 #
153 NEED_GETOPT = @NEED_GETOPT@
154
155 ###############################################################################
156 # Configuration pre-processing
157 ###############################################################################
158
159 # PROGRAM_OPTIONS is an identification string of the compilation options
160 PROGRAM_OPTIONS = $(SYS) $(ARCH)
161 ifeq ($(DEBUG),1)
162 PROGRAM_OPTIONS += DEBUG
163 CFLAGS += -DDEBUG
164 endif
165 ifeq ($(CPROF),1)
166 PROGRAM_OPTIONS += CPROF
167 CFLAGS += -DCPROF
168 endif
169 ifeq ($(GPROF),1)
170 PROGRAM_OPTIONS += GPROF
171 CFLAGS += -DGPROF
172 endif
173
174 # PROGRAM_BUILD is a complete identification of the build
175 # (we can't use fancy options with date since OSes like Solaris
176 # or FreeBSD have strange date implementations)
177 ifeq ($(SYS),beos)
178 # XXX: beos does not support hostname (how lame...)
179 PROGRAM_BUILD = `date` $(USER)
180 else
181 PROGRAM_BUILD = `date` $(USER)@`hostname`
182 endif
183
184 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
185 CFLAGS += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE
186
187 # Gettext support
188 CFLAGS += -DLOCALEDIR=\"$(datadir)/locale\"
189
190 # Data and plugin location
191 CFLAGS += -DDATA_PATH=\"@prefix@/share/vlc\"
192 CFLAGS += -DPLUGIN_PATH=\"@prefix@/lib/vlc\"
193
194 ###############################################################################
195 # Tuning and other variables - do not change anything except if you know
196 # exactly what you are doing
197 ###############################################################################
198
199 #
200 # C headers directories
201 #
202 vlc_CFLAGS += -Iinclude -Iextras -I.
203
204 #
205 # C compiler flags: mainstream compilation
206 #
207 CFLAGS += -D_REENTRANT -D_THREAD_SAFE
208 CFLAGS += -D_GNU_SOURCE
209
210 ifeq ($(RELEASE),1)
211 CFLAGS += -DHAVE_RELEASE
212 endif
213
214 CFLAGS += -D__VLC__
215
216 # Optimizations : don't compile debug versions with them
217 ifeq ($(OPTIMS),1)
218 CFLAGS += @CFLAGS_OPTIM@
219 ifneq ($(DEBUG),1)
220 ifneq ($(GPROF),1)
221 ifneq ($(CPROF),1)
222 CFLAGS += @CFLAGS_OPTIM_NODEBUG@
223 endif
224 endif
225 endif
226
227 ifneq (,$(findstring powerpc,$(ARCH)))
228 # Optimizations for PowerPC
229 CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
230 ifneq (,$(TUNING))
231 CFLAGS += -mtune=$(TUNING)
232 endif
233 else
234 ifneq (,$(findstring sparc,$(ARCH)))
235 # Optimizations for Sparc
236 CFLAGS += -mhard-float
237 ifneq (,$(TUNING))
238 CFLAGS += -mcpu=$(TUNING)
239 endif
240 else
241 # Generic optimizations
242 ifneq (,$(TUNING))
243 CFLAGS += -mcpu=$(TUNING)
244 endif
245 endif
246 endif
247
248 #end of optimisations
249 endif
250
251 #
252 # C compiler flags: linking
253 #
254 LDFLAGS += @LDFLAGS@
255 LDFLAGS += -Wall
256 ifneq ($(DEBUG),1)
257 ifneq ($(GPROF),1)
258 ifneq ($(CPROF),1)
259 #LDFLAGS += -s
260 endif
261 endif
262 endif
263
264 #
265 # Linker flags: plugins and builtins linking
266 #
267 builtins_LDFLAGS += $(shell echo $(BUILTINS) | sed -e 's@[^ ]*/\([^ ]*\)@$$\1_LDFLAGS@g')
268
269 #
270 # Debugging and profiling support
271 #
272 ifeq ($(DEBUG),1)
273 CFLAGS += -g
274 endif
275
276 ifeq ($(CPROF),1)
277 CFLAGS += -finstrument-functions
278 endif
279
280 ifeq ($(GPROF),1)
281 CFLAGS += -pg
282 endif
283
284