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@
80 LIB_FILTER_DISTORT = @LIB_FILTER_DISTORT@
82 LIB_GLIDE = @LIB_GLIDE@
83 LIB_GNOME = @LIB_GNOME@
85 LIB_IMDCT = @LIB_IMDCT@
86 LIB_IMDCT3DN = @LIB_IMDCT3DN@
87 LIB_IMDCTSSE = @LIB_IMDCTSSE@
89 LIB_LIBDVDCSS = @LIB_LIBDVDCSS@
90 LIB_MACOSX = @LIB_MACOSX@
92 LIB_MPEG_TS = @LIB_MPEG_TS@
93 LIB_NCURSES = @LIB_NCURSES@
99 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@
116 CFLAGS_XVIDEO = @CFLAGS_XVIDEO@
122 OBJ_LIBDVDCSS = @OBJ_LIBDVDCSS@
125 # Other special cases
127 NEED_GETOPT = @NEED_GETOPT@
128 NEED_LIBDVDCSS = @NEED_LIBDVDCSS@
130 ###############################################################################
131 # Configuration pre-processing
132 ###############################################################################
134 # PROGRAM_OPTIONS is an identification string of the compilation options
135 PROGRAM_OPTIONS = $(SYS) $(ARCH)
137 PROGRAM_OPTIONS += DEBUG
141 PROGRAM_OPTIONS += TRACE
145 PROGRAM_OPTIONS += CPROF
149 PROGRAM_OPTIONS += GPROF
153 # PROGRAM_BUILD is a complete identification of the build
154 # (we can't use fancy options with date since OSes like Solaris
155 # or FreeBSD have strange date implementations)
157 # XXX: beos does not support hostname (how lame...)
158 PROGRAM_BUILD = `date` $(USER)
160 PROGRAM_BUILD = `date` $(USER)@`hostname`
163 # PROGRAM_VERSION is the current vlc version
164 PROGRAM_VERSION=@VLC_VERSION@
165 LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
167 # DEFINE will contain some of the constants definitions decided in Makefile,
168 # including SYS_xx. It will be passed to C compiler.
169 DEFINE_CONSTANTS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
170 DEFINE += $(DEFINE_CONSTANTS)
172 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
173 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
176 DEFINE += -DLOCALEDIR=\"$(datadir)/locale\"
178 ###############################################################################
179 # Tuning and other variables - do not change anything except if you know
180 # exactly what you are doing
181 ###############################################################################
184 # C headers directories
187 INCLUDE += -Iinclude -Iextras
190 # Libraries needed by built-in modules
192 # Let's go for a crude hack !
193 LIB_MOTIONALTIVEC := $(LIB_ALTIVEC)
194 LIB_IDCTALTIVEC := $(LIB_ALTIVEC)
196 LIB_BUILTINS := $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
197 LIB += $(LIB_BUILTINS)
203 ifneq (,$(findstring mingw32,$(SYS)))
204 LIB += -lws2_32 -lnetapi32
210 # C compiler flags: mainstream compilation
213 CFLAGS += $(DEFINE) $(INCLUDE)
214 CFLAGS += -Wall -Winline
216 CFLAGS += -D_REENTRANT
217 CFLAGS += -D_GNU_SOURCE
223 # flags needed for clean beos compilation
225 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
228 ifneq (,$(findstring darwin,$(SYS)))
229 CFLAGS += -no-cpp-precomp
232 ifneq (,$(findstring mingw32,$(SYS)))
233 CFLAGS += -fnative-struct -D_OFF_T_ -D_off_t=long
236 ifneq (,$(findstring bsd,$(SYS)))
240 # Optimizations : don't compile debug versions with them
243 CFLAGS += -ffast-math -funroll-loops
247 CFLAGS += -fomit-frame-pointer
252 ifneq (,$(findstring powerpc,$(ARCH)))
253 # Optimizations for PowerPC
254 CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
256 CFLAGS += -mtune=$(TUNING)
259 ifneq (,$(findstring sparc,$(ARCH)))
260 # Optimizations for Sparc
261 CFLAGS += -mhard-float
263 CFLAGS += -mcpu=$(TUNING)
266 # Generic optimizations
268 CFLAGS += -mcpu=$(TUNING)
273 #end of optimisations
277 # C compiler flags: dependancies
279 DCFLAGS += $(INCLUDE)
283 # C compiler flags: linking
285 LCFLAGS += @LCFLAGS@ $(LIB)
294 ifneq (,$(findstring mingw32,$(SYS)))
295 LCFLAGS += -mwindows -Xlinker --force-exe-suffix
299 # C compiler and linker flags: setting soname
304 # C compiler flags: plugin compilation
306 ifneq (,$(findstring mingw32,$(SYS)))
307 PCFLAGS += -fnative-struct
313 # C compiler flags: plugin linking
315 PLCFLAGS += @PLCFLAGS@
318 # Debugging and profiling support
325 CFLAGS += -finstrument-functions