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