]> git.sesse.net Git - vlc/blob - Makefile.opts.in
* ./extras/MacOSX_dvdioctl: removed outdated files.
[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 CPROF = @CPROF@
39 GPROF = @GPROF@
40 OPTIMS = @OPTIMS@
41 TUNING = @TUNING@
42 RELEASE = @RELEASE@
43
44
45 # Build environment
46
47 CC = @CC@
48 CFLAGS = @CFLAGS@
49 SHELL = @SHELL@
50 RANLIB = @RANLIB@
51 WINDRES = @WINDRES@
52 MOC = @MOC@
53 DLL_PATH = @DLL_PATH@
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_ARTS = @LIB_ARTS@
70 LIB_BEOS = @LIB_BEOS@
71 LIB_DARWIN = @LIB_DARWIN@
72 LIB_DIRECTX = @LIB_DIRECTX@
73 LIB_DSP = @LIB_DSP@
74 LIB_DVD = @LIB_DVD@
75 LIB_DVDREAD = @LIB_DVDREAD@
76 LIB_ESD = @LIB_ESD@
77 LIB_FILTER_DISTORT = @LIB_FILTER_DISTORT@
78 LIB_GGI = @LIB_GGI@
79 LIB_GLIDE = @LIB_GLIDE@
80 LIB_GNOME = @LIB_GNOME@
81 LIB_GTK = @LIB_GTK@
82 LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@
83 LIB_IMDCT = @LIB_IMDCT@
84 LIB_IMDCT3DN = @LIB_IMDCT3DN@
85 LIB_IMDCTSSE = @LIB_IMDCTSSE@
86 LIB_IPV4 = @LIB_IPV4@
87 LIB_IPV6 = @LIB_IPV6@
88 LIB_KDE = @LIB_KDE@
89 LIB_A52 = @LIB_A52@
90 LIB_LIBDVDCSS = @LIB_LIBDVDCSS@
91 LIB_LIBDVDREAD = @LIB_LIBDVDREAD@
92 LIB_LIRC = @LIB_LIRC@
93 LIB_MACOSX = @LIB_MACOSX@
94 LIB_MAD = @LIB_MAD@
95 LIB_MOTIONALTIVEC = @LIB_MOTIONALTIVEC@
96 LIB_MPEG_TS = @LIB_MPEG_TS@
97 LIB_NCURSES = @LIB_NCURSES@
98 LIB_QNX = @LIB_QNX@
99 LIB_QT = @LIB_QT@
100 LIB_RC = @LIB_RC@
101 LIB_SDL = @LIB_SDL@
102 LIB_VCD = @LIB_VCD@
103 LIB_WAVEOUT = @LIB_WAVEOUT@
104 LIB_WIN32 = @LIB_WIN32@
105 LIB_X11 = @LIB_X11@
106 LIB_XVIDEO = @LIB_XVIDEO@
107
108 #
109 # CFLAGS for special cases
110 #
111 CFLAGS_VLC = @CFLAGS_VLC@
112 CFLAGS_ARTS = @CFLAGS_ARTS@
113 CFLAGS_DVD = @CFLAGS_DVD@
114 CFLAGS_DVDREAD = @CFLAGS_DVDREAD@
115 CFLAGS_ESD = @CFLAGS_ESD@
116 CFLAGS_GLIDE = @CFLAGS_GLIDE@
117 CFLAGS_GNOME = @CFLAGS_GNOME@
118 CFLAGS_GTK = @CFLAGS_GTK@
119 CFLAGS_KDE = @CFLAGS_KDE@
120 CFLAGS_IDCTALTIVEC = @CFLAGS_IDCTALTIVEC@
121 CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
122 CFLAGS_MACOSX = @CFLAGS_MACOSX@
123 CFLAGS_MAD = @CFLAGS_MAD@
124 CFLAGS_MOTIONALTIVEC = @CFLAGS_MOTIONALTIVEC@
125 CFLAGS_QT = @CFLAGS_QT@
126 CFLAGS_SDL = @CFLAGS_SDL@
127 CFLAGS_WIN32 = @CFLAGS_WIN32@
128 CFLAGS_X11 = @CFLAGS_X11@
129 CFLAGS_XVIDEO = @CFLAGS_XVIDEO@
130
131 #
132 # Additional objects
133 #
134 SRC_DVD_EXTRA = @SRC_DVD_EXTRA@
135 SRC_DVDCSS_EXTRA = @SRC_DVDCSS_EXTRA@
136
137 #
138 # Other special cases
139 #
140 NEED_GETOPT = @NEED_GETOPT@
141 NEED_LIBDVDCSS = @NEED_LIBDVDCSS@
142
143 ###############################################################################
144 # Configuration pre-processing
145 ###############################################################################
146
147 # PROGRAM_OPTIONS is an identification string of the compilation options
148 PROGRAM_OPTIONS = $(SYS) $(ARCH)
149 ifeq ($(DEBUG),1)
150 PROGRAM_OPTIONS += DEBUG
151 DEFINE += -DDEBUG
152 endif
153 ifeq ($(CPROF),1)
154 PROGRAM_OPTIONS += CPROF
155 DEFINE += -DCPROF
156 endif
157 ifeq ($(GPROF),1)
158 PROGRAM_OPTIONS += GPROF
159 DEFINE += -DGPROF
160 endif
161
162 # PROGRAM_BUILD is a complete identification of the build
163 # (we can't use fancy options with date since OSes like Solaris
164 # or FreeBSD have strange date implementations)
165 ifeq ($(SYS),beos)
166 # XXX: beos does not support hostname (how lame...)
167 PROGRAM_BUILD = `date` $(USER)
168 else
169 PROGRAM_BUILD = `date` $(USER)@`hostname`
170 endif
171
172 # PROGRAM_VERSION is the current vlc version
173 PROGRAM_VERSION=@VLC_VERSION@
174 LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
175
176 # DEFINE will contain some of the constants definitions decided in Makefile, 
177 # including SYS_xx. It will be passed to C compiler.
178 DEFINE_SYS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
179 DEFINE += $(DEFINE_SYS)
180
181 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
182 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE
183
184 # Gettext support
185 DEFINE += -DLOCALEDIR=\"$(datadir)/locale\"
186
187 # Data and plugin location
188 DEFINE += -DDATA_PATH=\"@prefix@/share/videolan\"
189 DEFINE += -DPLUGIN_PATH=\"@prefix@/lib/videolan/vlc\"
190
191 ###############################################################################
192 # Tuning and other variables - do not change anything except if you know
193 # exactly what you are doing
194 ###############################################################################
195
196 #
197 # C headers directories
198 #
199 INCLUDE += @INCLUDE@
200 INCLUDE += -Iinclude -Iextras
201
202 #
203 # Libraries needed by built-in modules
204 #
205 LIB_BUILTINS := $(patsubst %,$$LIB_%,$(shell echo $(BUILTINS) | tr '[a-z]' '[A-Z]'))
206 LIB += $(LIB_BUILTINS)
207
208 #
209 # Libraries
210 #
211 ifneq (,$(findstring mingw32,$(SYS)))
212 LIB += -lws2_32 -lnetapi32
213 endif
214
215 LIB += @LIB@
216
217 #
218 # C compiler flags: mainstream compilation
219 #
220 CFLAGS += $(DEFINE) $(INCLUDE)
221 CFLAGS += -D_REENTRANT
222 CFLAGS += -D_GNU_SOURCE
223
224 ifeq ($(RELEASE),1)
225 CFLAGS += -DHAVE_RELEASE
226 endif
227
228 # flags needed for clean beos compilation
229 ifeq ($(SYS),beos)
230 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
231 endif
232
233 ifneq (,$(findstring darwin,$(SYS)))
234 CFLAGS += -no-cpp-precomp
235 endif
236
237 ifneq (,$(findstring mingw32,$(SYS)))
238 CFLAGS += -fnative-struct -D_OFF_T_ -D_off_t=long
239 endif
240
241 ifneq (,$(findstring bsd,$(SYS)))
242 CFLAGS += -pthread
243 endif
244
245 # Optimizations : don't compile debug versions with them
246 ifeq ($(OPTIMS),1)
247 CFLAGS += @CFLAGS_OPTIM@
248 ifneq ($(DEBUG),1)
249 ifneq ($(GPROF),1)
250 ifneq ($(CPROF),1)
251 CFLAGS += @CFLAGS_OPTIM_NODEBUG@
252 endif
253 endif
254 endif
255
256 ifneq (,$(findstring powerpc,$(ARCH)))
257 # Optimizations for PowerPC
258 CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
259 ifneq (,$(TUNING))
260 CFLAGS += -mtune=$(TUNING)
261 endif
262 else
263 ifneq (,$(findstring sparc,$(ARCH)))
264 # Optimizations for Sparc
265 CFLAGS += -mhard-float
266 ifneq (,$(TUNING))
267 CFLAGS += -mcpu=$(TUNING)
268 endif
269 else
270 # Generic optimizations
271 ifneq (,$(TUNING))
272 CFLAGS += -mcpu=$(TUNING)
273 endif
274 endif
275 endif
276
277 #end of optimisations
278 endif
279
280 #
281 # C compiler flags: dependancies
282 #
283 DCFLAGS += $(INCLUDE)
284 DCFLAGS += -M
285
286 #
287 # C compiler flags: linking
288 #
289 LDFLAGS += @LDFLAGS@
290 LDFLAGS += $(LIB)
291 LDFLAGS += -Wall
292 ifneq ($(DEBUG),1)
293 ifneq ($(GPROF),1)
294 ifneq ($(CPROF),1)
295 #LDFLAGS += -s
296 endif
297 endif
298 endif
299 ifneq (,$(findstring mingw32,$(SYS)))
300 LDFLAGS += -mwindows -Xlinker --force-exe-suffix
301 endif
302
303 #
304 # C compiler and linker flags: setting soname
305 #
306 SOFLAGS = @SOFLAGS@
307
308 #
309 # C compiler flags: plugin compilation
310 #
311 ifneq (,$(findstring mingw32,$(SYS)))
312 PCFLAGS += -fnative-struct
313 else
314 PCFLAGS += -fPIC
315 endif
316
317 #
318 # C compiler flags: plugin linking
319 #
320 PLDFLAGS += @PLDFLAGS@
321
322 #
323 # Debugging and profiling support
324 #
325 ifeq ($(DEBUG),1)
326 CFLAGS += -g
327 endif
328
329 ifeq ($(CPROF),1)
330 CFLAGS += -finstrument-functions
331 endif
332
333 ifeq ($(GPROF),1)
334 CFLAGS += -pg
335 endif
336
337