1 ###############################################################################
2 # vlc (VideoLAN Client) options Makefile
4 ###############################################################################
6 ###############################################################################
8 ###############################################################################
19 BUILTINS := @BUILTINS@
33 # Installation environment
35 exec_prefix = @exec_prefix@
42 # Libraries for special cases
46 LIB_DARWIN = @LIB_DARWIN@
49 LIB_GLIDE = @LIB_GLIDE@
50 LIB_GNOME = @LIB_GNOME@
52 LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@
53 LIB_MACOSX = @LIB_MACOSX@
54 LIB_NCURSES = @LIB_NCURSES@
59 LIB_XVIDEO = @LIB_XVIDEO@
62 ###############################################################################
63 # Configuration pre-processing
64 ###############################################################################
66 # PROGRAM_OPTIONS is an identification string of the compilation options
67 PROGRAM_OPTIONS = $(SYS) $(ARCH)
69 PROGRAM_OPTIONS += DEBUG
73 PROGRAM_OPTIONS += DEBUG
77 # PROGRAM_BUILD is a complete identification of the build
78 # (we can't use fancy options with date since OSes like Solaris
79 # or FreeBSD have strange date implementations)
81 # XXX: beos does not support hostname (how lame...)
82 PROGRAM_BUILD = `date` $(USER)
84 PROGRAM_BUILD = `date` $(USER)@`hostname`
87 # PROGRAM_VERSION is the current vlc version
88 PROGRAM_VERSION=@VLC_VERSION@
90 # DEFINE will contain some of the constants definitions decided in Makefile,
91 # including SYS_xx. It will be passed to C compiler.
92 DEFINE += -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
94 # On Linux activate 64-bit off_t (by default under BSD)
95 ifneq (,$(findstring linux,$(SYS)))
96 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
99 ###############################################################################
100 # Tuning and other variables - do not change anything except if you know
101 # exactly what you are doing
102 ###############################################################################
105 # C headers directories
108 INCLUDE += -Iinclude -Iextras -I/usr/local/include
113 LIB += @LIB@ -L/usr/local/lib
116 # Libraries needed by built-in modules
118 LIB += $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
121 # C compiler flags: mainstream compilation
123 CFLAGS += $(DEFINE) $(INCLUDE)
124 CFLAGS += -Wall -Winline
125 CFLAGS += -D_REENTRANT
126 CFLAGS += -D_GNU_SOURCE
128 # flags needed for clean beos compilation
130 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
133 ifneq (,$(findstring darwin,$(SYS)))
134 CFLAGS += -traditional-cpp
137 # Optimizations : don't compile debug versions with them
140 CFLAGS += -ffast-math -funroll-loops
141 CFLAGS += -fomit-frame-pointer
143 # Optimizations for x86 familiy
144 ifneq (,$(findstring 86,$(ARCH)))
145 # Optional Pentium Pro optimizations
146 ifneq (,$(findstring ppro,$(ARCH)))
147 CFLAGS += -march=pentiumpro -mcpu=pentiumpro
149 CFLAGS += -march=pentium -mcpu=pentium
153 # Optimizations for PowerPC
154 ifneq (,$(findstring powerpc,$(ARCH)))
155 CFLAGS += -mmultiple -mhard-float -mstring
158 # Optimizations for Sparc
159 ifneq (,$(findstring sparc,$(ARCH)))
160 CFLAGS += -mhard-float
163 #end of optimisations
166 # Optional MMX optimizations for x86
167 ifneq (,$(findstring mmx,$(ARCH)))
172 # C compiler flags: dependancies
174 DCFLAGS += $(INCLUDE)
178 # C compiler flags: linking
180 LCFLAGS += @LCFLAGS@ $(LIB)
185 LCFLAGS += -Xlinker -soname=_APP_
187 ifneq (,$(findstring qnx,$(SYS)))
188 LCFLAGS += -Xlinker -export-dynamic
190 ifneq (,$(findstring darwin,$(SYS)))
193 LCFLAGS += --export-dynamic
199 # Debugging and profiling support (unless optimisations are active)