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.
22 BUILTINS := @BUILTINS@
25 # Additional build options
47 # Installation environment
49 exec_prefix = @exec_prefix@
56 # Libraries for special cases
60 LIB_DARWIN = @LIB_DARWIN@
63 LIB_GLIDE = @LIB_GLIDE@
64 LIB_GNOME = @LIB_GNOME@
66 LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@
67 LIB_MACOSX = @LIB_MACOSX@
68 LIB_NCURSES = @LIB_NCURSES@
73 LIB_XVIDEO = @LIB_XVIDEO@
77 # CFLAGS for special cases
79 CFLAGS_GTK = @CFLAGS_GTK@
80 CFLAGS_X11 = @CFLAGS_X11@
82 ###############################################################################
83 # Configuration pre-processing
84 ###############################################################################
86 # PROGRAM_OPTIONS is an identification string of the compilation options
87 PROGRAM_OPTIONS = $(SYS) $(ARCH)
89 PROGRAM_OPTIONS += DEBUG
93 PROGRAM_OPTIONS += DEBUG
97 # PROGRAM_BUILD is a complete identification of the build
98 # (we can't use fancy options with date since OSes like Solaris
99 # or FreeBSD have strange date implementations)
101 # XXX: beos does not support hostname (how lame...)
102 PROGRAM_BUILD = `date` $(USER)
104 PROGRAM_BUILD = `date` $(USER)@`hostname`
107 # PROGRAM_VERSION is the current vlc version
108 PROGRAM_VERSION=@VLC_VERSION@
110 # DEFINE will contain some of the constants definitions decided in Makefile,
111 # including SYS_xx. It will be passed to C compiler.
112 DEFINE += -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
114 # On Linux activate 64-bit off_t (by default under BSD)
115 ifneq (,$(findstring linux,$(SYS)))
116 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
119 ###############################################################################
120 # Tuning and other variables - do not change anything except if you know
121 # exactly what you are doing
122 ###############################################################################
125 # C headers directories
128 INCLUDE += -Iinclude -Iextras -I/usr/local/include
133 LIB += @LIB@ -L/usr/local/lib
136 # Libraries needed by built-in modules
139 LIB += $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
143 # C compiler flags: mainstream compilation
146 CFLAGS += $(DEFINE) $(INCLUDE)
147 CFLAGS += -Wall -Winline
148 CFLAGS += -D_REENTRANT
149 CFLAGS += -D_GNU_SOURCE
151 # flags needed for clean beos compilation
153 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
156 ifneq (,$(findstring darwin,$(SYS)))
157 CFLAGS += -traditional-cpp
160 # Optimizations : don't compile debug versions with them
163 CFLAGS += -ffast-math -funroll-loops
164 CFLAGS += -fomit-frame-pointer
166 # Optimizations for x86 familiy
167 ifneq (,$(findstring 86,$(ARCH)))
168 # Optional Pentium Pro optimizations
169 ifneq (,$(findstring ppro,$(ARCH)))
170 CFLAGS += -march=pentiumpro -mcpu=pentiumpro
172 CFLAGS += -march=pentium -mcpu=pentium
176 # Optimizations for PowerPC
177 ifneq (,$(findstring powerpc,$(ARCH)))
178 CFLAGS += -mmultiple -mhard-float -mstring
181 # Optimizations for Sparc
182 ifneq (,$(findstring sparc,$(ARCH)))
183 CFLAGS += -mhard-float
186 #end of optimisations
189 # Optional MMX optimizations for x86
190 ifneq (,$(findstring mmx,$(ARCH)))
195 # C compiler flags: dependancies
197 DCFLAGS += $(INCLUDE)
201 # C compiler flags: linking
203 LCFLAGS += @LCFLAGS@ $(LIB)
208 LCFLAGS += -Xlinker -soname=_APP_
210 ifneq (,$(findstring qnx,$(SYS)))
211 LCFLAGS += -Xlinker -export-dynamic
213 ifneq (,$(findstring darwin,$(SYS)))
216 LCFLAGS += --export-dynamic
222 # Debugging and profiling support (unless optimisations are active)