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@
73 LIB_DIRECTX = @LIB_DIRECTX@
75 LIB_DVD_PLUGIN = @LIB_DVD_PLUGIN@
76 LIB_DVDREAD = @LIB_DVDREAD@
77 LIB_DVDREAD_PLUGIN = @LIB_DVDREAD_PLUGIN@
80 LIB_GLIDE = @LIB_GLIDE@
81 LIB_GNOME = @LIB_GNOME@
84 LIB_LIBDVDCSS = @LIB_LIBDVDCSS@
85 LIB_MACOSX = @LIB_MACOSX@
86 LIB_NCURSES = @LIB_NCURSES@
93 LIB_XVIDEO = @LIB_XVIDEO@
97 # CFLAGS for special cases
99 CFLAGS_ALTIVEC = @CFLAGS_ALTIVEC@
100 CFLAGS_DVD = @CFLAGS_DVD@
101 CFLAGS_DVDREAD = @CFLAGS_DVDREAD@
102 CFLAGS_ARTS = @CFLAGS_ARTS@
103 CFLAGS_ESD = @CFLAGS_ESD@
104 CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
105 CFLAGS_ESD = @CFLAGS_ESD@
106 CFLAGS_GTK = @CFLAGS_GTK@
107 CFLAGS_SDL = @CFLAGS_SDL@
108 CFLAGS_X11 = @CFLAGS_X11@
114 OBJ_LIBDVDCSS = @OBJ_LIBDVDCSS@
117 # Other special cases
119 NEED_GETOPT = @NEED_GETOPT@
120 NEED_LIBDVDCSS = @NEED_LIBDVDCSS@
122 ###############################################################################
123 # Configuration pre-processing
124 ###############################################################################
126 # PROGRAM_OPTIONS is an identification string of the compilation options
127 PROGRAM_OPTIONS = $(SYS) $(ARCH)
129 PROGRAM_OPTIONS += DEBUG
133 PROGRAM_OPTIONS += TRACE
137 PROGRAM_OPTIONS += CPROF
141 PROGRAM_OPTIONS += GPROF
145 # PROGRAM_BUILD is a complete identification of the build
146 # (we can't use fancy options with date since OSes like Solaris
147 # or FreeBSD have strange date implementations)
149 # XXX: beos does not support hostname (how lame...)
150 PROGRAM_BUILD = `date` $(USER)
152 PROGRAM_BUILD = `date` $(USER)@`hostname`
155 # PROGRAM_VERSION is the current vlc version
156 PROGRAM_VERSION=@VLC_VERSION@
157 LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
159 # DEFINE will contain some of the constants definitions decided in Makefile,
160 # including SYS_xx. It will be passed to C compiler.
161 DEFINE_CONSTANTS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
162 DEFINE += $(DEFINE_CONSTANTS)
164 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
165 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
167 ###############################################################################
168 # Tuning and other variables - do not change anything except if you know
169 # exactly what you are doing
170 ###############################################################################
173 # C headers directories
176 INCLUDE += -Iinclude -Iextras
179 # Libraries needed by built-in modules
181 # Let's go for a crude hack !
182 LIB_MOTIONALTIVEC := $(LIB_ALTIVEC)
183 LIB_IDCTALTIVEC := $(LIB_ALTIVEC)
185 LIB_BUILTINS := $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
186 LIB += $(LIB_BUILTINS)
192 ifneq (,$(findstring mingw32,$(SYS)))
193 LIB += -lws2_32 -lnetapi32
199 # C compiler flags: mainstream compilation
202 CFLAGS += $(DEFINE) $(INCLUDE)
203 CFLAGS += -Wall -Winline
205 CFLAGS += -D_REENTRANT
206 CFLAGS += -D_GNU_SOURCE
212 # flags needed for clean beos compilation
214 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
217 ifneq (,$(findstring darwin,$(SYS)))
218 CFLAGS += -no-cpp-precomp
221 ifneq (,$(findstring mingw32,$(SYS)))
222 CFLAGS += -fnative-struct -D_OFF_T_ -D_off_t=long
225 ifneq (,$(findstring bsd,$(SYS)))
229 # Optimizations : don't compile debug versions with them
232 CFLAGS += -ffast-math -funroll-loops
236 CFLAGS += -fomit-frame-pointer
241 ifneq (,$(findstring powerpc,$(ARCH)))
242 # Optimizations for PowerPC
243 CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
245 CFLAGS += -mtune=$(TUNING)
248 ifneq (,$(findstring sparc,$(ARCH)))
249 # Optimizations for Sparc
250 CFLAGS += -mhard-float
252 CFLAGS += -mcpu=$(TUNING)
255 # Generic optimizations
257 CFLAGS += -mcpu=$(TUNING)
262 #end of optimisations
266 # C compiler flags: dependancies
268 DCFLAGS += $(INCLUDE)
272 # C compiler flags: linking
274 LCFLAGS += @LCFLAGS@ $(LIB)
283 ifneq (,$(findstring mingw32,$(SYS)))
284 LCFLAGS += -mwindows -Xlinker --force-exe-suffix
288 # C compiler and linker flags: setting soname
293 # C compiler flags: plugin compilation
295 ifneq (,$(findstring mingw32,$(SYS)))
296 PCFLAGS += -fnative-struct
302 # C compiler flags: plugin linking
304 PLCFLAGS += @PLCFLAGS@
307 # Debugging and profiling support
314 CFLAGS += -finstrument-functions