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_DARWIN = @LIB_DARWIN@
77 LIB_DIRECTX = @LIB_DIRECTX@
80 LIB_DVDREAD = @LIB_DVDREAD@
82 LIB_FILTER_DISTORT = @LIB_FILTER_DISTORT@
84 LIB_GLIDE = @LIB_GLIDE@
85 LIB_GNOME = @LIB_GNOME@
87 LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@
88 LIB_IMDCT = @LIB_IMDCT@
89 LIB_IMDCT3DN = @LIB_IMDCT3DN@
90 LIB_IMDCTSSE = @LIB_IMDCTSSE@
94 LIB_LIBDVDCSS = @LIB_LIBDVDCSS@
95 LIB_LIBDVDREAD = @LIB_LIBDVDREAD@
97 LIB_MACOSX = @LIB_MACOSX@
99 LIB_MOTIONALTIVEC = @LIB_MOTIONALTIVEC@
100 LIB_MPEG_TS = @LIB_MPEG_TS@
101 LIB_NCURSES = @LIB_NCURSES@
107 LIB_WAVEOUT = @LIB_WAVEOUT@
108 LIB_WIN32 = @LIB_WIN32@
110 LIB_XVIDEO = @LIB_XVIDEO@
113 # CFLAGS for special cases
115 CFLAGS_COMMON = @CFLAGS_COMMON@
116 CFLAGS_VLC = @CFLAGS_VLC@
118 CFLAGS_ARTS = @CFLAGS_ARTS@
119 CFLAGS_DVD = @CFLAGS_DVD@
120 CFLAGS_DVDREAD = @CFLAGS_DVDREAD@
121 CFLAGS_ESD = @CFLAGS_ESD@
122 CFLAGS_GLIDE = @CFLAGS_GLIDE@
123 CFLAGS_GNOME = @CFLAGS_GNOME@
124 CFLAGS_GTK = @CFLAGS_GTK@
125 CFLAGS_KDE = @CFLAGS_KDE@
126 CFLAGS_IDCTALTIVEC = @CFLAGS_IDCTALTIVEC@
127 CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
128 CFLAGS_MACOSX = @CFLAGS_MACOSX@
129 CFLAGS_MAD = @CFLAGS_MAD@
130 CFLAGS_MOTIONALTIVEC = @CFLAGS_MOTIONALTIVEC@
131 CFLAGS_QT = @CFLAGS_QT@
132 CFLAGS_SDL = @CFLAGS_SDL@
133 CFLAGS_WIN32 = @CFLAGS_WIN32@
134 CFLAGS_X11 = @CFLAGS_X11@
135 CFLAGS_XVIDEO = @CFLAGS_XVIDEO@
140 SRC_DVD_EXTRA = @SRC_DVD_EXTRA@
141 SRC_DVDCSS_EXTRA = @SRC_DVDCSS_EXTRA@
144 # Other special cases
146 NEED_GETOPT = @NEED_GETOPT@
147 NEED_LIBDVDCSS = @NEED_LIBDVDCSS@
149 ###############################################################################
150 # Configuration pre-processing
151 ###############################################################################
153 # PROGRAM_OPTIONS is an identification string of the compilation options
154 PROGRAM_OPTIONS = $(SYS) $(ARCH)
156 PROGRAM_OPTIONS += DEBUG
160 PROGRAM_OPTIONS += CPROF
164 PROGRAM_OPTIONS += GPROF
168 # PROGRAM_BUILD is a complete identification of the build
169 # (we can't use fancy options with date since OSes like Solaris
170 # or FreeBSD have strange date implementations)
172 # XXX: beos does not support hostname (how lame...)
173 PROGRAM_BUILD = `date` $(USER)
175 PROGRAM_BUILD = `date` $(USER)@`hostname`
178 # PROGRAM_VERSION is the current vlc version
179 PROGRAM_VERSION=@VLC_VERSION@
180 LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
182 # DEFINE will contain some of the constants definitions decided in Makefile,
183 # including SYS_xx. It will be passed to C compiler.
184 DEFINE_SYS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
185 DEFINE += $(DEFINE_SYS)
187 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
188 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE
191 DEFINE += -DLOCALEDIR=\"$(datadir)/locale\"
193 # Data and plugin location
194 DEFINE += -DDATA_PATH=\"@prefix@/share/videolan\"
195 DEFINE += -DPLUGIN_PATH=\"@prefix@/lib/videolan/vlc\"
197 ###############################################################################
198 # Tuning and other variables - do not change anything except if you know
199 # exactly what you are doing
200 ###############################################################################
203 # C headers directories
206 INCLUDE += -Iinclude -Iextras
209 # Libraries needed by built-in modules
211 LIB_BUILTINS := $(patsubst %,$$LIB_%,$(shell echo $(BUILTINS) | tr '[a-z]' '[A-Z]'))
214 # Libraries needed by the vlc executable
216 ifneq (,$(findstring mingw32,$(SYS)))
217 LIB_VLC += -lws2_32 -lnetapi32
221 # C compiler flags: mainstream compilation
223 CFLAGS += $(DEFINE) $(INCLUDE)
224 CFLAGS += -D_REENTRANT
225 CFLAGS += -D_GNU_SOURCE
228 CFLAGS += -DHAVE_RELEASE
231 # flags needed for clean beos compilation
233 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
236 ifneq (,$(findstring darwin,$(SYS)))
237 CFLAGS += -no-cpp-precomp
240 ifneq (,$(findstring mingw32,$(SYS)))
241 CFLAGS += -fnative-struct -D_OFF_T_ -D_off_t=long
244 ifneq (,$(findstring bsd,$(SYS)))
248 # Optimizations : don't compile debug versions with them
250 CFLAGS += @CFLAGS_OPTIM@
254 CFLAGS += @CFLAGS_OPTIM_NODEBUG@
259 ifneq (,$(findstring powerpc,$(ARCH)))
260 # Optimizations for PowerPC
261 CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
263 CFLAGS += -mtune=$(TUNING)
266 ifneq (,$(findstring sparc,$(ARCH)))
267 # Optimizations for Sparc
268 CFLAGS += -mhard-float
270 CFLAGS += -mcpu=$(TUNING)
273 # Generic optimizations
275 CFLAGS += -mcpu=$(TUNING)
280 #end of optimisations
284 # C compiler flags: dependancies
286 DCFLAGS += $(INCLUDE)
290 # C compiler flags: linking
302 ifneq (,$(findstring mingw32,$(SYS)))
303 LDFLAGS += -mwindows -Xlinker --force-exe-suffix
307 # C compiler and linker flags: setting soname
312 # C compiler flags: plugin compilation
314 ifneq (,$(findstring mingw32,$(SYS)))
315 PCFLAGS += -fnative-struct
321 # C compiler flags: plugin linking
323 PLDFLAGS += @PLDFLAGS@
326 # Debugging and profiling support
333 CFLAGS += -finstrument-functions