]> git.sesse.net Git - vlc/blob - Makefile.opts.in
-Update for libdvdcss documentation
[vlc] / Makefile.opts.in
1 ###############################################################################
2 # vlc (VideoLAN Client) options Makefile
3 # (c)1998 VideoLAN
4 ###############################################################################
5
6 HAVE_MAKEFILE_OPTS = 1
7
8 ###############################################################################
9 # Configuration
10 ###############################################################################
11
12
13 # Plugins to build
14 # WARNING: if you do not have a dynamic loader on your platform, remove
15 # the plugins in this line and put them as built-ins, otherwise your
16 # application won't be able to load them.
17
18 PLUGINS :=@PLUGINS@
19
20
21 # Built-in modules to build
22 # WARNING: do NOT put gtk and gnome together in this rule.
23
24 BUILTINS :=@BUILTINS@
25
26
27 # Additional build options
28
29 SYS = @SYS@
30 ALIASES =@ALIASES@
31 INSTALL = @INSTALL@
32 ARCH = @ARCH@
33
34 #
35 # Compilation options
36 #
37 DEBUG = @DEBUG@
38 TRACE = @TRACE@
39 CPROF = @CPROF@
40 GPROF = @GPROF@
41 OPTIMS = @OPTIMS@
42 TUNING = @TUNING@
43 RELEASE = @RELEASE@
44
45
46 # Build environment
47
48 CC = @CC@
49 CFLAGS = @CFLAGS@
50 SHELL = @SHELL@
51 RANLIB = @RANLIB@
52 WINDRES = @WINDRES@
53 MOC = @MOC@
54
55
56 # Installation environment
57
58 exec_prefix = @exec_prefix@
59 prefix = @prefix@
60 bindir = @bindir@
61 datadir = @datadir@
62 libdir = @libdir@
63 includedir = @includedir@
64
65 #
66 # Libraries for special cases
67 #
68 LIB_ALSA = @LIB_ALSA@
69 LIB_ALTIVEC = @LIB_ALTIVEC@
70 LIB_ARTS = @LIB_ARTS@
71 LIB_BEOS = @LIB_BEOS@
72 LIB_DARWIN = @LIB_DARWIN@
73 LIB_DIRECTX = @LIB_DIRECTX@
74 LIB_DVD = @LIB_DVD@
75 LIB_DVD_PLUGIN = @LIB_DVD_PLUGIN@
76 LIB_DVDREAD = @LIB_DVDREAD@
77 LIB_DVDREAD_PLUGIN = @LIB_DVDREAD_PLUGIN@
78 LIB_ESD = @LIB_ESD@
79 LIB_GGI = @LIB_GGI@
80 LIB_GLIDE = @LIB_GLIDE@
81 LIB_GNOME = @LIB_GNOME@
82 LIB_GTK = @LIB_GTK@
83 LIB_KDE = @LIB_KDE@
84 LIB_LIBDVDCSS = @LIB_LIBDVDCSS@
85 LIB_MACOSX = @LIB_MACOSX@
86 LIB_NCURSES = @LIB_NCURSES@
87 LIB_QNX = @LIB_QNX@
88 LIB_QT = @LIB_QT@
89 LIB_RC = @LIB_RC@
90 LIB_SDL = @LIB_SDL@
91 LIB_TS = @LIB_TS@
92 LIB_X11 = @LIB_X11@
93 LIB_XVIDEO = @LIB_XVIDEO@
94 LIB_YUV = @LIB_YUV@
95
96 #
97 # CFLAGS for special cases
98 #
99 CFLAGS_ALTIVEC = @CFLAGS_ALTIVEC@
100 CFLAGS_DVD = @CFLAGS_DVD@
101 CFLAGS_DVDREAD = @CFLAGS_DVDREAD@
102 CFLAGS_ARTS = @CFLAGS_ARTS@
103 CFLAGS_ESD = @CFLAGS_ESD@
104 CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
105 CFLAGS_ESD = @CFLAGS_ESD@
106 CFLAGS_GTK = @CFLAGS_GTK@
107 CFLAGS_SDL = @CFLAGS_SDL@
108 CFLAGS_X11 = @CFLAGS_X11@
109
110 #
111 # Additional objects
112 #
113 OBJ_DVD = @OBJ_DVD@
114 OBJ_LIBDVDCSS = @OBJ_LIBDVDCSS@
115
116 #
117 # Other special cases
118 #
119 NEED_GETOPT = @NEED_GETOPT@
120 NEED_LIBDVDCSS = @NEED_LIBDVDCSS@
121
122 ###############################################################################
123 # Configuration pre-processing
124 ###############################################################################
125
126 # PROGRAM_OPTIONS is an identification string of the compilation options
127 PROGRAM_OPTIONS = $(SYS) $(ARCH)
128 ifeq ($(DEBUG),1)
129 PROGRAM_OPTIONS += DEBUG
130 DEFINE += -DDEBUG
131 endif
132 ifeq ($(TRACE),1)
133 PROGRAM_OPTIONS += TRACE
134 DEFINE += -DTRACE
135 endif
136 ifeq ($(CPROF),1)
137 PROGRAM_OPTIONS += CPROF
138 DEFINE += -DCPROF
139 endif
140 ifeq ($(GPROF),1)
141 PROGRAM_OPTIONS += GPROF
142 DEFINE += -DGPROF
143 endif
144
145 # PROGRAM_BUILD is a complete identification of the build
146 # (we can't use fancy options with date since OSes like Solaris
147 # or FreeBSD have strange date implementations)
148 ifeq ($(SYS),beos)
149 # XXX: beos does not support hostname (how lame...)
150 PROGRAM_BUILD = `date` $(USER)
151 else
152 PROGRAM_BUILD = `date` $(USER)@`hostname`
153 endif
154
155 # PROGRAM_VERSION is the current vlc version
156 PROGRAM_VERSION=@VLC_VERSION@
157 LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
158
159 # DEFINE will contain some of the constants definitions decided in Makefile, 
160 # including SYS_xx. It will be passed to C compiler.
161 DEFINE_CONSTANTS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
162 DEFINE += $(DEFINE_CONSTANTS)
163
164 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
165 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
166
167 ###############################################################################
168 # Tuning and other variables - do not change anything except if you know
169 # exactly what you are doing
170 ###############################################################################
171
172 #
173 # C headers directories
174 #
175 INCLUDE += @INCLUDE@
176 INCLUDE += -Iinclude -Iextras
177
178 #
179 # Libraries needed by built-in modules
180 #
181 # Let's go for a crude hack !
182 LIB_MOTIONALTIVEC := $(LIB_ALTIVEC)
183 LIB_IDCTALTIVEC := $(LIB_ALTIVEC)
184 ifneq (,$(BUILTINS))
185 LIB_BUILTINS := $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
186 LIB += $(LIB_BUILTINS)
187 endif
188
189 #
190 # Libraries
191 #
192 ifneq (,$(findstring mingw32,$(SYS)))
193 LIB += -lws2_32 -lnetapi32
194 endif
195
196 LIB += @LIB@
197
198 #
199 # C compiler flags: mainstream compilation
200 #
201 DEFINE += @DEFINE@
202 CFLAGS += $(DEFINE) $(INCLUDE)
203 CFLAGS += -Wall -Winline
204 CFLAGS += -pipe
205 CFLAGS += -D_REENTRANT
206 CFLAGS += -D_GNU_SOURCE
207
208 ifeq ($(RELEASE),1)
209 CFLAGS += -DRELEASE
210 endif
211
212 # flags needed for clean beos compilation
213 ifeq ($(SYS),beos)
214 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
215 endif
216
217 ifneq (,$(findstring darwin,$(SYS)))
218 CFLAGS += -no-cpp-precomp
219 endif
220
221 ifneq (,$(findstring mingw32,$(SYS)))
222 CFLAGS += -fnative-struct -D_OFF_T_ -D_off_t=long
223 endif
224
225 ifneq (,$(findstring bsd,$(SYS)))
226 CFLAGS += -pthread
227 endif
228
229 # Optimizations : don't compile debug versions with them
230 ifeq ($(OPTIMS),1)
231 CFLAGS += -O3
232 CFLAGS += -ffast-math -funroll-loops
233 ifneq ($(DEBUG),1)
234 ifneq ($(GPROF),1)
235 ifneq ($(CPROF),1)
236 CFLAGS += -fomit-frame-pointer
237 endif
238 endif
239 endif
240
241 ifneq (,$(findstring powerpc,$(ARCH)))
242 # Optimizations for PowerPC
243 CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
244 ifneq (,$(TUNING))
245 CFLAGS += -mtune=$(TUNING)
246 endif
247 else
248 ifneq (,$(findstring sparc,$(ARCH)))
249 # Optimizations for Sparc
250 CFLAGS += -mhard-float
251 ifneq (,$(TUNING))
252 CFLAGS += -mcpu=$(TUNING)
253 endif
254 else
255 # Generic optimizations
256 ifneq (,$(TUNING))
257 CFLAGS += -mcpu=$(TUNING)
258 endif
259 endif
260 endif
261
262 #end of optimisations
263 endif
264
265 #
266 # C compiler flags: dependancies
267 #
268 DCFLAGS += $(INCLUDE)
269 DCFLAGS += -MM
270
271 #
272 # C compiler flags: linking
273 #
274 LCFLAGS += @LCFLAGS@ $(LIB)
275 LCFLAGS += -Wall
276 ifneq ($(DEBUG),1)
277 ifneq ($(GPROF),1)
278 ifneq ($(CPROF),1)
279 #LCFLAGS += -s
280 endif
281 endif
282 endif
283 ifneq (,$(findstring mingw32,$(SYS)))
284 LCFLAGS += -mwindows -Xlinker --force-exe-suffix
285 endif
286
287 #
288 # C compiler and linker flags: setting soname
289 #
290 SOFLAGS = @SOFLAGS@
291
292 #
293 # C compiler flags: plugin compilation
294 #
295 ifneq (,$(findstring mingw32,$(SYS)))
296 PCFLAGS += -fnative-struct
297 else
298 PCFLAGS += -fPIC
299 endif
300
301 #
302 # C compiler flags: plugin linking
303 #
304 PLCFLAGS += @PLCFLAGS@
305
306 #
307 # Debugging and profiling support
308 #
309 ifeq ($(DEBUG),1)
310 CFLAGS += -g
311 endif
312
313 ifeq ($(CPROF),1)
314 CFLAGS += -finstrument-functions
315 endif
316
317 ifeq ($(GPROF),1)
318 CFLAGS += -pg
319 endif
320
321