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
51 # Installation environment
53 exec_prefix = @exec_prefix@
60 # Libraries for special cases
64 LIB_DARWIN = @LIB_DARWIN@
67 LIB_GLIDE = @LIB_GLIDE@
68 LIB_GNOME = @LIB_GNOME@
70 LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@
71 LIB_MACOSX = @LIB_MACOSX@
72 LIB_NCURSES = @LIB_NCURSES@
77 LIB_XVIDEO = @LIB_XVIDEO@
81 # CFLAGS for special cases
83 CFLAGS_GTK = @CFLAGS_GTK@
84 CFLAGS_X11 = @CFLAGS_X11@
86 ###############################################################################
87 # Configuration pre-processing
88 ###############################################################################
90 # PROGRAM_OPTIONS is an identification string of the compilation options
91 PROGRAM_OPTIONS = $(SYS) $(ARCH)
93 PROGRAM_OPTIONS += DEBUG
97 PROGRAM_OPTIONS += TRACE
101 PROGRAM_OPTIONS += STATS
105 # PROGRAM_BUILD is a complete identification of the build
106 # (we can't use fancy options with date since OSes like Solaris
107 # or FreeBSD have strange date implementations)
109 # XXX: beos does not support hostname (how lame...)
110 PROGRAM_BUILD = `date` $(USER)
112 PROGRAM_BUILD = `date` $(USER)@`hostname`
115 # PROGRAM_VERSION is the current vlc version
116 PROGRAM_VERSION=@VLC_VERSION@
118 # DEFINE will contain some of the constants definitions decided in Makefile,
119 # including SYS_xx. It will be passed to C compiler.
120 DEFINE += -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
122 # On Linux activate 64-bit off_t (by default under BSD)
123 ifneq (,$(findstring linux,$(SYS)))
124 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
127 ###############################################################################
128 # Tuning and other variables - do not change anything except if you know
129 # exactly what you are doing
130 ###############################################################################
133 # C headers directories
136 INCLUDE += -Iinclude -Iextras -I/usr/local/include
141 LIB += @LIB@ -L/usr/local/lib
143 ifneq (,$(findstring mingw32,$(SYS)))
148 # Libraries needed by built-in modules
151 LIB += $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
155 # C compiler flags: mainstream compilation
158 CFLAGS += $(DEFINE) $(INCLUDE)
159 CFLAGS += -Wall -Winline
160 CFLAGS += -D_REENTRANT
161 CFLAGS += -D_GNU_SOURCE
163 # flags needed for clean beos compilation
165 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
168 ifneq (,$(findstring darwin,$(SYS)))
169 CFLAGS += -traditional-cpp
172 # Optimizations : don't compile debug versions with them
175 CFLAGS += -ffast-math -funroll-loops
177 CFLAGS += -fomit-frame-pointer
180 # Optimizations for x86 familiy
181 ifneq (,$(findstring 86,$(ARCH)))
182 # Optional Pentium Pro optimizations
183 ifneq (,$(findstring ppro,$(ARCH)))
184 CFLAGS += -march=pentiumpro -mcpu=pentiumpro
186 CFLAGS += -march=pentium -mcpu=pentium
190 # Optimizations for PowerPC
191 ifneq (,$(findstring powerpc,$(ARCH)))
192 CFLAGS += -mmultiple -mhard-float -mstring
195 # Optimizations for Sparc
196 ifneq (,$(findstring sparc,$(ARCH)))
197 CFLAGS += -mhard-float
200 #end of optimisations
204 # C compiler flags: dependancies
206 DCFLAGS += $(INCLUDE)
210 # C compiler flags: linking
212 LCFLAGS += @LCFLAGS@ $(LIB)
217 LCFLAGS += -Xlinker -soname=_APP_
219 ifneq (,$(findstring qnx,$(SYS)))
220 LCFLAGS += -Xlinker -export-dynamic
222 ifneq (,$(findstring darwin,$(SYS)))
225 LCFLAGS += --export-dynamic
231 # Debugging and profiling support