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
57 # Installation environment
59 exec_prefix = @exec_prefix@
64 includedir = @includedir@
67 # Libraries for special cases
72 LIB_DARWIN = @LIB_DARWIN@
73 LIB_DIRECTX = @LIB_DIRECTX@
75 LIB_DVDREAD = @LIB_DVDREAD@
77 LIB_FILTER_DISTORT = @LIB_FILTER_DISTORT@
79 LIB_GLIDE = @LIB_GLIDE@
80 LIB_GNOME = @LIB_GNOME@
82 LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@
83 LIB_IMDCT = @LIB_IMDCT@
84 LIB_IMDCT3DN = @LIB_IMDCT3DN@
85 LIB_IMDCTSSE = @LIB_IMDCTSSE@
87 LIB_LIBA52_ADEC = @LIB_LIBA52_ADEC@
88 LIB_LIBDVDCSS = @LIB_LIBDVDCSS@
89 LIB_LIBDVDREAD = @LIB_LIBDVDREAD@
91 LIB_MACOSX = @LIB_MACOSX@
93 LIB_MOTIONALTIVEC = @LIB_MOTIONALTIVEC@
94 LIB_MPEG_TS = @LIB_MPEG_TS@
95 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 += TRACE
155 PROGRAM_OPTIONS += CPROF
159 PROGRAM_OPTIONS += GPROF
163 # PROGRAM_BUILD is a complete identification of the build
164 # (we can't use fancy options with date since OSes like Solaris
165 # or FreeBSD have strange date implementations)
167 # XXX: beos does not support hostname (how lame...)
168 PROGRAM_BUILD = `date` $(USER)
170 PROGRAM_BUILD = `date` $(USER)@`hostname`
173 # PROGRAM_VERSION is the current vlc version
174 PROGRAM_VERSION=@VLC_VERSION@
175 LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
177 # DEFINE will contain some of the constants definitions decided in Makefile,
178 # including SYS_xx. It will be passed to C compiler.
179 DEFINE_SYS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
180 DEFINE += $(DEFINE_SYS)
182 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
183 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE
186 DEFINE += -DLOCALEDIR=\"$(datadir)/locale\"
188 # Data and plugin location
189 DEFINE += -DDATA_PATH=\"@prefix@/share/videolan\"
190 DEFINE += -DPLUGIN_PATH=\"@prefix@/lib/videolan/vlc\"
192 ###############################################################################
193 # Tuning and other variables - do not change anything except if you know
194 # exactly what you are doing
195 ###############################################################################
198 # C headers directories
201 INCLUDE += -Iinclude -Iextras
204 # Libraries needed by built-in modules
206 LIB_BUILTINS := $(patsubst %,$$LIB_%,$(shell echo $(BUILTINS) | tr '[a-z]' '[A-Z]'))
207 LIB += $(LIB_BUILTINS)
212 ifneq (,$(findstring mingw32,$(SYS)))
213 LIB += -lws2_32 -lnetapi32
219 # C compiler flags: mainstream compilation
221 CFLAGS += $(DEFINE) $(INCLUDE)
222 CFLAGS += -D_REENTRANT
223 CFLAGS += -D_GNU_SOURCE
226 CFLAGS += -DHAVE_RELEASE
229 # flags needed for clean beos compilation
231 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
234 ifneq (,$(findstring darwin,$(SYS)))
235 CFLAGS += -no-cpp-precomp
238 ifneq (,$(findstring mingw32,$(SYS)))
239 CFLAGS += -fnative-struct -D_OFF_T_ -D_off_t=long
242 ifneq (,$(findstring bsd,$(SYS)))
246 # Optimizations : don't compile debug versions with them
248 CFLAGS += @CFLAGS_OPTIM@
252 CFLAGS += @CFLAGS_OPTIM_NODEBUG@
257 ifneq (,$(findstring powerpc,$(ARCH)))
258 # Optimizations for PowerPC
259 CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
261 CFLAGS += -mtune=$(TUNING)
264 ifneq (,$(findstring sparc,$(ARCH)))
265 # Optimizations for Sparc
266 CFLAGS += -mhard-float
268 CFLAGS += -mcpu=$(TUNING)
271 # Generic optimizations
273 CFLAGS += -mcpu=$(TUNING)
278 #end of optimisations
282 # C compiler flags: dependancies
284 DCFLAGS += $(INCLUDE)
288 # C compiler flags: linking
300 ifneq (,$(findstring mingw32,$(SYS)))
301 LDFLAGS += -mwindows -Xlinker --force-exe-suffix
305 # C compiler and linker flags: setting soname
310 # C compiler flags: plugin compilation
312 ifneq (,$(findstring mingw32,$(SYS)))
313 PCFLAGS += -fnative-struct
319 # C compiler flags: plugin linking
321 PLDFLAGS += @PLDFLAGS@
324 # Debugging and profiling support
331 CFLAGS += -finstrument-functions