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
71 LIB_DARWIN = @LIB_DARWIN@
72 LIB_DIRECTX = @LIB_DIRECTX@
74 LIB_DVDREAD = @LIB_DVDREAD@
76 LIB_FILTER_DISTORT = @LIB_FILTER_DISTORT@
78 LIB_GLIDE = @LIB_GLIDE@
79 LIB_GNOME = @LIB_GNOME@
81 LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@
82 LIB_IMDCT = @LIB_IMDCT@
83 LIB_IMDCT3DN = @LIB_IMDCT3DN@
84 LIB_IMDCTSSE = @LIB_IMDCTSSE@
87 LIB_LIBDVDCSS = @LIB_LIBDVDCSS@
88 LIB_LIBDVDREAD = @LIB_LIBDVDREAD@
90 LIB_MACOSX = @LIB_MACOSX@
92 LIB_MOTIONALTIVEC = @LIB_MOTIONALTIVEC@
93 LIB_MPEG_TS = @LIB_MPEG_TS@
94 LIB_NCURSES = @LIB_NCURSES@
100 LIB_WAVEOUT = @LIB_WAVEOUT@
101 LIB_WIN32 = @LIB_WIN32@
103 LIB_XVIDEO = @LIB_XVIDEO@
106 # CFLAGS for special cases
108 CFLAGS_VLC = @CFLAGS_VLC@
109 CFLAGS_ARTS = @CFLAGS_ARTS@
110 CFLAGS_DVD = @CFLAGS_DVD@
111 CFLAGS_DVDREAD = @CFLAGS_DVDREAD@
112 CFLAGS_ESD = @CFLAGS_ESD@
113 CFLAGS_GLIDE = @CFLAGS_GLIDE@
114 CFLAGS_GNOME = @CFLAGS_GNOME@
115 CFLAGS_GTK = @CFLAGS_GTK@
116 CFLAGS_KDE = @CFLAGS_KDE@
117 CFLAGS_IDCTALTIVEC = @CFLAGS_IDCTALTIVEC@
118 CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
119 CFLAGS_MACOSX = @CFLAGS_MACOSX@
120 CFLAGS_MAD = @CFLAGS_MAD@
121 CFLAGS_MOTIONALTIVEC = @CFLAGS_MOTIONALTIVEC@
122 CFLAGS_QT = @CFLAGS_QT@
123 CFLAGS_SDL = @CFLAGS_SDL@
124 CFLAGS_WIN32 = @CFLAGS_WIN32@
125 CFLAGS_X11 = @CFLAGS_X11@
126 CFLAGS_XVIDEO = @CFLAGS_XVIDEO@
131 SRC_DVD_EXTRA = @SRC_DVD_EXTRA@
132 SRC_DVDCSS_EXTRA = @SRC_DVDCSS_EXTRA@
135 # Other special cases
137 NEED_GETOPT = @NEED_GETOPT@
138 NEED_LIBDVDCSS = @NEED_LIBDVDCSS@
140 ###############################################################################
141 # Configuration pre-processing
142 ###############################################################################
144 # PROGRAM_OPTIONS is an identification string of the compilation options
145 PROGRAM_OPTIONS = $(SYS) $(ARCH)
147 PROGRAM_OPTIONS += DEBUG
151 PROGRAM_OPTIONS += CPROF
155 PROGRAM_OPTIONS += GPROF
159 # PROGRAM_BUILD is a complete identification of the build
160 # (we can't use fancy options with date since OSes like Solaris
161 # or FreeBSD have strange date implementations)
163 # XXX: beos does not support hostname (how lame...)
164 PROGRAM_BUILD = `date` $(USER)
166 PROGRAM_BUILD = `date` $(USER)@`hostname`
169 # PROGRAM_VERSION is the current vlc version
170 PROGRAM_VERSION=@VLC_VERSION@
171 LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
173 # DEFINE will contain some of the constants definitions decided in Makefile,
174 # including SYS_xx. It will be passed to C compiler.
175 DEFINE_SYS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
176 DEFINE += $(DEFINE_SYS)
178 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
179 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE
182 DEFINE += -DLOCALEDIR=\"$(datadir)/locale\"
184 # Data and plugin location
185 DEFINE += -DDATA_PATH=\"@prefix@/share/videolan\"
186 DEFINE += -DPLUGIN_PATH=\"@prefix@/lib/videolan/vlc\"
188 ###############################################################################
189 # Tuning and other variables - do not change anything except if you know
190 # exactly what you are doing
191 ###############################################################################
194 # C headers directories
197 INCLUDE += -Iinclude -Iextras
200 # Libraries needed by built-in modules
202 LIB_BUILTINS := $(patsubst %,$$LIB_%,$(shell echo $(BUILTINS) | tr '[a-z]' '[A-Z]'))
203 LIB += $(LIB_BUILTINS)
208 ifneq (,$(findstring mingw32,$(SYS)))
209 LIB += -lws2_32 -lnetapi32
215 # C compiler flags: mainstream compilation
217 CFLAGS += $(DEFINE) $(INCLUDE)
218 CFLAGS += -D_REENTRANT
219 CFLAGS += -D_GNU_SOURCE
222 CFLAGS += -DHAVE_RELEASE
225 # flags needed for clean beos compilation
227 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
230 ifneq (,$(findstring darwin,$(SYS)))
231 CFLAGS += -no-cpp-precomp
234 ifneq (,$(findstring mingw32,$(SYS)))
235 CFLAGS += -fnative-struct -D_OFF_T_ -D_off_t=long
238 ifneq (,$(findstring bsd,$(SYS)))
242 # Optimizations : don't compile debug versions with them
244 CFLAGS += @CFLAGS_OPTIM@
248 CFLAGS += @CFLAGS_OPTIM_NODEBUG@
253 ifneq (,$(findstring powerpc,$(ARCH)))
254 # Optimizations for PowerPC
255 CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
257 CFLAGS += -mtune=$(TUNING)
260 ifneq (,$(findstring sparc,$(ARCH)))
261 # Optimizations for Sparc
262 CFLAGS += -mhard-float
264 CFLAGS += -mcpu=$(TUNING)
267 # Generic optimizations
269 CFLAGS += -mcpu=$(TUNING)
274 #end of optimisations
278 # C compiler flags: dependancies
280 DCFLAGS += $(INCLUDE)
284 # C compiler flags: linking
296 ifneq (,$(findstring mingw32,$(SYS)))
297 LDFLAGS += -mwindows -Xlinker --force-exe-suffix
301 # C compiler and linker flags: setting soname
306 # C compiler flags: plugin compilation
308 ifneq (,$(findstring mingw32,$(SYS)))
309 PCFLAGS += -fnative-struct
315 # C compiler flags: plugin linking
317 PLDFLAGS += @PLDFLAGS@
320 # Debugging and profiling support
327 CFLAGS += -finstrument-functions