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
70 LIB_ALTIVEC = @LIB_ALTIVEC@
73 LIB_DARWIN = @LIB_DARWIN@
74 LIB_DIRECTX = @LIB_DIRECTX@
76 LIB_DVD_PLUGIN = @LIB_DVD_PLUGIN@
77 LIB_DVDREAD = @LIB_DVDREAD@
78 LIB_DVDREAD_PLUGIN = @LIB_DVDREAD_PLUGIN@
81 LIB_GLIDE = @LIB_GLIDE@
82 LIB_GNOME = @LIB_GNOME@
84 LIB_IMDCT = @LIB_IMDCT@
85 LIB_IMDCT3DN = @LIB_IMDCT3DN@
86 LIB_IMDCTSSE = @LIB_IMDCTSSE@
88 LIB_LIBDVDCSS = @LIB_LIBDVDCSS@
89 LIB_MACOSX = @LIB_MACOSX@
91 LIB_NCURSES = @LIB_NCURSES@
98 LIB_XVIDEO = @LIB_XVIDEO@
102 # CFLAGS for special cases
104 CFLAGS_VLC = @CFLAGS_VLC@
105 CFLAGS_ALTIVEC = @CFLAGS_ALTIVEC@
106 CFLAGS_DVD = @CFLAGS_DVD@
107 CFLAGS_DVDREAD = @CFLAGS_DVDREAD@
108 CFLAGS_ARTS = @CFLAGS_ARTS@
109 CFLAGS_ESD = @CFLAGS_ESD@
110 CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
111 CFLAGS_ESD = @CFLAGS_ESD@
112 CFLAGS_GTK = @CFLAGS_GTK@
113 CFLAGS_MAD = @CFLAGS_MAD@
114 CFLAGS_SDL = @CFLAGS_SDL@
115 CFLAGS_X11 = @CFLAGS_X11@
121 OBJ_LIBDVDCSS = @OBJ_LIBDVDCSS@
124 # Other special cases
126 NEED_GETOPT = @NEED_GETOPT@
127 NEED_LIBDVDCSS = @NEED_LIBDVDCSS@
129 ###############################################################################
130 # Configuration pre-processing
131 ###############################################################################
133 # PROGRAM_OPTIONS is an identification string of the compilation options
134 PROGRAM_OPTIONS = $(SYS) $(ARCH)
136 PROGRAM_OPTIONS += DEBUG
140 PROGRAM_OPTIONS += TRACE
144 PROGRAM_OPTIONS += CPROF
148 PROGRAM_OPTIONS += GPROF
152 # PROGRAM_BUILD is a complete identification of the build
153 # (we can't use fancy options with date since OSes like Solaris
154 # or FreeBSD have strange date implementations)
156 # XXX: beos does not support hostname (how lame...)
157 PROGRAM_BUILD = `date` $(USER)
159 PROGRAM_BUILD = `date` $(USER)@`hostname`
162 # PROGRAM_VERSION is the current vlc version
163 PROGRAM_VERSION=@VLC_VERSION@
164 LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
166 # DEFINE will contain some of the constants definitions decided in Makefile,
167 # including SYS_xx. It will be passed to C compiler.
168 DEFINE_CONSTANTS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
169 DEFINE += $(DEFINE_CONSTANTS)
171 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
172 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
174 ###############################################################################
175 # Tuning and other variables - do not change anything except if you know
176 # exactly what you are doing
177 ###############################################################################
180 # C headers directories
183 INCLUDE += -Iinclude -Iextras
186 # Libraries needed by built-in modules
188 # Let's go for a crude hack !
189 LIB_MOTIONALTIVEC := $(LIB_ALTIVEC)
190 LIB_IDCTALTIVEC := $(LIB_ALTIVEC)
192 LIB_BUILTINS := $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
193 LIB += $(LIB_BUILTINS)
199 ifneq (,$(findstring mingw32,$(SYS)))
200 LIB += -lws2_32 -lnetapi32
206 # C compiler flags: mainstream compilation
209 CFLAGS += $(DEFINE) $(INCLUDE)
210 CFLAGS += -Wall -Winline
212 CFLAGS += -D_REENTRANT
213 CFLAGS += -D_GNU_SOURCE
219 # flags needed for clean beos compilation
221 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
224 ifneq (,$(findstring darwin,$(SYS)))
225 CFLAGS += -no-cpp-precomp
228 ifneq (,$(findstring mingw32,$(SYS)))
229 CFLAGS += -fnative-struct -D_OFF_T_ -D_off_t=long
232 ifneq (,$(findstring bsd,$(SYS)))
236 # Optimizations : don't compile debug versions with them
239 CFLAGS += -ffast-math -funroll-loops
243 CFLAGS += -fomit-frame-pointer
248 ifneq (,$(findstring powerpc,$(ARCH)))
249 # Optimizations for PowerPC
250 CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
252 CFLAGS += -mtune=$(TUNING)
255 ifneq (,$(findstring sparc,$(ARCH)))
256 # Optimizations for Sparc
257 CFLAGS += -mhard-float
259 CFLAGS += -mcpu=$(TUNING)
262 # Generic optimizations
264 CFLAGS += -mcpu=$(TUNING)
269 #end of optimisations
273 # C compiler flags: dependancies
275 DCFLAGS += $(INCLUDE)
279 # C compiler flags: linking
281 LCFLAGS += @LCFLAGS@ $(LIB)
290 ifneq (,$(findstring mingw32,$(SYS)))
291 LCFLAGS += -mwindows -Xlinker --force-exe-suffix
295 # C compiler and linker flags: setting soname
300 # C compiler flags: plugin compilation
302 ifneq (,$(findstring mingw32,$(SYS)))
303 PCFLAGS += -fnative-struct
309 # C compiler flags: plugin linking
311 PLCFLAGS += @PLCFLAGS@
314 # Debugging and profiling support
321 CFLAGS += -finstrument-functions