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
55 # Installation environment
57 exec_prefix = @exec_prefix@
62 includedir = @includedir@
65 # Libraries for special cases
68 LIB_ALTIVEC = @LIB_ALTIVEC@
70 LIB_DARWIN = @LIB_DARWIN@
72 LIB_DVD_PLUGIN = @LIB_DVD_PLUGIN@
75 LIB_GLIDE = @LIB_GLIDE@
76 LIB_GNOME = @LIB_GNOME@
78 LIB_LIBDVDCSS = @LIB_LIBDVDCSS@
80 LIB_MACOSX = @LIB_MACOSX@
82 LIB_NCURSES = @LIB_NCURSES@
86 LIB_DIRECTX = @LIB_DIRECTX@
88 LIB_XVIDEO = @LIB_XVIDEO@
92 # CFLAGS for special cases
94 CFLAGS_ALTIVEC = @CFLAGS_ALTIVEC@
95 CFLAGS_DVD = @CFLAGS_DVD@
96 CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
97 CFLAGS_GTK = @CFLAGS_GTK@
98 CFLAGS_SDL = @CFLAGS_SDL@
99 CFLAGS_X11 = @CFLAGS_X11@
105 OBJ_LIBDVDCSS = @OBJ_LIBDVDCSS@
108 # Other special cases
110 NEED_GETOPT = @NEED_GETOPT@
111 NEED_LIBDVDCSS = @NEED_LIBDVDCSS@
113 ###############################################################################
114 # Configuration pre-processing
115 ###############################################################################
117 # PROGRAM_OPTIONS is an identification string of the compilation options
118 PROGRAM_OPTIONS = $(SYS) $(ARCH)
120 PROGRAM_OPTIONS += DEBUG
124 PROGRAM_OPTIONS += TRACE
128 PROGRAM_OPTIONS += CPROF
132 PROGRAM_OPTIONS += GPROF
136 # PROGRAM_BUILD is a complete identification of the build
137 # (we can't use fancy options with date since OSes like Solaris
138 # or FreeBSD have strange date implementations)
140 # XXX: beos does not support hostname (how lame...)
141 PROGRAM_BUILD = `date` $(USER)
143 PROGRAM_BUILD = `date` $(USER)@`hostname`
146 # PROGRAM_VERSION is the current vlc version
147 PROGRAM_VERSION=@VLC_VERSION@
148 LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
150 # DEFINE will contain some of the constants definitions decided in Makefile,
151 # including SYS_xx. It will be passed to C compiler.
152 DEFINE_CONSTANTS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
153 DEFINE += $(DEFINE_CONSTANTS)
155 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
156 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
158 ###############################################################################
159 # Tuning and other variables - do not change anything except if you know
160 # exactly what you are doing
161 ###############################################################################
164 # C headers directories
167 INCLUDE += -Iinclude -Iextras
170 # Libraries needed by built-in modules
172 # Let's go for a crude hack !
173 LIB_MOTIONALTIVEC := $(LIB_ALTIVEC)
174 LIB_IDCTALTIVEC := $(LIB_ALTIVEC)
176 LIB_BUILTINS := $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
177 LIB += $(LIB_BUILTINS)
183 ifneq (,$(findstring mingw32,$(SYS)))
184 LIB += -lws2_32 -lnetapi32
190 # C compiler flags: mainstream compilation
193 CFLAGS += $(DEFINE) $(INCLUDE)
194 CFLAGS += -Wall -Winline
196 CFLAGS += -D_REENTRANT
197 CFLAGS += -D_GNU_SOURCE
199 # flags needed for clean beos compilation
201 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
204 ifneq (,$(findstring darwin,$(SYS)))
205 CFLAGS += -no-cpp-precomp
208 ifneq (,$(findstring mingw32,$(SYS)))
209 CFLAGS += -fnative-struct -D_OFF_T_ -D_off_t=long
212 ifneq (,$(findstring bsd,$(SYS)))
216 # Optimizations : don't compile debug versions with them
219 CFLAGS += -ffast-math -funroll-loops
223 CFLAGS += -fomit-frame-pointer
228 ifneq (,$(findstring powerpc,$(ARCH)))
229 # Optimizations for PowerPC
230 CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
232 CFLAGS += -mtune=$(TUNING)
235 ifneq (,$(findstring sparc,$(ARCH)))
236 # Optimizations for Sparc
237 CFLAGS += -mhard-float
239 CFLAGS += -mcpu=$(TUNING)
242 # Generic optimizations
244 CFLAGS += -mcpu=$(TUNING)
249 #end of optimisations
253 # C compiler flags: dependancies
255 DCFLAGS += $(INCLUDE)
259 # C compiler flags: linking
261 LCFLAGS += @LCFLAGS@ $(LIB)
270 ifneq (,$(findstring mingw32,$(SYS)))
271 LCFLAGS += -mwindows -Xlinker --force-exe-suffix
275 # C compiler and linker flags: setting soname
280 # C compiler flags: plugin compilation
282 ifneq (,$(findstring mingw32,$(SYS)))
283 PCFLAGS += -fnative-struct
289 # C compiler flags: plugin linking
291 PLCFLAGS += @PLCFLAGS@
294 # Debugging and profiling support
301 CFLAGS += -finstrument-functions