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_DVD_PLUGIN = @LIB_DVD_PLUGIN@
76 LIB_DVDREAD_PLUGIN = @LIB_DVDREAD_PLUGIN@
77 LIB_DVDREAD = @LIB_DVDREAD@
78 LIB_DVDREAD_PLUGIN = @LIB_DVDREAD_PLUGIN@
80 LIB_FILTER_DISTORT = @LIB_FILTER_DISTORT@
82 LIB_GLIDE = @LIB_GLIDE@
83 LIB_GNOME = @LIB_GNOME@
85 LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@
86 LIB_IMDCT = @LIB_IMDCT@
87 LIB_IMDCT3DN = @LIB_IMDCT3DN@
88 LIB_IMDCTSSE = @LIB_IMDCTSSE@
90 LIB_LIBDVDCSS = @LIB_LIBDVDCSS@
91 LIB_MACOSX = @LIB_MACOSX@
93 LIB_MOTIONALTIVEC = @LIB_MOTIONALTIVEC@
94 LIB_MPEG_TS = @LIB_MPEG_TS@
95 LIB_NCURSES = @LIB_NCURSES@
101 LIB_XVIDEO = @LIB_XVIDEO@
104 # CFLAGS for special cases
106 CFLAGS_VLC = @CFLAGS_VLC@
107 CFLAGS_ARTS = @CFLAGS_ARTS@
108 CFLAGS_DVD = @CFLAGS_DVD@
109 CFLAGS_DVDREAD = @CFLAGS_DVDREAD@
110 CFLAGS_ESD = @CFLAGS_ESD@
111 CFLAGS_GLIDE = @CFLAGS_GLIDE@
112 CFLAGS_GNOME = @CFLAGS_GNOME@
113 CFLAGS_GTK = @CFLAGS_GTK@
114 CFLAGS_KDE = @CFLAGS_KDE@
115 CFLAGS_IDCTALTIVEC = @CFLAGS_IDCTALTIVEC@
116 CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
117 CFLAGS_MACOSX = @CFLAGS_MACOSX@
118 CFLAGS_MAD = @CFLAGS_MAD@
119 CFLAGS_MOTIONALTIVEC = @CFLAGS_MOTIONALTIVEC@
120 CFLAGS_QT = @CFLAGS_QT@
121 CFLAGS_SDL = @CFLAGS_SDL@
122 CFLAGS_X11 = @CFLAGS_X11@
123 CFLAGS_XVIDEO = @CFLAGS_XVIDEO@
128 SRC_DVD_EXTRA = @SRC_DVD_EXTRA@
129 SRC_DVDCSS_EXTRA = @SRC_DVDCSS_EXTRA@
132 # Other special cases
134 NEED_GETOPT = @NEED_GETOPT@
135 NEED_LIBDVDCSS = @NEED_LIBDVDCSS@
137 ###############################################################################
138 # Configuration pre-processing
139 ###############################################################################
141 # PROGRAM_OPTIONS is an identification string of the compilation options
142 PROGRAM_OPTIONS = $(SYS) $(ARCH)
144 PROGRAM_OPTIONS += DEBUG
148 PROGRAM_OPTIONS += TRACE
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 # PROGRAM_VERSION is the current vlc version
171 PROGRAM_VERSION=@VLC_VERSION@
172 LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
174 # DEFINE will contain some of the constants definitions decided in Makefile,
175 # including SYS_xx. It will be passed to C compiler.
176 DEFINE_SYS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
177 DEFINE += $(DEFINE_SYS)
179 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
180 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
183 DEFINE += -DLOCALEDIR=\"$(datadir)/locale\"
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]'))
200 LIB += $(LIB_BUILTINS)
205 ifneq (,$(findstring mingw32,$(SYS)))
206 LIB += -lws2_32 -lnetapi32
212 # C compiler flags: mainstream compilation
215 CFLAGS += $(DEFINE) $(INCLUDE)
216 CFLAGS += -Wall -Winline
218 CFLAGS += -D_REENTRANT
219 CFLAGS += -D_GNU_SOURCE
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
245 CFLAGS += -ffast-math -funroll-loops
249 CFLAGS += -fomit-frame-pointer
254 ifneq (,$(findstring powerpc,$(ARCH)))
255 # Optimizations for PowerPC
256 CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
258 CFLAGS += -mtune=$(TUNING)
261 ifneq (,$(findstring sparc,$(ARCH)))
262 # Optimizations for Sparc
263 CFLAGS += -mhard-float
265 CFLAGS += -mcpu=$(TUNING)
268 # Generic optimizations
270 CFLAGS += -mcpu=$(TUNING)
275 #end of optimisations
279 # C compiler flags: dependancies
281 DCFLAGS += $(INCLUDE)
285 # C compiler flags: linking
297 ifneq (,$(findstring mingw32,$(SYS)))
298 LDFLAGS += -mwindows -Xlinker --force-exe-suffix
302 # C compiler and linker flags: setting soname
307 # C compiler flags: plugin compilation
309 ifneq (,$(findstring mingw32,$(SYS)))
310 PCFLAGS += -fnative-struct
316 # C compiler flags: plugin linking
318 PLDFLAGS += @PLDFLAGS@
321 # Debugging and profiling support
328 CFLAGS += -finstrument-functions