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@
76 LIB_DIRECTX = @LIB_DIRECTX@
78 LIB_XVIDEO = @LIB_XVIDEO@
82 # CFLAGS for special cases
84 CFLAGS_GTK = @CFLAGS_GTK@
85 CFLAGS_SDL = @CFLAGS_SDL@
86 CFLAGS_X11 = @CFLAGS_X11@
88 ###############################################################################
89 # Configuration pre-processing
90 ###############################################################################
92 # PROGRAM_OPTIONS is an identification string of the compilation options
93 PROGRAM_OPTIONS = $(SYS) $(ARCH)
95 PROGRAM_OPTIONS += DEBUG
99 PROGRAM_OPTIONS += TRACE
103 PROGRAM_OPTIONS += STATS
107 # PROGRAM_BUILD is a complete identification of the build
108 # (we can't use fancy options with date since OSes like Solaris
109 # or FreeBSD have strange date implementations)
111 # XXX: beos does not support hostname (how lame...)
112 PROGRAM_BUILD = `date` $(USER)
114 PROGRAM_BUILD = `date` $(USER)@`hostname`
117 # PROGRAM_VERSION is the current vlc version
118 PROGRAM_VERSION=@VLC_VERSION@
120 # DEFINE will contain some of the constants definitions decided in Makefile,
121 # including SYS_xx. It will be passed to C compiler.
122 DEFINE_CONSTANTS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
123 DEFINE += $(DEFINE_CONSTANTS)
125 # On Linux activate 64-bit off_t (by default under BSD)
126 ifneq (,$(findstring linux,$(SYS)))
127 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
130 ###############################################################################
131 # Tuning and other variables - do not change anything except if you know
132 # exactly what you are doing
133 ###############################################################################
136 # C headers directories
139 INCLUDE += -Iinclude -Iextras -I/usr/local/include
144 LIB += @LIB@ -L/usr/local/lib
146 ifneq (,$(findstring mingw32,$(SYS)))
147 LIB += -lws2_32 -lnetapi32
151 # Libraries needed by built-in modules
154 LIB_BUILTINS := $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
155 LIB += $(LIB_BUILTINS)
159 # C compiler flags: mainstream compilation
162 CFLAGS += $(DEFINE) $(INCLUDE)
163 CFLAGS += -Wall -Winline
164 CFLAGS += -D_REENTRANT
165 CFLAGS += -D_GNU_SOURCE
167 # flags needed for clean beos compilation
169 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
172 ifneq (,$(findstring darwin,$(SYS)))
173 CFLAGS += -traditional-cpp
176 ifneq (,$(findstring mingw32,$(SYS)))
177 CFLAGS += -fnative-struct
180 # Optimizations : don't compile debug versions with them
183 CFLAGS += -ffast-math -funroll-loops
185 CFLAGS += -fomit-frame-pointer
188 # Optimizations for x86 familiy
189 ifneq (,$(findstring 86,$(ARCH)))
190 # Optional Pentium Pro optimizations
191 ifneq (,$(findstring ppro,$(ARCH)))
192 CFLAGS += -march=pentiumpro -mcpu=pentiumpro
194 CFLAGS += -march=pentium -mcpu=pentium
198 # Optimizations for PowerPC
199 ifneq (,$(findstring powerpc,$(ARCH)))
200 CFLAGS += -mmultiple -mhard-float -mstring
203 # Optimizations for Sparc
204 ifneq (,$(findstring sparc,$(ARCH)))
205 CFLAGS += -mhard-float
208 #end of optimisations
212 # C compiler flags: dependancies
214 DCFLAGS += $(INCLUDE)
218 # C compiler flags: linking
220 LCFLAGS += @LCFLAGS@ $(LIB)
223 ifneq (,$(findstring mingw32,$(SYS)))
224 LCFLAGS += -Xlinker --force-exe-suffix
228 # C compiler flags: plugin compilation
230 ifneq (,$(findstring mingw32,$(SYS)))
231 PCFLAGS += -fPIC -fnative-struct
237 # C compiler flags: plugin linking
239 PLCFLAGS += @PLCFLAGS@
242 # Debugging and profiling support