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@
96 LIB_MACOSX = @LIB_MACOSX@
98 LIB_MOTIONALTIVEC = @LIB_MOTIONALTIVEC@
99 LIB_MPEG_TS = @LIB_MPEG_TS@
100 LIB_NCURSES = @LIB_NCURSES@
106 LIB_VORBIS = @LIB_VORBIS@
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_MACOSX = @CFLAGS_MACOSX@
128 CFLAGS_MAD = @CFLAGS_MAD@
129 CFLAGS_MOTIONALTIVEC = @CFLAGS_MOTIONALTIVEC@
130 CFLAGS_QT = @CFLAGS_QT@
131 CFLAGS_SDL = @CFLAGS_SDL@
132 CFLAGS_WIN32 = @CFLAGS_WIN32@
133 CFLAGS_X11 = @CFLAGS_X11@
134 CFLAGS_XVIDEO = @CFLAGS_XVIDEO@
137 # Other special cases
139 NEED_GETOPT = @NEED_GETOPT@
141 ###############################################################################
142 # Configuration pre-processing
143 ###############################################################################
145 # PROGRAM_OPTIONS is an identification string of the compilation options
146 PROGRAM_OPTIONS = $(SYS) $(ARCH)
148 PROGRAM_OPTIONS += DEBUG
152 PROGRAM_OPTIONS += CPROF
156 PROGRAM_OPTIONS += GPROF
160 # PROGRAM_BUILD is a complete identification of the build
161 # (we can't use fancy options with date since OSes like Solaris
162 # or FreeBSD have strange date implementations)
164 # XXX: beos does not support hostname (how lame...)
165 PROGRAM_BUILD = `date` $(USER)
167 PROGRAM_BUILD = `date` $(USER)@`hostname`
170 # DEFINE will contain some of the constants definitions decided in Makefile,
171 # including SYS_xx. It will be passed to C compiler.
172 DEFINE_SYS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
173 DEFINE += $(DEFINE_SYS)
175 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
176 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE
179 DEFINE += -DLOCALEDIR=\"$(datadir)/locale\"
181 # Data and plugin location
182 DEFINE += -DDATA_PATH=\"@prefix@/share/videolan\"
183 DEFINE += -DPLUGIN_PATH=\"@prefix@/lib/videolan/vlc\"
185 ###############################################################################
186 # Tuning and other variables - do not change anything except if you know
187 # exactly what you are doing
188 ###############################################################################
191 # C headers directories
194 INCLUDE += -Iinclude -Iextras
197 # Libraries needed by built-in modules
199 LIB_BUILTINS := $(patsubst %,$$LIB_%,$(shell echo $(BUILTINS) | tr '[a-z]' '[A-Z]'))
202 # Libraries needed by the vlc executable
204 ifneq (,$(findstring mingw32,$(SYS)))
205 LIB_VLC += -lws2_32 -lnetapi32
209 # C compiler flags: mainstream compilation
211 CFLAGS += $(DEFINE) $(INCLUDE)
212 CFLAGS += -D_REENTRANT
213 CFLAGS += -D_GNU_SOURCE
216 CFLAGS += -DHAVE_RELEASE
219 # flags needed for clean beos compilation
221 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
224 ifneq (,$(findstring darwin,$(SYS)))
225 CFLAGS += -no-cpp-precomp
228 ifneq (,$(findstring mingw32,$(SYS)))
229 CFLAGS += -fnative-struct -D_OFF_T_ -D_off_t=long
232 ifneq (,$(findstring bsd,$(SYS)))
236 # Optimizations : don't compile debug versions with them
238 CFLAGS += @CFLAGS_OPTIM@
242 CFLAGS += @CFLAGS_OPTIM_NODEBUG@
247 ifneq (,$(findstring powerpc,$(ARCH)))
248 # Optimizations for PowerPC
249 CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
251 CFLAGS += -mtune=$(TUNING)
254 ifneq (,$(findstring sparc,$(ARCH)))
255 # Optimizations for Sparc
256 CFLAGS += -mhard-float
258 CFLAGS += -mcpu=$(TUNING)
261 # Generic optimizations
263 CFLAGS += -mcpu=$(TUNING)
268 #end of optimisations
272 # C compiler flags: dependancies
274 DCFLAGS += $(INCLUDE)
278 # C compiler flags: linking
290 ifneq (,$(findstring mingw32,$(SYS)))
291 LDFLAGS += -mwindows -Xlinker --force-exe-suffix
295 # C compiler flags: plugin compilation
297 ifneq (,$(findstring mingw32,$(SYS)))
298 PCFLAGS += -fnative-struct
304 # C compiler flags: plugin linking
306 PLDFLAGS += @PLDFLAGS@
309 # Debugging and profiling support
316 CFLAGS += -finstrument-functions