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@
87 LIB_NCURSES = @LIB_NCURSES@
94 LIB_XVIDEO = @LIB_XVIDEO@
98 # CFLAGS for special cases
100 CFLAGS_ALTIVEC = @CFLAGS_ALTIVEC@
101 CFLAGS_DVD = @CFLAGS_DVD@
102 CFLAGS_DVDREAD = @CFLAGS_DVDREAD@
103 CFLAGS_ARTS = @CFLAGS_ARTS@
104 CFLAGS_ESD = @CFLAGS_ESD@
105 CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
106 CFLAGS_ESD = @CFLAGS_ESD@
107 CFLAGS_GTK = @CFLAGS_GTK@
108 CFLAGS_MAD = @CFLAGS_MAD@
109 CFLAGS_SDL = @CFLAGS_SDL@
110 CFLAGS_X11 = @CFLAGS_X11@
116 OBJ_LIBDVDCSS = @OBJ_LIBDVDCSS@
119 # Other special cases
121 NEED_GETOPT = @NEED_GETOPT@
122 NEED_LIBDVDCSS = @NEED_LIBDVDCSS@
124 ###############################################################################
125 # Configuration pre-processing
126 ###############################################################################
128 # PROGRAM_OPTIONS is an identification string of the compilation options
129 PROGRAM_OPTIONS = $(SYS) $(ARCH)
131 PROGRAM_OPTIONS += DEBUG
135 PROGRAM_OPTIONS += TRACE
139 PROGRAM_OPTIONS += CPROF
143 PROGRAM_OPTIONS += GPROF
147 # PROGRAM_BUILD is a complete identification of the build
148 # (we can't use fancy options with date since OSes like Solaris
149 # or FreeBSD have strange date implementations)
151 # XXX: beos does not support hostname (how lame...)
152 PROGRAM_BUILD = `date` $(USER)
154 PROGRAM_BUILD = `date` $(USER)@`hostname`
157 # PROGRAM_VERSION is the current vlc version
158 PROGRAM_VERSION=@VLC_VERSION@
159 LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
161 # DEFINE will contain some of the constants definitions decided in Makefile,
162 # including SYS_xx. It will be passed to C compiler.
163 DEFINE_CONSTANTS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
164 DEFINE += $(DEFINE_CONSTANTS)
166 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
167 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
169 ###############################################################################
170 # Tuning and other variables - do not change anything except if you know
171 # exactly what you are doing
172 ###############################################################################
175 # C headers directories
178 INCLUDE += -Iinclude -Iextras
181 # Libraries needed by built-in modules
183 # Let's go for a crude hack !
184 LIB_MOTIONALTIVEC := $(LIB_ALTIVEC)
185 LIB_IDCTALTIVEC := $(LIB_ALTIVEC)
187 LIB_BUILTINS := $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
188 LIB += $(LIB_BUILTINS)
194 ifneq (,$(findstring mingw32,$(SYS)))
195 LIB += -lws2_32 -lnetapi32
201 # C compiler flags: mainstream compilation
204 CFLAGS += $(DEFINE) $(INCLUDE)
205 CFLAGS += -Wall -Winline
207 CFLAGS += -D_REENTRANT
208 CFLAGS += -D_GNU_SOURCE
214 # flags needed for clean beos compilation
216 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
219 ifneq (,$(findstring darwin,$(SYS)))
220 CFLAGS += -no-cpp-precomp
223 ifneq (,$(findstring mingw32,$(SYS)))
224 CFLAGS += -fnative-struct -D_OFF_T_ -D_off_t=long
227 ifneq (,$(findstring bsd,$(SYS)))
231 # Optimizations : don't compile debug versions with them
234 CFLAGS += -ffast-math -funroll-loops
238 CFLAGS += -fomit-frame-pointer
243 ifneq (,$(findstring powerpc,$(ARCH)))
244 # Optimizations for PowerPC
245 CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
247 CFLAGS += -mtune=$(TUNING)
250 ifneq (,$(findstring sparc,$(ARCH)))
251 # Optimizations for Sparc
252 CFLAGS += -mhard-float
254 CFLAGS += -mcpu=$(TUNING)
257 # Generic optimizations
259 CFLAGS += -mcpu=$(TUNING)
264 #end of optimisations
268 # C compiler flags: dependancies
270 DCFLAGS += $(INCLUDE)
274 # C compiler flags: linking
276 LCFLAGS += @LCFLAGS@ $(LIB)
285 ifneq (,$(findstring mingw32,$(SYS)))
286 LCFLAGS += -mwindows -Xlinker --force-exe-suffix
290 # C compiler and linker flags: setting soname
295 # C compiler flags: plugin compilation
297 ifneq (,$(findstring mingw32,$(SYS)))
298 PCFLAGS += -fnative-struct
304 # C compiler flags: plugin linking
306 PLCFLAGS += @PLCFLAGS@
309 # Debugging and profiling support
316 CFLAGS += -finstrument-functions