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
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@
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_DVD = @CFLAGS_DVD@
95 CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
96 CFLAGS_GTK = @CFLAGS_GTK@
97 CFLAGS_SDL = @CFLAGS_SDL@
98 CFLAGS_X11 = @CFLAGS_X11@
104 OBJ_LIBDVDCSS = @OBJ_LIBDVDCSS@
107 # Other special cases
109 NEED_GETOPT = @NEED_GETOPT@
110 NEED_LIBDVDCSS = @NEED_LIBDVDCSS@
112 ###############################################################################
113 # Configuration pre-processing
114 ###############################################################################
116 # PROGRAM_OPTIONS is an identification string of the compilation options
117 PROGRAM_OPTIONS = $(SYS) $(ARCH)
119 PROGRAM_OPTIONS += DEBUG
123 PROGRAM_OPTIONS += TRACE
127 PROGRAM_OPTIONS += CPROF
131 PROGRAM_OPTIONS += GPROF
135 PROGRAM_OPTIONS += STATS
139 # PROGRAM_BUILD is a complete identification of the build
140 # (we can't use fancy options with date since OSes like Solaris
141 # or FreeBSD have strange date implementations)
143 # XXX: beos does not support hostname (how lame...)
144 PROGRAM_BUILD = `date` $(USER)
146 PROGRAM_BUILD = `date` $(USER)@`hostname`
149 # PROGRAM_VERSION is the current vlc version
150 PROGRAM_VERSION=@VLC_VERSION@
151 LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
153 # DEFINE will contain some of the constants definitions decided in Makefile,
154 # including SYS_xx. It will be passed to C compiler.
155 DEFINE_CONSTANTS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
156 DEFINE += $(DEFINE_CONSTANTS)
158 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
159 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
161 ###############################################################################
162 # Tuning and other variables - do not change anything except if you know
163 # exactly what you are doing
164 ###############################################################################
167 # C headers directories
170 INCLUDE += -Iinclude -Iextras
173 # Libraries needed by built-in modules
176 LIB_BUILTINS := $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
177 LIB += $(LIB_BUILTINS)
183 ifneq (,$(findstring mingw32,$(SYS)))
184 LIB += -lws2_32 -lnetapi32
187 LIB += -L/usr/local/lib @LIB@
190 # C compiler flags: mainstream compilation
193 CFLAGS += $(DEFINE) $(INCLUDE)
194 CFLAGS += -Wall -Winline
196 CFLAGS += -D_REENTRANT
197 CFLAGS += -D_GNU_SOURCE
199 # flags needed for clean beos compilation
201 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
204 ifneq (,$(findstring darwin,$(SYS)))
205 CFLAGS += -traditional-cpp
208 ifneq (,$(findstring mingw32,$(SYS)))
209 CFLAGS += -fnative-struct -D_OFF_T_ -D_off_t=long
212 ifneq (,$(findstring bsd,$(SYS)))
216 # Optimizations : don't compile debug versions with them
219 CFLAGS += -ffast-math -funroll-loops
223 CFLAGS += -fomit-frame-pointer
228 # Optimizations for x86 familiy
229 ifneq (,$(findstring 86,$(ARCH)))
230 # Optional Pentium Pro optimizations
231 ifneq (,$(findstring ppro,$(ARCH)))
232 CFLAGS += -march=pentiumpro -mcpu=pentiumpro
234 CFLAGS += -march=pentium -mcpu=pentium
238 # Optimizations for PowerPC
239 ifneq (,$(findstring powerpc,$(ARCH)))
240 CFLAGS += -mmultiple -mhard-float -mstring
243 # Optimizations for Sparc
244 ifneq (,$(findstring sparc,$(ARCH)))
245 CFLAGS += -mhard-float
248 #end of optimisations
252 # C compiler flags: dependancies
254 DCFLAGS += $(INCLUDE)
258 # C compiler flags: linking
260 LCFLAGS += @LCFLAGS@ $(LIB)
263 ifneq (,$(findstring mingw32,$(SYS)))
264 LCFLAGS += -mwindows -Xlinker --force-exe-suffix
268 # C compiler and linker flags: setting soname
273 # C compiler flags: plugin compilation
275 ifneq (,$(findstring mingw32,$(SYS)))
276 PCFLAGS += -fnative-struct
282 # C compiler flags: plugin linking
284 PLCFLAGS += @PLCFLAGS@
287 # Debugging and profiling support
294 CFLAGS += -finstrument-functions