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