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