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