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@
83 LIB_IMDCT = @LIB_IMDCT@
84 LIB_IMDCT3DN = @LIB_IMDCT3DN@
85 LIB_IMDCTSSE = @LIB_IMDCTSSE@
87 LIB_LIBDVDCSS = @LIB_LIBDVDCSS@
88 LIB_MACOSX = @LIB_MACOSX@
90 LIB_MPEG_TS = @LIB_MPEG_TS@
91 LIB_NCURSES = @LIB_NCURSES@
97 LIB_XVIDEO = @LIB_XVIDEO@
101 # CFLAGS for special cases
103 CFLAGS_ALTIVEC = @CFLAGS_ALTIVEC@
104 CFLAGS_DVD = @CFLAGS_DVD@
105 CFLAGS_DVDREAD = @CFLAGS_DVDREAD@
106 CFLAGS_ARTS = @CFLAGS_ARTS@
107 CFLAGS_ESD = @CFLAGS_ESD@
108 CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
109 CFLAGS_ESD = @CFLAGS_ESD@
110 CFLAGS_GTK = @CFLAGS_GTK@
111 CFLAGS_MAD = @CFLAGS_MAD@
112 CFLAGS_SDL = @CFLAGS_SDL@
113 CFLAGS_X11 = @CFLAGS_X11@
114 CFLAGS_XVIDEO = @CFLAGS_XVIDEO@
120 OBJ_LIBDVDCSS = @OBJ_LIBDVDCSS@
123 # Other special cases
125 NEED_GETOPT = @NEED_GETOPT@
126 NEED_LIBDVDCSS = @NEED_LIBDVDCSS@
128 ###############################################################################
129 # Configuration pre-processing
130 ###############################################################################
132 # PROGRAM_OPTIONS is an identification string of the compilation options
133 PROGRAM_OPTIONS = $(SYS) $(ARCH)
135 PROGRAM_OPTIONS += DEBUG
139 PROGRAM_OPTIONS += TRACE
143 PROGRAM_OPTIONS += CPROF
147 PROGRAM_OPTIONS += GPROF
151 # PROGRAM_BUILD is a complete identification of the build
152 # (we can't use fancy options with date since OSes like Solaris
153 # or FreeBSD have strange date implementations)
155 # XXX: beos does not support hostname (how lame...)
156 PROGRAM_BUILD = `date` $(USER)
158 PROGRAM_BUILD = `date` $(USER)@`hostname`
161 # PROGRAM_VERSION is the current vlc version
162 PROGRAM_VERSION=@VLC_VERSION@
163 LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
165 # DEFINE will contain some of the constants definitions decided in Makefile,
166 # including SYS_xx. It will be passed to C compiler.
167 DEFINE_CONSTANTS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
168 DEFINE += $(DEFINE_CONSTANTS)
170 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
171 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
174 DEFINE += -DLOCALEDIR=\"$(datadir)/locale\"
176 ###############################################################################
177 # Tuning and other variables - do not change anything except if you know
178 # exactly what you are doing
179 ###############################################################################
182 # C headers directories
185 INCLUDE += -Iinclude -Iextras
188 # Libraries needed by built-in modules
190 # Let's go for a crude hack !
191 LIB_MOTIONALTIVEC := $(LIB_ALTIVEC)
192 LIB_IDCTALTIVEC := $(LIB_ALTIVEC)
194 LIB_BUILTINS := $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
195 LIB += $(LIB_BUILTINS)
201 ifneq (,$(findstring mingw32,$(SYS)))
202 LIB += -lws2_32 -lnetapi32
208 # C compiler flags: mainstream compilation
211 CFLAGS += $(DEFINE) $(INCLUDE)
212 CFLAGS += -Wall -Winline
214 CFLAGS += -D_REENTRANT
215 CFLAGS += -D_GNU_SOURCE
221 # flags needed for clean beos compilation
223 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
226 ifneq (,$(findstring darwin,$(SYS)))
227 CFLAGS += -no-cpp-precomp
230 ifneq (,$(findstring mingw32,$(SYS)))
231 CFLAGS += -fnative-struct -D_OFF_T_ -D_off_t=long
234 ifneq (,$(findstring bsd,$(SYS)))
238 # Optimizations : don't compile debug versions with them
241 CFLAGS += -ffast-math -funroll-loops
245 CFLAGS += -fomit-frame-pointer
250 ifneq (,$(findstring powerpc,$(ARCH)))
251 # Optimizations for PowerPC
252 CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
254 CFLAGS += -mtune=$(TUNING)
257 ifneq (,$(findstring sparc,$(ARCH)))
258 # Optimizations for Sparc
259 CFLAGS += -mhard-float
261 CFLAGS += -mcpu=$(TUNING)
264 # Generic optimizations
266 CFLAGS += -mcpu=$(TUNING)
271 #end of optimisations
275 # C compiler flags: dependancies
277 DCFLAGS += $(INCLUDE)
281 # C compiler flags: linking
283 LCFLAGS += @LCFLAGS@ $(LIB)
292 ifneq (,$(findstring mingw32,$(SYS)))
293 LCFLAGS += -mwindows -Xlinker --force-exe-suffix
297 # C compiler and linker flags: setting soname
302 # C compiler flags: plugin compilation
304 ifneq (,$(findstring mingw32,$(SYS)))
305 PCFLAGS += -fnative-struct
311 # C compiler flags: plugin linking
313 PLCFLAGS += @PLCFLAGS@
316 # Debugging and profiling support
323 CFLAGS += -finstrument-functions