1 ###############################################################################
2 # vlc (VideoLAN Client) options Makefile
4 ###############################################################################
6 ###############################################################################
8 ###############################################################################
12 # WARNING: if you do not have a dynamic loader on your platform, remove
13 # the plugins in this line and put them as built-ins, otherwise your
14 # application won't be able to load them.
19 # Built-in modules to build
20 # WARNING: do NOT put gtk and gnome together in this rule.
25 # Additional build options
50 # Installation environment
52 exec_prefix = @exec_prefix@
59 # Libraries for special cases
63 LIB_DARWIN = @LIB_DARWIN@
66 LIB_GLIDE = @LIB_GLIDE@
67 LIB_GNOME = @LIB_GNOME@
69 LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@
70 LIB_MACOSX = @LIB_MACOSX@
71 LIB_NCURSES = @LIB_NCURSES@
76 LIB_XVIDEO = @LIB_XVIDEO@
80 # CFLAGS for special cases
82 CFLAGS_GTK = @CFLAGS_GTK@
83 CFLAGS_X11 = @CFLAGS_X11@
85 ###############################################################################
86 # Configuration pre-processing
87 ###############################################################################
89 # PROGRAM_OPTIONS is an identification string of the compilation options
90 PROGRAM_OPTIONS = $(SYS) $(ARCH)
92 PROGRAM_OPTIONS += DEBUG
96 PROGRAM_OPTIONS += TRACE
100 PROGRAM_OPTIONS += STATS
104 # PROGRAM_BUILD is a complete identification of the build
105 # (we can't use fancy options with date since OSes like Solaris
106 # or FreeBSD have strange date implementations)
108 # XXX: beos does not support hostname (how lame...)
109 PROGRAM_BUILD = `date` $(USER)
111 PROGRAM_BUILD = `date` $(USER)@`hostname`
114 # PROGRAM_VERSION is the current vlc version
115 PROGRAM_VERSION=@VLC_VERSION@
117 # DEFINE will contain some of the constants definitions decided in Makefile,
118 # including SYS_xx. It will be passed to C compiler.
119 DEFINE += -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
121 # On Linux activate 64-bit off_t (by default under BSD)
122 ifneq (,$(findstring linux,$(SYS)))
123 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
126 ###############################################################################
127 # Tuning and other variables - do not change anything except if you know
128 # exactly what you are doing
129 ###############################################################################
132 # C headers directories
135 INCLUDE += -Iinclude -Iextras -I/usr/local/include
140 LIB += @LIB@ -L/usr/local/lib
142 ifneq (,$(findstring mingw32,$(SYS)))
147 # Libraries needed by built-in modules
150 LIB += $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
154 # C compiler flags: mainstream compilation
157 CFLAGS += $(DEFINE) $(INCLUDE)
158 CFLAGS += -Wall -Winline
159 CFLAGS += -D_REENTRANT
160 CFLAGS += -D_GNU_SOURCE
162 # flags needed for clean beos compilation
164 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
167 ifneq (,$(findstring darwin,$(SYS)))
168 CFLAGS += -traditional-cpp
171 # Optimizations : don't compile debug versions with them
174 CFLAGS += -ffast-math -funroll-loops
176 CFLAGS += -fomit-frame-pointer
179 # Optimizations for x86 familiy
180 ifneq (,$(findstring 86,$(ARCH)))
181 # Optional Pentium Pro optimizations
182 ifneq (,$(findstring ppro,$(ARCH)))
183 CFLAGS += -march=pentiumpro -mcpu=pentiumpro
185 CFLAGS += -march=pentium -mcpu=pentium
189 # Optimizations for PowerPC
190 ifneq (,$(findstring powerpc,$(ARCH)))
191 CFLAGS += -mmultiple -mhard-float -mstring
194 # Optimizations for Sparc
195 ifneq (,$(findstring sparc,$(ARCH)))
196 CFLAGS += -mhard-float
199 #end of optimisations
202 # Optional MMX optimizations for x86
203 ifneq (,$(findstring mmx,$(ARCH)))
208 # C compiler flags: dependancies
210 DCFLAGS += $(INCLUDE)
214 # C compiler flags: linking
216 LCFLAGS += @LCFLAGS@ $(LIB)
221 LCFLAGS += -Xlinker -soname=_APP_
223 ifneq (,$(findstring qnx,$(SYS)))
224 LCFLAGS += -Xlinker -export-dynamic
226 ifneq (,$(findstring darwin,$(SYS)))
229 LCFLAGS += --export-dynamic
235 # Debugging and profiling support