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
55 # Installation environment
57 exec_prefix = @exec_prefix@
62 includedir = @includedir@
65 # Libraries for special cases
68 LIB_ALTIVEC = @LIB_ALTIVEC@
70 LIB_DARWIN = @LIB_DARWIN@
72 LIB_DVD_PLUGIN = @LIB_DVD_PLUGIN@
75 LIB_GLIDE = @LIB_GLIDE@
76 LIB_GNOME = @LIB_GNOME@
78 LIB_LIBDVDCSS = @LIB_LIBDVDCSS@
80 LIB_MACOSX = @LIB_MACOSX@
82 LIB_NCURSES = @LIB_NCURSES@
86 LIB_DIRECTX = @LIB_DIRECTX@
88 LIB_XVIDEO = @LIB_XVIDEO@
92 # CFLAGS for special cases
94 CFLAGS_ALTIVEC = @CFLAGS_ALTIVEC@
95 CFLAGS_DVD = @CFLAGS_DVD@
96 CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
97 CFLAGS_GTK = @CFLAGS_GTK@
98 CFLAGS_SDL = @CFLAGS_SDL@
99 CFLAGS_X11 = @CFLAGS_X11@
105 OBJ_LIBDVDCSS = @OBJ_LIBDVDCSS@
108 # Other special cases
110 NEED_GETOPT = @NEED_GETOPT@
111 NEED_LIBDVDCSS = @NEED_LIBDVDCSS@
113 ###############################################################################
114 # Configuration pre-processing
115 ###############################################################################
117 # PROGRAM_OPTIONS is an identification string of the compilation options
118 PROGRAM_OPTIONS = $(SYS) $(ARCH)
120 PROGRAM_OPTIONS += DEBUG
124 PROGRAM_OPTIONS += TRACE
128 PROGRAM_OPTIONS += CPROF
132 PROGRAM_OPTIONS += GPROF
136 PROGRAM_OPTIONS += STATS
140 # PROGRAM_BUILD is a complete identification of the build
141 # (we can't use fancy options with date since OSes like Solaris
142 # or FreeBSD have strange date implementations)
144 # XXX: beos does not support hostname (how lame...)
145 PROGRAM_BUILD = `date` $(USER)
147 PROGRAM_BUILD = `date` $(USER)@`hostname`
150 # PROGRAM_VERSION is the current vlc version
151 PROGRAM_VERSION=@VLC_VERSION@
152 LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
154 # DEFINE will contain some of the constants definitions decided in Makefile,
155 # including SYS_xx. It will be passed to C compiler.
156 DEFINE_CONSTANTS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
157 DEFINE += $(DEFINE_CONSTANTS)
159 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
160 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
162 ###############################################################################
163 # Tuning and other variables - do not change anything except if you know
164 # exactly what you are doing
165 ###############################################################################
168 # C headers directories
171 INCLUDE += -Iinclude -Iextras
174 # Libraries needed by built-in modules
176 # Let's go for a crude hack !
177 LIB_MOTIONALTIVEC := $(LIB_ALTIVEC)
178 LIB_IDCTALTIVEC := $(LIB_ALTIVEC)
180 LIB_BUILTINS := $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
181 LIB += $(LIB_BUILTINS)
187 ifneq (,$(findstring mingw32,$(SYS)))
188 LIB += -lws2_32 -lnetapi32
194 # C compiler flags: mainstream compilation
197 CFLAGS += $(DEFINE) $(INCLUDE)
198 CFLAGS += -Wall -Winline
200 CFLAGS += -D_REENTRANT
201 CFLAGS += -D_GNU_SOURCE
203 # flags needed for clean beos compilation
205 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
208 ifneq (,$(findstring darwin,$(SYS)))
209 CFLAGS += -traditional-cpp
212 ifneq (,$(findstring mingw32,$(SYS)))
213 CFLAGS += -fnative-struct -D_OFF_T_ -D_off_t=long
216 ifneq (,$(findstring bsd,$(SYS)))
220 # Optimizations : don't compile debug versions with them
223 CFLAGS += -ffast-math -funroll-loops
227 CFLAGS += -fomit-frame-pointer
232 # Optimizations for x86 familiy
233 ifneq (,$(findstring 86,$(ARCH)))
234 # Optional Pentium Pro optimizations
235 ifneq (,$(findstring ppro,$(ARCH)))
236 CFLAGS += -march=pentiumpro -mcpu=pentiumpro
238 CFLAGS += -march=pentium -mcpu=pentium
242 # Optimizations for PowerPC
243 ifneq (,$(findstring powerpc,$(ARCH)))
244 CFLAGS += -mmultiple -mhard-float -mstring
247 # Optimizations for Sparc
248 ifneq (,$(findstring sparc,$(ARCH)))
249 CFLAGS += -mhard-float
252 #end of optimisations
256 # C compiler flags: dependancies
258 DCFLAGS += $(INCLUDE)
262 # C compiler flags: linking
264 LCFLAGS += @LCFLAGS@ $(LIB)
273 ifneq (,$(findstring mingw32,$(SYS)))
274 LCFLAGS += -mwindows -Xlinker --force-exe-suffix
278 # C compiler and linker flags: setting soname
283 # C compiler flags: plugin compilation
285 ifneq (,$(findstring mingw32,$(SYS)))
286 PCFLAGS += -fnative-struct
292 # C compiler flags: plugin linking
294 PLCFLAGS += @PLCFLAGS@
297 # Debugging and profiling support
304 CFLAGS += -finstrument-functions