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