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