]> git.sesse.net Git - vlc/blob - Makefile.opts.in
* ALL: the first libvlc commit.
[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/vlc\"
171 CFLAGS += -DPLUGIN_PATH=\"@prefix@/lib/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 -D_THREAD_SAFE
187 CFLAGS += -D_GNU_SOURCE
188
189 ifeq ($(RELEASE),1)
190 CFLAGS += -DHAVE_RELEASE
191 endif
192
193 CFLAGS += -D__VLC__
194
195 # Optimizations : don't compile debug versions with them
196 ifeq ($(OPTIMS),1)
197 CFLAGS += @CFLAGS_OPTIM@
198 ifneq ($(DEBUG),1)
199 ifneq ($(GPROF),1)
200 ifneq ($(CPROF),1)
201 CFLAGS += @CFLAGS_OPTIM_NODEBUG@
202 endif
203 endif
204 endif
205
206 ifneq (,$(findstring powerpc,$(ARCH)))
207 # Optimizations for PowerPC
208 CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
209 ifneq (,$(TUNING))
210 CFLAGS += -mtune=$(TUNING)
211 endif
212 else
213 ifneq (,$(findstring sparc,$(ARCH)))
214 # Optimizations for Sparc
215 CFLAGS += -mhard-float
216 ifneq (,$(TUNING))
217 CFLAGS += -mcpu=$(TUNING)
218 endif
219 else
220 # Generic optimizations
221 ifneq (,$(TUNING))
222 CFLAGS += -mcpu=$(TUNING)
223 endif
224 endif
225 endif
226
227 #end of optimisations
228 endif
229
230 #
231 # C compiler flags: linking
232 #
233 LDFLAGS += @LDFLAGS@
234 LDFLAGS += -Wall
235 ifneq ($(DEBUG),1)
236 ifneq ($(GPROF),1)
237 ifneq ($(CPROF),1)
238 #LDFLAGS += -s
239 endif
240 endif
241 endif
242
243 #
244 # C compiler flags: plugins and builtins compilation
245 #
246 plugins_CFLAGS += -D__PLUGIN__ -I../../include -I../../extras
247 builtins_CFLAGS += -D__BUILTIN__ -I../../include -I../../extras
248
249 #
250 # Linker flags: plugins and builtins linking
251 #
252 builtins_LDFLAGS += $(patsubst %,$$%_LDFLAGS,$(BUILTINS))
253
254 #
255 # Debugging and profiling support
256 #
257 ifeq ($(DEBUG),1)
258 CFLAGS += -g
259 endif
260
261 ifeq ($(CPROF),1)
262 CFLAGS += -finstrument-functions
263 endif
264
265 ifeq ($(GPROF),1)
266 CFLAGS += -pg
267 endif
268
269