* FreeBSD CSS decryption support.
[vlc.git] / Makefile.opts.in
blobeb4d17dadde8dbed344ca188a0b6fe0e5d8f872e
1 ###############################################################################
2 # vlc (VideoLAN Client) options Makefile
3 # (c)1998 VideoLAN
4 ###############################################################################
6 ###############################################################################
7 # Configuration
8 ###############################################################################
10
11 # Plugins to build
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.
15
16 PLUGINS :=@PLUGINS@
18
19 # Built-in modules to build
20 # WARNING: do NOT put gtk and gnome together in this rule.
21
22 BUILTINS :=@BUILTINS@
24
25 # Additional build options
26
27 SYS = @SYS@
28 ALIASES =@ALIASES@
29 INSTALL = @INSTALL@
30 ARCH = @ARCH@
33 # Compilation options
35 DEBUG = @DEBUG@
36 STATS = @STATS@
37 TRACE = @TRACE@
38 OPTIMS = @OPTIMS@
39 GETOPT = @GETOPT@
41
42 # Build environment
43
44 CC = @CC@
45 CFLAGS = @CFLAGS@
46 SHELL = @SHELL@
47 RANLIB = @RANLIB@
48 MOC = @MOC@
50
51 # Installation environment
52
53 exec_prefix = @exec_prefix@
54 prefix = @prefix@
55 bindir = @bindir@
56 datadir = @datadir@
57 libdir = @libdir@
60 # Libraries for special cases
62 LIB_ALSA = @LIB_ALSA@
63 LIB_BEOS = @LIB_BEOS@
64 LIB_DARWIN = @LIB_DARWIN@
65 LIB_ESD = @LIB_ESD@
66 LIB_GGI = @LIB_GGI@
67 LIB_GLIDE = @LIB_GLIDE@
68 LIB_GNOME = @LIB_GNOME@
69 LIB_GTK = @LIB_GTK@
70 LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@
71 LIB_MACOSX = @LIB_MACOSX@
72 LIB_NCURSES = @LIB_NCURSES@
73 LIB_QT = @LIB_QT@
74 LIB_TS = @LIB_TS@
75 LIB_SDL = @LIB_SDL@
76 LIB_X11 = @LIB_X11@
77 LIB_XVIDEO = @LIB_XVIDEO@
78 LIB_YUV = @LIB_YUV@
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)
92 ifeq ($(DEBUG),1)
93 PROGRAM_OPTIONS += DEBUG
94 DEFINE += -DDEBUG
95 endif
96 ifeq ($(TRACE),1)
97 PROGRAM_OPTIONS += TRACE
98 DEFINE += -DTRACE
99 endif
100 ifeq ($(STATS),1)
101 PROGRAM_OPTIONS += STATS
102 DEFINE += -DSTATS
103 endif
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)
108 ifeq ($(SYS),beos)
109 # XXX: beos does not support hostname (how lame...)
110 PROGRAM_BUILD = `date` $(USER)
111 else
112 PROGRAM_BUILD = `date` $(USER)@`hostname`
113 endif
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
125 endif
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
135 INCLUDE += @INCLUDE@
136 INCLUDE += -Iinclude -Iextras -I/usr/local/include
139 # Libraries
141 LIB += @LIB@ -L/usr/local/lib
143 ifneq (,$(findstring mingw32,$(SYS)))
144 LIB += -lws2_32
145 endif
148 # Libraries needed by built-in modules
150 ifneq (,$(BUILTINS))
151 LIB += $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
152 endif
155 # C compiler flags: mainstream compilation
157 DEFINE += @DEFINE@
158 CFLAGS += $(DEFINE) $(INCLUDE)
159 CFLAGS += -Wall -Winline
160 CFLAGS += -D_REENTRANT
161 CFLAGS += -D_GNU_SOURCE
163 # flags needed for clean beos compilation
164 ifeq ($(SYS),beos)
165 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
166 endif
168 ifneq (,$(findstring darwin,$(SYS)))
169 CFLAGS += -traditional-cpp
170 endif
172 # Optimizations : don't compile debug versions with them
173 ifeq ($(OPTIMS),1)
174 CFLAGS += -O3
175 CFLAGS += -ffast-math -funroll-loops
176 ifneq ($(DEBUG),1)
177 CFLAGS += -fomit-frame-pointer
178 endif
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
185 else
186 CFLAGS += -march=pentium -mcpu=pentium
187 endif
188 endif
190 # Optimizations for PowerPC
191 ifneq (,$(findstring powerpc,$(ARCH)))
192 CFLAGS += -mmultiple -mhard-float -mstring
193 endif
195 # Optimizations for Sparc
196 ifneq (,$(findstring sparc,$(ARCH)))
197 CFLAGS += -mhard-float
198 endif
200 #end of optimisations
201 endif
203 # Optional MMX optimizations for x86
204 ifneq (,$(findstring mmx,$(ARCH)))
205 CFLAGS += -DHAVE_MMX
206 endif
209 # C compiler flags: dependancies
211 DCFLAGS += $(INCLUDE)
212 DCFLAGS += -MM
215 # C compiler flags: linking
217 LCFLAGS += @LCFLAGS@ $(LIB)
218 LCFLAGS += -Wall
219 #LCFLAGS += -s
221 ifeq ($(SYS),beos)
222 LCFLAGS += -Xlinker -soname=_APP_
223 else
224 ifneq (,$(findstring qnx,$(SYS)))
225 LCFLAGS += -Xlinker -export-dynamic
226 else
227 ifneq (,$(findstring darwin,$(SYS)))
228 LCFLAGS += -dyn
229 else
230 LCFLAGS += --export-dynamic
231 endif
232 endif
233 endif
236 # Debugging and profiling support
238 ifeq ($(DEBUG),1)
239 CFLAGS += -g
240 endif