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_X11 = @CFLAGS_X11@
87 ###############################################################################
88 # Configuration pre-processing
89 ###############################################################################
91 # PROGRAM_OPTIONS is an identification string of the compilation options
92 PROGRAM_OPTIONS = $(SYS) $(ARCH)
94 PROGRAM_OPTIONS += DEBUG
98 PROGRAM_OPTIONS += TRACE
102 PROGRAM_OPTIONS += STATS
106 # PROGRAM_BUILD is a complete identification of the build
107 # (we can't use fancy options with date since OSes like Solaris
108 # or FreeBSD have strange date implementations)
110 # XXX: beos does not support hostname (how lame...)
111 PROGRAM_BUILD = `date` $(USER)
113 PROGRAM_BUILD = `date` $(USER)@`hostname`
116 # PROGRAM_VERSION is the current vlc version
117 PROGRAM_VERSION=@VLC_VERSION@
119 # DEFINE will contain some of the constants definitions decided in Makefile,
120 # including SYS_xx. It will be passed to C compiler.
121 DEFINE += -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
123 # On Linux activate 64-bit off_t (by default under BSD)
124 ifneq (,$(findstring linux,$(SYS)))
125 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
128 ###############################################################################
129 # Tuning and other variables - do not change anything except if you know
130 # exactly what you are doing
131 ###############################################################################
134 # C headers directories
137 INCLUDE += -Iinclude -Iextras -I/usr/local/include
142 LIB += @LIB@ -L/usr/local/lib
144 ifneq (,$(findstring mingw32,$(SYS)))
145 LIB += -lws2_32 -lnetapi32
149 # Libraries needed by built-in modules
152 LIB += $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
156 # C compiler flags: mainstream compilation
159 CFLAGS += $(DEFINE) $(INCLUDE)
160 CFLAGS += -Wall -Winline
161 CFLAGS += -D_REENTRANT
162 CFLAGS += -D_GNU_SOURCE
164 # flags needed for clean beos compilation
166 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
169 ifneq (,$(findstring darwin,$(SYS)))
170 CFLAGS += -traditional-cpp
173 # Optimizations : don't compile debug versions with them
176 CFLAGS += -ffast-math -funroll-loops
178 CFLAGS += -fomit-frame-pointer
181 # Optimizations for x86 familiy
182 ifneq (,$(findstring 86,$(ARCH)))
183 # Optional Pentium Pro optimizations
184 ifneq (,$(findstring ppro,$(ARCH)))
185 CFLAGS += -march=pentiumpro -mcpu=pentiumpro
187 CFLAGS += -march=pentium -mcpu=pentium
191 # Optimizations for PowerPC
192 ifneq (,$(findstring powerpc,$(ARCH)))
193 CFLAGS += -mmultiple -mhard-float -mstring
196 # Optimizations for Sparc
197 ifneq (,$(findstring sparc,$(ARCH)))
198 CFLAGS += -mhard-float
201 #end of optimisations
205 # C compiler flags: dependancies
207 DCFLAGS += $(INCLUDE)
211 # C compiler flags: linking
213 LCFLAGS += @LCFLAGS@ $(LIB)
216 ifneq (,$(findstring mingw32,$(SYS)))
217 LCFLAGS += -Xlinker --force-exe-suffix
221 # Debugging and profiling support