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
48 # Installation environment
50 exec_prefix = @exec_prefix@
57 # Libraries for special cases
61 LIB_DARWIN = @LIB_DARWIN@
64 LIB_GLIDE = @LIB_GLIDE@
65 LIB_GNOME = @LIB_GNOME@
67 LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@
68 LIB_MACOSX = @LIB_MACOSX@
69 LIB_NCURSES = @LIB_NCURSES@
74 LIB_XVIDEO = @LIB_XVIDEO@
78 # CFLAGS for special cases
80 CFLAGS_GTK = @CFLAGS_GTK@
81 CFLAGS_X11 = @CFLAGS_X11@
83 ###############################################################################
84 # Configuration pre-processing
85 ###############################################################################
87 # PROGRAM_OPTIONS is an identification string of the compilation options
88 PROGRAM_OPTIONS = $(SYS) $(ARCH)
90 PROGRAM_OPTIONS += DEBUG
94 PROGRAM_OPTIONS += TRACE
98 PROGRAM_OPTIONS += STATS
102 # PROGRAM_BUILD is a complete identification of the build
103 # (we can't use fancy options with date since OSes like Solaris
104 # or FreeBSD have strange date implementations)
106 # XXX: beos does not support hostname (how lame...)
107 PROGRAM_BUILD = `date` $(USER)
109 PROGRAM_BUILD = `date` $(USER)@`hostname`
112 # PROGRAM_VERSION is the current vlc version
113 PROGRAM_VERSION=@VLC_VERSION@
115 # DEFINE will contain some of the constants definitions decided in Makefile,
116 # including SYS_xx. It will be passed to C compiler.
117 DEFINE += -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
119 # On Linux activate 64-bit off_t (by default under BSD)
120 ifneq (,$(findstring linux,$(SYS)))
121 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
124 ###############################################################################
125 # Tuning and other variables - do not change anything except if you know
126 # exactly what you are doing
127 ###############################################################################
130 # C headers directories
133 INCLUDE += -Iinclude -Iextras -I/usr/local/include
138 LIB += @LIB@ -L/usr/local/lib
141 # Libraries needed by built-in modules
144 LIB += $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
148 # C compiler flags: mainstream compilation
151 CFLAGS += $(DEFINE) $(INCLUDE)
152 CFLAGS += -Wall -Winline
153 CFLAGS += -D_REENTRANT
154 CFLAGS += -D_GNU_SOURCE
156 # flags needed for clean beos compilation
158 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
161 ifneq (,$(findstring darwin,$(SYS)))
162 CFLAGS += -traditional-cpp
165 # Optimizations : don't compile debug versions with them
168 CFLAGS += -ffast-math -funroll-loops
170 CFLAGS += -fomit-frame-pointer
173 # Optimizations for x86 familiy
174 ifneq (,$(findstring 86,$(ARCH)))
175 # Optional Pentium Pro optimizations
176 ifneq (,$(findstring ppro,$(ARCH)))
177 CFLAGS += -march=pentiumpro -mcpu=pentiumpro
179 CFLAGS += -march=pentium -mcpu=pentium
183 # Optimizations for PowerPC
184 ifneq (,$(findstring powerpc,$(ARCH)))
185 CFLAGS += -mmultiple -mhard-float -mstring
188 # Optimizations for Sparc
189 ifneq (,$(findstring sparc,$(ARCH)))
190 CFLAGS += -mhard-float
193 #end of optimisations
196 # Optional MMX optimizations for x86
197 ifneq (,$(findstring mmx,$(ARCH)))
202 # C compiler flags: dependancies
204 DCFLAGS += $(INCLUDE)
208 # C compiler flags: linking
210 LCFLAGS += @LCFLAGS@ $(LIB)
215 LCFLAGS += -Xlinker -soname=_APP_
217 ifneq (,$(findstring qnx,$(SYS)))
218 LCFLAGS += -Xlinker -export-dynamic
220 ifneq (,$(findstring darwin,$(SYS)))
223 LCFLAGS += --export-dynamic
229 # Debugging and profiling support