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