]> git.sesse.net Git - vlc/blob - Makefile.opts.in
Moved video parser into video decoder.
[vlc] / Makefile.opts.in
1 ###############################################################################
2 # vlc (VideoLAN Client) options Makefile
3 # (c)1998 VideoLAN
4 ###############################################################################
5
6 ###############################################################################
7 # Configuration
8 ###############################################################################
9
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@
17
18
19 # Built-in modules to build
20 # WARNING: do NOT put gtk and gnome together in this rule.
21
22 BUILTINS :=@BUILTINS@
23
24
25 # Additional build options
26
27 SYS = @SYS@
28 ALIASES =@ALIASES@
29 INSTALL = @INSTALL@
30 ARCH = @ARCH@
31
32 #
33 # Compilation options
34 #
35 DEBUG = @DEBUG@
36 STATS = @STATS@
37 TRACE = @TRACE@
38 PROFILING = @PROFILING@
39 OPTIMS = @OPTIMS@
40 GETOPT = @GETOPT@
41
42
43 # Build environment
44
45 CC = @CC@
46 CFLAGS = @CFLAGS@
47 SHELL = @SHELL@
48 RANLIB = @RANLIB@
49 WINDRES = @WINDRES@
50 MOC = @MOC@
51
52
53 # Installation environment
54
55 exec_prefix = @exec_prefix@
56 prefix = @prefix@
57 bindir = @bindir@
58 datadir = @datadir@
59 libdir = @libdir@
60 includedir = @includedir@
61
62 #
63 # Libraries for special cases
64 #
65 LIB_ALSA = @LIB_ALSA@
66 LIB_BEOS = @LIB_BEOS@
67 LIB_DARWIN = @LIB_DARWIN@
68 LIB_DVD = @LIB_DVD@
69 LIB_ESD = @LIB_ESD@
70 LIB_GGI = @LIB_GGI@
71 LIB_GLIDE = @LIB_GLIDE@
72 LIB_GNOME = @LIB_GNOME@
73 LIB_GTK = @LIB_GTK@
74 LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@
75 LIB_KDE = @LIB_KDE@
76 LIB_MACOSX = @LIB_MACOSX@
77 LIB_NCURSES = @LIB_NCURSES@
78 LIB_QT = @LIB_QT@
79 LIB_TS = @LIB_TS@
80 LIB_SDL = @LIB_SDL@
81 LIB_DIRECTX = @LIB_DIRECTX@
82 LIB_X11 = @LIB_X11@
83 LIB_XVIDEO = @LIB_XVIDEO@
84 LIB_YUV = @LIB_YUV@
85
86 #
87 # CFLAGS for special cases
88 #
89 CFLAGS_DVD = @CFLAGS_DVD@
90 CFLAGS_GTK = @CFLAGS_GTK@
91 CFLAGS_SDL = @CFLAGS_SDL@
92 CFLAGS_X11 = @CFLAGS_X11@
93
94 #
95 # Other special cases
96 #
97 LOCAL_LIBDVDCSS = @LOCAL_LIBDVDCSS@
98
99 ###############################################################################
100 # Configuration pre-processing
101 ###############################################################################
102
103 # PROGRAM_OPTIONS is an identification string of the compilation options
104 PROGRAM_OPTIONS = $(SYS) $(ARCH)
105 ifeq ($(DEBUG),1)
106 PROGRAM_OPTIONS += DEBUG
107 DEFINE += -DDEBUG
108 endif
109 ifeq ($(TRACE),1)
110 PROGRAM_OPTIONS += TRACE
111 DEFINE += -DTRACE
112 endif
113 ifeq ($(PROFILING),1)
114 PROGRAM_OPTIONS += PROFILING
115 DEFINE += -DPROFILING
116 endif
117 ifeq ($(STATS),1)
118 PROGRAM_OPTIONS += STATS
119 DEFINE += -DSTATS
120 endif
121
122 # PROGRAM_BUILD is a complete identification of the build
123 # (we can't use fancy options with date since OSes like Solaris
124 # or FreeBSD have strange date implementations)
125 ifeq ($(SYS),beos)
126 # XXX: beos does not support hostname (how lame...)
127 PROGRAM_BUILD = `date` $(USER)
128 else
129 PROGRAM_BUILD = `date` $(USER)@`hostname`
130 endif
131
132 # PROGRAM_VERSION is the current vlc version
133 PROGRAM_VERSION=@VLC_VERSION@
134 LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
135
136 # DEFINE will contain some of the constants definitions decided in Makefile, 
137 # including SYS_xx. It will be passed to C compiler.
138 DEFINE_CONSTANTS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
139 DEFINE += $(DEFINE_CONSTANTS)
140
141 # On Linux activate 64-bit off_t (by default under BSD)
142 ifneq (,$(findstring linux,$(SYS)))
143 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
144 endif
145
146 ###############################################################################
147 # Tuning and other variables - do not change anything except if you know
148 # exactly what you are doing
149 ###############################################################################
150
151 #
152 # C headers directories
153 #
154 INCLUDE += @INCLUDE@
155 INCLUDE += -Iinclude -Iextras -I/usr/local/include
156
157 #
158 # Libraries needed by built-in modules
159 #
160 ifneq (,$(BUILTINS))
161 LIB_BUILTINS := $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
162 LIB += $(LIB_BUILTINS)
163 endif
164
165 #
166 # Libraries
167 #
168 ifeq (1,$(LOCAL_LIBDVDCSS))
169 ifneq (,$(findstring dvd,$(BUILTINS)))
170 LIB += lib/libdvdcss.a
171 endif
172 endif
173
174 ifneq (,$(findstring mingw32,$(SYS)))
175 LIB += -lws2_32 -lnetapi32
176 endif
177
178 LIB += -L/usr/local/lib @LIB@
179
180 #
181 # C compiler flags: mainstream compilation
182 #
183 DEFINE += @DEFINE@
184 CFLAGS += $(DEFINE) $(INCLUDE)
185 CFLAGS += -Wall -Winline
186 CFLAGS += -D_REENTRANT
187 CFLAGS += -D_GNU_SOURCE
188
189 # flags needed for clean beos compilation
190 ifeq ($(SYS),beos)
191 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
192 endif
193
194 ifneq (,$(findstring darwin,$(SYS)))
195 CFLAGS += -traditional-cpp
196 endif
197
198 ifneq (,$(findstring mingw32,$(SYS)))
199 CFLAGS += -fnative-struct -D_OFF_T_ -D_off_t=long
200 endif
201
202 # Optimizations : don't compile debug versions with them
203 ifeq ($(OPTIMS),1)
204 CFLAGS += -O3
205 CFLAGS += -ffast-math -funroll-loops
206 ifneq ($(DEBUG),1)
207 ifneq ($(PROFILING),1)
208 CFLAGS += -fomit-frame-pointer
209 endif
210 endif
211
212 # Optimizations for x86 familiy
213 ifneq (,$(findstring 86,$(ARCH)))
214 # Optional Pentium Pro optimizations
215 ifneq (,$(findstring ppro,$(ARCH)))
216 CFLAGS += -march=pentiumpro -mcpu=pentiumpro
217 else
218 CFLAGS += -march=pentium -mcpu=pentium
219 endif
220 endif
221
222 # Optimizations for PowerPC
223 ifneq (,$(findstring powerpc,$(ARCH)))
224 CFLAGS += -mmultiple -mhard-float -mstring
225 endif
226
227 # Optimizations for Sparc
228 ifneq (,$(findstring sparc,$(ARCH)))
229 CFLAGS += -mhard-float
230 endif
231
232 #end of optimisations
233 endif
234
235 #
236 # C compiler flags: dependancies
237 #
238 DCFLAGS += $(INCLUDE)
239 DCFLAGS += -MM
240
241 #
242 # C compiler flags: linking
243 #
244 LCFLAGS += @LCFLAGS@ $(LIB)
245 LCFLAGS += -Wall
246 #LCFLAGS += -s
247 ifneq (,$(findstring mingw32,$(SYS)))
248 LCFLAGS += -mwindows -Xlinker --force-exe-suffix
249 endif
250
251 #
252 # C compiler flags: plugin compilation
253 #
254 ifneq (,$(findstring mingw32,$(SYS)))
255 PCFLAGS += -fnative-struct
256 else
257 PCFLAGS += -fPIC
258 endif
259
260 #
261 # C compiler flags: plugin linking
262 #
263 PLCFLAGS += @PLCFLAGS@
264
265 #
266 # Debugging and profiling support
267 #
268 ifeq ($(DEBUG),1)
269 CFLAGS += -g
270 endif
271
272 ifeq ($(PROFILING),1)
273 CFLAGS += -pg
274 endif
275