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
56 # Installation environment
58 exec_prefix = @exec_prefix@
63 includedir = @includedir@
66 # Libraries for special cases
69 LIB_ALTIVEC = @LIB_ALTIVEC@
72 LIB_DARWIN = @LIB_DARWIN@
74 LIB_DVD_PLUGIN = @LIB_DVD_PLUGIN@
77 LIB_GLIDE = @LIB_GLIDE@
78 LIB_GNOME = @LIB_GNOME@
80 LIB_LIBDVDCSS = @LIB_LIBDVDCSS@
82 LIB_MACOSX = @LIB_MACOSX@
84 LIB_NCURSES = @LIB_NCURSES@
88 LIB_DIRECTX = @LIB_DIRECTX@
90 LIB_XVIDEO = @LIB_XVIDEO@
94 # CFLAGS for special cases
96 CFLAGS_ALTIVEC = @CFLAGS_ALTIVEC@
97 CFLAGS_DVD = @CFLAGS_DVD@
98 CFLAGS_ARTS = @CFLAGS_ARTS@
99 CFLAGS_ESD = @CFLAGS_ESD@
100 CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
101 CFLAGS_ESD = @CFLAGS_ESD@
102 CFLAGS_GTK = @CFLAGS_GTK@
103 CFLAGS_SDL = @CFLAGS_SDL@
104 CFLAGS_X11 = @CFLAGS_X11@
110 OBJ_LIBDVDCSS = @OBJ_LIBDVDCSS@
113 # Other special cases
115 NEED_GETOPT = @NEED_GETOPT@
116 NEED_LIBDVDCSS = @NEED_LIBDVDCSS@
118 ###############################################################################
119 # Configuration pre-processing
120 ###############################################################################
122 # PROGRAM_OPTIONS is an identification string of the compilation options
123 PROGRAM_OPTIONS = $(SYS) $(ARCH)
125 PROGRAM_OPTIONS += DEBUG
129 PROGRAM_OPTIONS += TRACE
133 PROGRAM_OPTIONS += CPROF
137 PROGRAM_OPTIONS += GPROF
141 # PROGRAM_BUILD is a complete identification of the build
142 # (we can't use fancy options with date since OSes like Solaris
143 # or FreeBSD have strange date implementations)
145 # XXX: beos does not support hostname (how lame...)
146 PROGRAM_BUILD = `date` $(USER)
148 PROGRAM_BUILD = `date` $(USER)@`hostname`
151 # PROGRAM_VERSION is the current vlc version
152 PROGRAM_VERSION=@VLC_VERSION@
153 LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
155 # DEFINE will contain some of the constants definitions decided in Makefile,
156 # including SYS_xx. It will be passed to C compiler.
157 DEFINE_CONSTANTS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
158 DEFINE += $(DEFINE_CONSTANTS)
160 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
161 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
163 ###############################################################################
164 # Tuning and other variables - do not change anything except if you know
165 # exactly what you are doing
166 ###############################################################################
169 # C headers directories
172 INCLUDE += -Iinclude -Iextras
175 # Libraries needed by built-in modules
177 # Let's go for a crude hack !
178 LIB_MOTIONALTIVEC := $(LIB_ALTIVEC)
179 LIB_IDCTALTIVEC := $(LIB_ALTIVEC)
181 LIB_BUILTINS := $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
182 LIB += $(LIB_BUILTINS)
188 ifneq (,$(findstring mingw32,$(SYS)))
189 LIB += -lws2_32 -lnetapi32
195 # C compiler flags: mainstream compilation
198 CFLAGS += $(DEFINE) $(INCLUDE)
199 CFLAGS += -Wall -Winline
201 CFLAGS += -D_REENTRANT
202 CFLAGS += -D_GNU_SOURCE
208 # flags needed for clean beos compilation
210 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
213 ifneq (,$(findstring darwin,$(SYS)))
214 CFLAGS += -no-cpp-precomp
217 ifneq (,$(findstring mingw32,$(SYS)))
218 CFLAGS += -fnative-struct -D_OFF_T_ -D_off_t=long
221 ifneq (,$(findstring bsd,$(SYS)))
225 # Optimizations : don't compile debug versions with them
228 CFLAGS += -ffast-math -funroll-loops
232 CFLAGS += -fomit-frame-pointer
237 ifneq (,$(findstring powerpc,$(ARCH)))
238 # Optimizations for PowerPC
239 CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
241 CFLAGS += -mtune=$(TUNING)
244 ifneq (,$(findstring sparc,$(ARCH)))
245 # Optimizations for Sparc
246 CFLAGS += -mhard-float
248 CFLAGS += -mcpu=$(TUNING)
251 # Generic optimizations
253 CFLAGS += -mcpu=$(TUNING)
258 #end of optimisations
262 # C compiler flags: dependancies
264 DCFLAGS += $(INCLUDE)
268 # C compiler flags: linking
270 LCFLAGS += @LCFLAGS@ $(LIB)
279 ifneq (,$(findstring mingw32,$(SYS)))
280 LCFLAGS += -mwindows -Xlinker --force-exe-suffix
284 # C compiler and linker flags: setting soname
289 # C compiler flags: plugin compilation
291 ifneq (,$(findstring mingw32,$(SYS)))
292 PCFLAGS += -fnative-struct
298 # C compiler flags: plugin linking
300 PLCFLAGS += @PLCFLAGS@
303 # Debugging and profiling support
310 CFLAGS += -finstrument-functions