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
56 # Installation environment
58 exec_prefix = @exec_prefix@
63 includedir = @includedir@
66 # Libraries for special cases
68 LIB_COMMON = @LIB_COMMON@
76 LIB_CHROMA_I420_RGB = @LIB_CHROMA_I420_RGB@
77 LIB_DARWIN = @LIB_DARWIN@
78 LIB_DIRECTX = @LIB_DIRECTX@
81 LIB_DVDREAD = @LIB_DVDREAD@
83 LIB_FILTER_DISTORT = @LIB_FILTER_DISTORT@
85 LIB_GLIDE = @LIB_GLIDE@
86 LIB_GNOME = @LIB_GNOME@
88 LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@
89 LIB_IMDCT = @LIB_IMDCT@
90 LIB_IMDCT3DN = @LIB_IMDCT3DN@
91 LIB_IMDCTSSE = @LIB_IMDCTSSE@
95 LIB_LIBDVDCSS = @LIB_LIBDVDCSS@
96 LIB_LIBDVDREAD = @LIB_LIBDVDREAD@
98 LIB_MACOSX = @LIB_MACOSX@
100 LIB_MOTIONALTIVEC = @LIB_MOTIONALTIVEC@
101 LIB_MPEG_TS = @LIB_MPEG_TS@
102 LIB_NCURSES = @LIB_NCURSES@
108 LIB_WAVEOUT = @LIB_WAVEOUT@
109 LIB_WIN32 = @LIB_WIN32@
111 LIB_XVIDEO = @LIB_XVIDEO@
114 # CFLAGS for special cases
116 CFLAGS_COMMON = @CFLAGS_COMMON@
117 CFLAGS_VLC = @CFLAGS_VLC@
119 CFLAGS_ARTS = @CFLAGS_ARTS@
120 CFLAGS_DVD = @CFLAGS_DVD@
121 CFLAGS_DVDREAD = @CFLAGS_DVDREAD@
122 CFLAGS_ESD = @CFLAGS_ESD@
123 CFLAGS_GLIDE = @CFLAGS_GLIDE@
124 CFLAGS_GNOME = @CFLAGS_GNOME@
125 CFLAGS_GTK = @CFLAGS_GTK@
126 CFLAGS_KDE = @CFLAGS_KDE@
127 CFLAGS_IDCTALTIVEC = @CFLAGS_IDCTALTIVEC@
128 CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
129 CFLAGS_MACOSX = @CFLAGS_MACOSX@
130 CFLAGS_MAD = @CFLAGS_MAD@
131 CFLAGS_MOTIONALTIVEC = @CFLAGS_MOTIONALTIVEC@
132 CFLAGS_QT = @CFLAGS_QT@
133 CFLAGS_SDL = @CFLAGS_SDL@
134 CFLAGS_WIN32 = @CFLAGS_WIN32@
135 CFLAGS_X11 = @CFLAGS_X11@
136 CFLAGS_XVIDEO = @CFLAGS_XVIDEO@
141 SRC_DVD_EXTRA = @SRC_DVD_EXTRA@
142 SRC_DVDCSS_EXTRA = @SRC_DVDCSS_EXTRA@
145 # Other special cases
147 NEED_GETOPT = @NEED_GETOPT@
148 NEED_LIBDVDCSS = @NEED_LIBDVDCSS@
150 ###############################################################################
151 # Configuration pre-processing
152 ###############################################################################
154 # PROGRAM_OPTIONS is an identification string of the compilation options
155 PROGRAM_OPTIONS = $(SYS) $(ARCH)
157 PROGRAM_OPTIONS += DEBUG
161 PROGRAM_OPTIONS += CPROF
165 PROGRAM_OPTIONS += GPROF
169 # PROGRAM_BUILD is a complete identification of the build
170 # (we can't use fancy options with date since OSes like Solaris
171 # or FreeBSD have strange date implementations)
173 # XXX: beos does not support hostname (how lame...)
174 PROGRAM_BUILD = `date` $(USER)
176 PROGRAM_BUILD = `date` $(USER)@`hostname`
179 # PROGRAM_VERSION is the current vlc version
180 PROGRAM_VERSION=@VLC_VERSION@
181 LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
183 # DEFINE will contain some of the constants definitions decided in Makefile,
184 # including SYS_xx. It will be passed to C compiler.
185 DEFINE_SYS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
186 DEFINE += $(DEFINE_SYS)
188 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
189 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE
192 DEFINE += -DLOCALEDIR=\"$(datadir)/locale\"
194 # Data and plugin location
195 DEFINE += -DDATA_PATH=\"@prefix@/share/videolan\"
196 DEFINE += -DPLUGIN_PATH=\"@prefix@/lib/videolan/vlc\"
198 ###############################################################################
199 # Tuning and other variables - do not change anything except if you know
200 # exactly what you are doing
201 ###############################################################################
204 # C headers directories
207 INCLUDE += -Iinclude -Iextras
210 # Libraries needed by built-in modules
212 LIB_BUILTINS := $(patsubst %,$$LIB_%,$(shell echo $(BUILTINS) | tr '[a-z]' '[A-Z]'))
215 # Libraries needed by the vlc executable
217 ifneq (,$(findstring mingw32,$(SYS)))
218 LIB_VLC += -lws2_32 -lnetapi32
222 # C compiler flags: mainstream compilation
224 CFLAGS += $(DEFINE) $(INCLUDE)
225 CFLAGS += -D_REENTRANT
226 CFLAGS += -D_GNU_SOURCE
229 CFLAGS += -DHAVE_RELEASE
232 # flags needed for clean beos compilation
234 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
237 ifneq (,$(findstring darwin,$(SYS)))
238 CFLAGS += -no-cpp-precomp
241 ifneq (,$(findstring mingw32,$(SYS)))
242 CFLAGS += -fnative-struct -D_OFF_T_ -D_off_t=long
245 ifneq (,$(findstring bsd,$(SYS)))
249 # Optimizations : don't compile debug versions with them
251 CFLAGS += @CFLAGS_OPTIM@
255 CFLAGS += @CFLAGS_OPTIM_NODEBUG@
260 ifneq (,$(findstring powerpc,$(ARCH)))
261 # Optimizations for PowerPC
262 CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
264 CFLAGS += -mtune=$(TUNING)
267 ifneq (,$(findstring sparc,$(ARCH)))
268 # Optimizations for Sparc
269 CFLAGS += -mhard-float
271 CFLAGS += -mcpu=$(TUNING)
274 # Generic optimizations
276 CFLAGS += -mcpu=$(TUNING)
281 #end of optimisations
285 # C compiler flags: dependancies
287 DCFLAGS += $(INCLUDE)
291 # C compiler flags: linking
303 ifneq (,$(findstring mingw32,$(SYS)))
304 LDFLAGS += -mwindows -Xlinker --force-exe-suffix
308 # C compiler and linker flags: setting soname
313 # C compiler flags: plugin compilation
315 ifneq (,$(findstring mingw32,$(SYS)))
316 PCFLAGS += -fnative-struct
322 # C compiler flags: plugin linking
324 PLDFLAGS += @PLDFLAGS@
327 # Debugging and profiling support
334 CFLAGS += -finstrument-functions