]> git.sesse.net Git - vlc/blob - Makefile.opts.in
f9d6de878c9a4df9b970d02444b58b6996b184ef
[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 chroma_i420_yuy2_mmx_CFLAGS = @chroma_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 ffmpeg_CFLAGS = @ffmpeg_CFLAGS@
71 glide_CFLAGS = @glide_CFLAGS@
72 gnome_CFLAGS = @gnome_CFLAGS@
73 gtk_CFLAGS = @gtk_CFLAGS@
74 idctaltivec_CFLAGS = @idctaltivec_CFLAGS@
75 kde_CFLAGS = @kde_CFLAGS@
76 mad_CFLAGS = @mad_CFLAGS@
77 memcpyaltivec_CFLAGS = @memcpyaltivec_CFLAGS@
78 motionaltivec_CFLAGS = @motionaltivec_CFLAGS@
79 mpeg_ts_dvbpsi_CFLAGS = @mpeg_ts_dvbpsi_CFLAGS@
80 qt_CFLAGS = @qt_CFLAGS@
81 sdl_CFLAGS = @sdl_CFLAGS@
82 x11_CFLAGS = @x11_CFLAGS@
83 xvideo_CFLAGS = @xvideo_CFLAGS@
84
85 #
86 # Libraries for special cases
87 #
88 vlc_LDFLAGS = @vlc_LDFLAGS@
89 plugins_LDFLAGS = @plugins_LDFLAGS@
90 builtins_LDFLAGS = @builtins_LDFLAGS@
91 mozilla_LDFLAGS = @mozilla_LDFLAGS@
92
93 a52_LDFLAGS = @a52_LDFLAGS@
94 aa_LDFLAGS = @aa_LDFLAGS@
95 alsa_LDFLAGS = @alsa_LDFLAGS@
96 arts_LDFLAGS = @arts_LDFLAGS@
97 beos_LDFLAGS = @beos_LDFLAGS@
98 chroma_i420_rgb_LDFLAGS = @chroma_i420_rgb_LDFLAGS@
99 directx_LDFLAGS = @directx_LDFLAGS@
100 dsp_LDFLAGS = @dsp_LDFLAGS@
101 dvd_LDFLAGS = @dvd_LDFLAGS@
102 dvdread_LDFLAGS = @dvdread_LDFLAGS@
103 dvdplay_LDFLAGS = @dvdplay_LDFLAGS@
104 esd_LDFLAGS = @esd_LDFLAGS@
105 familiar_LDFLAGS = @familiar_LDFLAGS@
106 filter_distort_LDFLAGS = @filter_distort_LDFLAGS@
107 ffmpeg_LDFLAGS = @ffmpeg_LDFLAGS@
108 mp4_LDFLAGS = @mp4_LDFLAGS@
109 ggi_LDFLAGS = @ggi_LDFLAGS@
110 glide_LDFLAGS = @glide_LDFLAGS@
111 gnome_LDFLAGS = @gnome_LDFLAGS@
112 gtk_LDFLAGS = @gtk_LDFLAGS@
113 http_LDFLAGS = @http_LDFLAGS@
114 idctaltivec_LDFLAGS = @idctaltivec_LDFLAGS@
115 imdct_LDFLAGS = @imdct_LDFLAGS@
116 imdct3dn_LDFLAGS = @imdct3dn_LDFLAGS@
117 imdctsse_LDFLAGS = @imdctsse_LDFLAGS@
118 ipv4_LDFLAGS = @ipv4_LDFLAGS@
119 ipv6_LDFLAGS = @ipv6_LDFLAGS@
120 kde_LDFLAGS = @kde_LDFLAGS@
121 lirc_LDFLAGS = @lirc_LDFLAGS@
122 macosx_LDFLAGS = @macosx_LDFLAGS@
123 mad_LDFLAGS = @mad_LDFLAGS@
124 memcpyaltivec_LDFLAGS = @memcpyaltivec_LDFLAGS@
125 motionaltivec_LDFLAGS = @motionaltivec_LDFLAGS@
126 mpeg_ts_dvbpsi_LDFLAGS = @mpeg_ts_dvbpsi_LDFLAGS@
127 ncurses_LDFLAGS = @ncurses_LDFLAGS@
128 qnx_LDFLAGS = @qnx_LDFLAGS@
129 qt_LDFLAGS = @qt_LDFLAGS@
130 rc_LDFLAGS = @rc_LDFLAGS@
131 sdl_LDFLAGS = @sdl_LDFLAGS@
132 vcd_LDFLAGS = @vcd_LDFLAGS@
133 vorbis_LDFLAGS = @vorbis_LDFLAGS@
134 waveout_LDFLAGS = @waveout_LDFLAGS@
135 x11_LDFLAGS = @x11_LDFLAGS@
136 xosd_LDFLAGS = @xosd_LDFLAGS@
137 xvideo_LDFLAGS = @xvideo_LDFLAGS@
138
139 #
140 # Other special cases
141 #
142 NEED_GETOPT = @NEED_GETOPT@
143
144 ###############################################################################
145 # Configuration pre-processing
146 ###############################################################################
147
148 # PROGRAM_OPTIONS is an identification string of the compilation options
149 PROGRAM_OPTIONS = $(SYS) $(ARCH)
150 ifeq ($(DEBUG),1)
151 PROGRAM_OPTIONS += DEBUG
152 CFLAGS += -DDEBUG
153 endif
154 ifeq ($(CPROF),1)
155 PROGRAM_OPTIONS += CPROF
156 CFLAGS += -DCPROF
157 endif
158 ifeq ($(GPROF),1)
159 PROGRAM_OPTIONS += GPROF
160 CFLAGS += -DGPROF
161 endif
162
163 # PROGRAM_BUILD is a complete identification of the build
164 # (we can't use fancy options with date since OSes like Solaris
165 # or FreeBSD have strange date implementations)
166 ifeq ($(SYS),beos)
167 # XXX: beos does not support hostname (how lame...)
168 PROGRAM_BUILD = `date` $(USER)
169 else
170 PROGRAM_BUILD = `date` $(USER)@`hostname`
171 endif
172
173 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
174 CFLAGS += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE
175
176 # Gettext support
177 CFLAGS += -DLOCALEDIR=\"$(datadir)/locale\"
178
179 # Data and plugin location
180 CFLAGS += -DDATA_PATH=\"@prefix@/share/vlc\"
181 CFLAGS += -DPLUGIN_PATH=\"@prefix@/lib/vlc\"
182
183 ###############################################################################
184 # Tuning and other variables - do not change anything except if you know
185 # exactly what you are doing
186 ###############################################################################
187
188 #
189 # C headers directories
190 #
191 CFLAGS += -Iinclude -Iextras
192
193 #
194 # C compiler flags: mainstream compilation
195 #
196 CFLAGS += -D_REENTRANT -D_THREAD_SAFE
197 CFLAGS += -D_GNU_SOURCE
198
199 ifeq ($(RELEASE),1)
200 CFLAGS += -DHAVE_RELEASE
201 endif
202
203 CFLAGS += -D__VLC__
204
205 # Optimizations : don't compile debug versions with them
206 ifeq ($(OPTIMS),1)
207 CFLAGS += @CFLAGS_OPTIM@
208 ifneq ($(DEBUG),1)
209 ifneq ($(GPROF),1)
210 ifneq ($(CPROF),1)
211 CFLAGS += @CFLAGS_OPTIM_NODEBUG@
212 endif
213 endif
214 endif
215
216 ifneq (,$(findstring powerpc,$(ARCH)))
217 # Optimizations for PowerPC
218 CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
219 ifneq (,$(TUNING))
220 CFLAGS += -mtune=$(TUNING)
221 endif
222 else
223 ifneq (,$(findstring sparc,$(ARCH)))
224 # Optimizations for Sparc
225 CFLAGS += -mhard-float
226 ifneq (,$(TUNING))
227 CFLAGS += -mcpu=$(TUNING)
228 endif
229 else
230 # Generic optimizations
231 ifneq (,$(TUNING))
232 CFLAGS += -mcpu=$(TUNING)
233 endif
234 endif
235 endif
236
237 #end of optimisations
238 endif
239
240 #
241 # C compiler flags: linking
242 #
243 LDFLAGS += @LDFLAGS@
244 LDFLAGS += -Wall
245 ifneq ($(DEBUG),1)
246 ifneq ($(GPROF),1)
247 ifneq ($(CPROF),1)
248 #LDFLAGS += -s
249 endif
250 endif
251 endif
252
253 #
254 # C compiler flags: plugins and builtins compilation
255 #
256 plugins_CFLAGS += -D__PLUGIN__ -I../../include -I../../extras
257 builtins_CFLAGS += -D__BUILTIN__ -I../../include -I../../extras
258
259 #
260 # Linker flags: plugins and builtins linking
261 #
262 builtins_LDFLAGS += $(patsubst %,$$%_LDFLAGS,$(BUILTINS))
263
264 #
265 # Debugging and profiling support
266 #
267 ifeq ($(DEBUG),1)
268 CFLAGS += -g
269 endif
270
271 ifeq ($(CPROF),1)
272 CFLAGS += -finstrument-functions
273 endif
274
275 ifeq ($(GPROF),1)
276 CFLAGS += -pg
277 endif
278
279