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
40 PROFILING = @PROFILING@
55 # Installation environment
57 exec_prefix = @exec_prefix@
62 includedir = @includedir@
65 # Libraries for special cases
69 LIB_DARWIN = @LIB_DARWIN@
71 LIB_DVD_PLUGIN = @LIB_DVD_PLUGIN@
74 LIB_GLIDE = @LIB_GLIDE@
75 LIB_GNOME = @LIB_GNOME@
77 LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@
79 LIB_MACOSX = @LIB_MACOSX@
81 LIB_NCURSES = @LIB_NCURSES@
85 LIB_DIRECTX = @LIB_DIRECTX@
87 LIB_XVIDEO = @LIB_XVIDEO@
91 # CFLAGS for special cases
93 CFLAGS_DVD = @CFLAGS_DVD@
94 CFLAGS_GTK = @CFLAGS_GTK@
95 CFLAGS_SDL = @CFLAGS_SDL@
96 CFLAGS_X11 = @CFLAGS_X11@
102 LOCAL_LIBDVDCSS = @LOCAL_LIBDVDCSS@
104 ###############################################################################
105 # Configuration pre-processing
106 ###############################################################################
108 # PROGRAM_OPTIONS is an identification string of the compilation options
109 PROGRAM_OPTIONS = $(SYS) $(ARCH)
111 PROGRAM_OPTIONS += DEBUG
115 PROGRAM_OPTIONS += TRACE
118 ifeq ($(PROFILING),1)
119 PROGRAM_OPTIONS += PROFILING
120 DEFINE += -DPROFILING
123 PROGRAM_OPTIONS += STATS
127 # PROGRAM_BUILD is a complete identification of the build
128 # (we can't use fancy options with date since OSes like Solaris
129 # or FreeBSD have strange date implementations)
131 # XXX: beos does not support hostname (how lame...)
132 PROGRAM_BUILD = `date` $(USER)
134 PROGRAM_BUILD = `date` $(USER)@`hostname`
137 # PROGRAM_VERSION is the current vlc version
138 PROGRAM_VERSION=@VLC_VERSION@
139 LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
141 # DEFINE will contain some of the constants definitions decided in Makefile,
142 # including SYS_xx. It will be passed to C compiler.
143 DEFINE_CONSTANTS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
144 DEFINE += $(DEFINE_CONSTANTS)
146 # On Linux activate 64-bit off_t (by default under BSD)
147 ifneq (,$(findstring linux,$(SYS)))
148 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
151 ###############################################################################
152 # Tuning and other variables - do not change anything except if you know
153 # exactly what you are doing
154 ###############################################################################
157 # C headers directories
160 INCLUDE += -Iinclude -Iextras -I/usr/local/include
163 # Libraries needed by built-in modules
166 LIB_BUILTINS := $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
167 LIB += $(LIB_BUILTINS)
173 ifneq (,$(findstring mingw32,$(SYS)))
174 LIB += -lws2_32 -lnetapi32
177 LIB += -L/usr/local/lib @LIB@
180 # C compiler flags: mainstream compilation
183 CFLAGS += $(DEFINE) $(INCLUDE)
184 CFLAGS += -Wall -Winline
186 CFLAGS += -D_REENTRANT
187 CFLAGS += -D_GNU_SOURCE
189 # flags needed for clean beos compilation
191 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
194 ifneq (,$(findstring darwin,$(SYS)))
195 CFLAGS += -traditional-cpp
198 ifneq (,$(findstring mingw32,$(SYS)))
199 CFLAGS += -fnative-struct -D_OFF_T_ -D_off_t=long
202 ifneq (,$(findstring bsd,$(SYS)))
206 # Optimizations : don't compile debug versions with them
209 CFLAGS += -ffast-math -funroll-loops
211 ifneq ($(PROFILING),1)
212 CFLAGS += -fomit-frame-pointer
216 # Optimizations for x86 familiy
217 ifneq (,$(findstring 86,$(ARCH)))
218 # Optional Pentium Pro optimizations
219 ifneq (,$(findstring ppro,$(ARCH)))
220 CFLAGS += -march=pentiumpro -mcpu=pentiumpro
222 CFLAGS += -march=pentium -mcpu=pentium
226 # Optimizations for PowerPC
227 ifneq (,$(findstring powerpc,$(ARCH)))
228 CFLAGS += -mmultiple -mhard-float -mstring
231 # Optimizations for Sparc
232 ifneq (,$(findstring sparc,$(ARCH)))
233 CFLAGS += -mhard-float
236 #end of optimisations
240 # C compiler flags: dependancies
242 DCFLAGS += $(INCLUDE)
246 # C compiler flags: linking
248 LCFLAGS += @LCFLAGS@ $(LIB)
251 ifneq (,$(findstring mingw32,$(SYS)))
252 LCFLAGS += -mwindows -Xlinker --force-exe-suffix
256 # C compiler flags: plugin compilation
258 ifneq (,$(findstring mingw32,$(SYS)))
259 PCFLAGS += -fnative-struct
265 # C compiler flags: plugin linking
267 PLCFLAGS += @PLCFLAGS@
270 # Debugging and profiling support
276 ifeq ($(PROFILING),1)