1 ###############################################################################
2 # vlc (VideoLAN Client) options Makefile
4 ###############################################################################
8 ###############################################################################
10 ###############################################################################
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.
21 # Built-in modules to build
22 # WARNING: do NOT put gtk and gnome together in this rule.
27 # Additional build options
54 BCBUILDER = @BCBUILDER@
57 # Installation environment
59 exec_prefix = @exec_prefix@
64 includedir = @includedir@
67 # CFLAGS for special cases
69 vlc_CFLAGS = @vlc_CFLAGS@
70 plugins_CFLAGS := @plugins_CFLAGS@
71 builtins_CFLAGS := @builtins_CFLAGS@
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@
96 # Libraries for special cases
98 vlc_LDFLAGS = @vlc_LDFLAGS@
99 plugins_LDFLAGS += @plugins_LDFLAGS@
100 builtins_LDFLAGS += @builtins_LDFLAGS@
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@
143 # Other special cases
145 NEED_GETOPT = @NEED_GETOPT@
147 ###############################################################################
148 # Configuration pre-processing
149 ###############################################################################
151 # PROGRAM_OPTIONS is an identification string of the compilation options
152 PROGRAM_OPTIONS = $(SYS) $(ARCH)
154 PROGRAM_OPTIONS += DEBUG
158 PROGRAM_OPTIONS += CPROF
162 PROGRAM_OPTIONS += GPROF
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)
170 # XXX: beos does not support hostname (how lame...)
171 PROGRAM_BUILD = `date` $(USER)
173 PROGRAM_BUILD = `date` $(USER)@`hostname`
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
180 CFLAGS += -DLOCALEDIR=\"$(datadir)/locale\"
182 # Data and plugin location
183 CFLAGS += -DDATA_PATH=\"@prefix@/share/videolan\"
184 CFLAGS += -DPLUGIN_PATH=\"@prefix@/lib/videolan/vlc\"
186 ###############################################################################
187 # Tuning and other variables - do not change anything except if you know
188 # exactly what you are doing
189 ###############################################################################
192 # C headers directories
194 CFLAGS += -Iinclude -Iextras
197 # C compiler flags: mainstream compilation
199 CFLAGS += -D_REENTRANT
200 CFLAGS += -D_GNU_SOURCE
203 CFLAGS += -DHAVE_RELEASE
206 # Optimizations : don't compile debug versions with them
208 CFLAGS += @CFLAGS_OPTIM@
212 CFLAGS += @CFLAGS_OPTIM_NODEBUG@
217 ifneq (,$(findstring powerpc,$(ARCH)))
218 # Optimizations for PowerPC
219 CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
221 CFLAGS += -mtune=$(TUNING)
224 ifneq (,$(findstring sparc,$(ARCH)))
225 # Optimizations for Sparc
226 CFLAGS += -mhard-float
228 CFLAGS += -mcpu=$(TUNING)
231 # Generic optimizations
233 CFLAGS += -mcpu=$(TUNING)
238 #end of optimisations
242 # C compiler flags: linking
255 # C compiler flags: plugins and builtins compilation
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
262 # Linker flags: plugins and builtins linking
264 builtins_LDFLAGS += $(patsubst %,$$%_LDFLAGS,$(BUILTINS))
267 # Debugging and profiling support
274 CFLAGS += -finstrument-functions