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