]> git.sesse.net Git - vlc/blob - Makefile.opts.in
8a5ba96190f4c0875e97d8d05c37c81defe20b1e
[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 # Plugins to build
14 # WARNING: if you do not have a dynamic loader on your platform, remove
15 # the plugins in this line and put them as built-ins, otherwise your
16 # application won't be able to load them.
17
18 PLUGINS :=@PLUGINS@
19
20
21 # Built-in modules to build
22 # WARNING: do NOT put gtk and gnome together in this rule.
23
24 BUILTINS :=@BUILTINS@
25
26
27 # Additional build options
28
29 SYS = @SYS@
30 ALIASES =@ALIASES@
31 INSTALL = @INSTALL@
32 ARCH = @ARCH@
33
34 #
35 # Compilation options
36 #
37 DEBUG = @DEBUG@
38 CPROF = @CPROF@
39 GPROF = @GPROF@
40 OPTIMS = @OPTIMS@
41 TUNING = @TUNING@
42 RELEASE = @RELEASE@
43
44
45 # Build environment
46
47 CC = @CC@
48 CFLAGS = @CFLAGS@
49 SHELL = @SHELL@
50 RANLIB = @RANLIB@
51 STRIP = @STRIP@
52 MOC = @MOC@
53 WINDRES = @WINDRES@
54 BCBUILDER = @BCBUILDER@
55
56
57 # Installation environment
58
59 exec_prefix = @exec_prefix@
60 prefix = @prefix@
61 bindir = @bindir@
62 datadir = @datadir@
63 libdir = @libdir@
64 includedir = @includedir@
65
66 #
67 # CFLAGS for special cases
68 #
69 vlc_CFLAGS = @vlc_CFLAGS@
70 plugins_CFLAGS := @plugins_CFLAGS@
71 builtins_CFLAGS := @builtins_CFLAGS@
72
73 arts_CFLAGS = @arts_CFLAGS@
74 dvd_CFLAGS = @dvd_CFLAGS@
75 dvdread_CFLAGS = @dvdread_CFLAGS@
76 directx_CFLAGS = @directx_CFLAGS@
77 esd_CFLAGS = @esd_CFLAGS@
78 ffmpeg_CFLAGS = @ffmpeg_CFLAGS@
79 glide_CFLAGS = @glide_CFLAGS@
80 gnome_CFLAGS = @gnome_CFLAGS@
81 gtk_CFLAGS = @gtk_CFLAGS@
82 kde_CFLAGS = @kde_CFLAGS@
83 idctaltivec_CFLAGS = @idctaltivec_CFLAGS@
84 macosx_CFLAGS = @macosx_CFLAGS@
85 mad_CFLAGS = @mad_CFLAGS@
86 memcpyaltivec_CFLAGS = @memcpyaltivec_CFLAGS@
87 motionaltivec_CFLAGS = @motionaltivec_CFLAGS@
88 qt_CFLAGS = @qt_CFLAGS@
89 sdl_CFLAGS = @sdl_CFLAGS@
90 x11_CFLAGS = @x11_CFLAGS@
91 xvideo_CFLAGS = @xvideo_CFLAGS@
92
93 #
94 # Libraries for special cases
95 #
96 vlc_LDFLAGS = @vlc_LDFLAGS@
97 plugins_LDFLAGS += @plugins_LDFLAGS@
98 builtins_LDFLAGS += @builtins_LDFLAGS@
99
100 a52_LDFLAGS = @a52_LDFLAGS@
101 aa_LDFLAGS = @aa_LDFLAGS@
102 alsa_LDFLAGS = @alsa_LDFLAGS@
103 arts_LDFLAGS = @arts_LDFLAGS@
104 beos_LDFLAGS = @beos_LDFLAGS@
105 chroma_i420_rgb_LDFLAGS = @chroma_i420_rgb_LDFLAGS@
106 directx_LDFLAGS = @directx_LDFLAGS@
107 dsp_LDFLAGS = @dsp_LDFLAGS@
108 dvd_LDFLAGS = @dvd_LDFLAGS@
109 dvdread_LDFLAGS = @dvdread_LDFLAGS@
110 esd_LDFLAGS = @esd_LDFLAGS@
111 filter_distort_LDFLAGS = @filter_distort_LDFLAGS@
112 ffmpeg_LDFLAGS = @ffmpeg_LDFLAGS@
113 ggi_LDFLAGS = @ggi_LDFLAGS@
114 glide_LDFLAGS = @glide_LDFLAGS@
115 gnome_LDFLAGS = @gnome_LDFLAGS@
116 gtk_LDFLAGS = @gtk_LDFLAGS@
117 idctaltivec_LDFLAGS = @idctaltivec_LDFLAGS@
118 imdct_LDFLAGS = @imdct_LDFLAGS@
119 imdct3dn_LDFLAGS = @imdct3dn_LDFLAGS@
120 imdctsse_LDFLAGS = @imdctsse_LDFLAGS@
121 ipv4_LDFLAGS = @ipv4_LDFLAGS@
122 kde_LDFLAGS = @kde_LDFLAGS@
123 lirc_LDFLAGS = @lirc_LDFLAGS@
124 macosx_LDFLAGS = @macosx_LDFLAGS@
125 mad_LDFLAGS = @mad_LDFLAGS@
126 memcpyaltivec_LDFLAGS = @memcpyaltivec_LDFLAGS@
127 motionaltivec_LDFLAGS = @motionaltivec_LDFLAGS@
128 ncurses_LDFLAGS = @ncurses_LDFLAGS@
129 qnx_LDFLAGS = @qnx_LDFLAGS@
130 qt_LDFLAGS = @qt_LDFLAGS@
131 rc_LDFLAGS = @rc_LDFLAGS@
132 sdl_LDFLAGS = @sdl_LDFLAGS@
133 vcd_LDFLAGS = @vcd_LDFLAGS@
134 vorbis_LDFLAGS = @vorbis_LDFLAGS@
135 waveout_LDFLAGS = @waveout_LDFLAGS@
136 x11_LDFLAGS = @x11_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/videolan\"
181 CFLAGS += -DPLUGIN_PATH=\"@prefix@/lib/videolan/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
197 CFLAGS += -D_GNU_SOURCE
198
199 ifeq ($(RELEASE),1)
200 CFLAGS += -DHAVE_RELEASE
201 endif
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 += -DPLUGIN -I../../include -I../../extras
255 builtins_CFLAGS += -DBUILTIN -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