]> git.sesse.net Git - vlc/blob - Makefile.opts.in
* Small optimization in vpar_blocks.c, sparing a few memset() calls.
[vlc] / Makefile.opts.in
1 ###############################################################################
2 # vlc (VideoLAN Client) options Makefile
3 # (c)1998 VideoLAN
4 ###############################################################################
5
6 ###############################################################################
7 # Configuration
8 ###############################################################################
9
10
11 # Plugins to build
12 # WARNING: if you do not have a dynamic loader on your platform, remove
13 # the plugins in this line and put them as built-ins, otherwise your
14 # application won't be able to load them.
15
16 PLUGINS :=@PLUGINS@
17
18
19 # Built-in modules to build
20 # WARNING: do NOT put gtk and gnome together in this rule.
21
22 BUILTINS :=@BUILTINS@
23
24
25 # Additional build options
26
27 SYS = @SYS@
28 ALIASES =@ALIASES@
29 INSTALL = @INSTALL@
30 ARCH = @ARCH@
31
32 #
33 # Compilation options
34 #
35 DEBUG = @DEBUG@
36 STATS = @STATS@
37 TRACE = @TRACE@
38 PROFILING = @PROFILING@
39 OPTIMS = @OPTIMS@
40 GETOPT = @GETOPT@
41
42
43 # Build environment
44
45 CC = @CC@
46 CFLAGS = @CFLAGS@
47 SHELL = @SHELL@
48 RANLIB = @RANLIB@
49 MOC = @MOC@
50
51
52 # Installation environment
53
54 exec_prefix = @exec_prefix@
55 prefix = @prefix@
56 bindir = @bindir@
57 datadir = @datadir@
58 libdir = @libdir@
59 includedir = @includedir@
60
61 #
62 # Libraries for special cases
63 #
64 LIB_ALSA = @LIB_ALSA@
65 LIB_BEOS = @LIB_BEOS@
66 LIB_DARWIN = @LIB_DARWIN@
67 LIB_DVD = @LIB_DVD@
68 LIB_ESD = @LIB_ESD@
69 LIB_GGI = @LIB_GGI@
70 LIB_GLIDE = @LIB_GLIDE@
71 LIB_GNOME = @LIB_GNOME@
72 LIB_GTK = @LIB_GTK@
73 LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@
74 LIB_MACOSX = @LIB_MACOSX@
75 LIB_NCURSES = @LIB_NCURSES@
76 LIB_QT = @LIB_QT@
77 LIB_TS = @LIB_TS@
78 LIB_SDL = @LIB_SDL@
79 LIB_DIRECTX = @LIB_DIRECTX@
80 LIB_X11 = @LIB_X11@
81 LIB_XVIDEO = @LIB_XVIDEO@
82 LIB_YUV = @LIB_YUV@
83
84 #
85 # CFLAGS for special cases
86 #
87 CFLAGS_DVD = @CFLAGS_DVD@
88 CFLAGS_GTK = @CFLAGS_GTK@
89 CFLAGS_SDL = @CFLAGS_SDL@
90 CFLAGS_X11 = @CFLAGS_X11@
91
92 #
93 # Other special cases
94 #
95 LOCAL_LIBDVDCSS = @LOCAL_LIBDVDCSS@
96
97 ###############################################################################
98 # Configuration pre-processing
99 ###############################################################################
100
101 # PROGRAM_OPTIONS is an identification string of the compilation options
102 PROGRAM_OPTIONS = $(SYS) $(ARCH)
103 ifeq ($(DEBUG),1)
104 PROGRAM_OPTIONS += DEBUG
105 DEFINE += -DDEBUG
106 endif
107 ifeq ($(TRACE),1)
108 PROGRAM_OPTIONS += TRACE
109 DEFINE += -DTRACE
110 endif
111 ifeq ($(PROFILING),1)
112 PROGRAM_OPTIONS += PROFILING
113 DEFINE += -DPROFILING
114 endif
115 ifeq ($(STATS),1)
116 PROGRAM_OPTIONS += STATS
117 DEFINE += -DSTATS
118 endif
119
120 # PROGRAM_BUILD is a complete identification of the build
121 # (we can't use fancy options with date since OSes like Solaris
122 # or FreeBSD have strange date implementations)
123 ifeq ($(SYS),beos)
124 # XXX: beos does not support hostname (how lame...)
125 PROGRAM_BUILD = `date` $(USER)
126 else
127 PROGRAM_BUILD = `date` $(USER)@`hostname`
128 endif
129
130 # PROGRAM_VERSION is the current vlc version
131 PROGRAM_VERSION=@VLC_VERSION@
132 LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
133
134 # DEFINE will contain some of the constants definitions decided in Makefile, 
135 # including SYS_xx. It will be passed to C compiler.
136 DEFINE_CONSTANTS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
137 DEFINE += $(DEFINE_CONSTANTS)
138
139 # On Linux activate 64-bit off_t (by default under BSD)
140 ifneq (,$(findstring linux,$(SYS)))
141 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
142 endif
143
144 ###############################################################################
145 # Tuning and other variables - do not change anything except if you know
146 # exactly what you are doing
147 ###############################################################################
148
149 #
150 # C headers directories
151 #
152 INCLUDE += @INCLUDE@
153 INCLUDE += -Iinclude -Iextras -I/usr/local/include
154
155 #
156 # Libraries needed by built-in modules
157 #
158 ifneq (,$(BUILTINS))
159 LIB_BUILTINS := $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
160 LIB += $(LIB_BUILTINS)
161 endif
162
163 #
164 # Libraries
165 #
166 ifeq (1,$(LOCAL_LIBDVDCSS))
167 ifneq (,$(findstring dvd,$(BUILTINS)))
168 LIB += lib/libdvdcss.a
169 endif
170 endif
171
172 ifneq (,$(findstring mingw32,$(SYS)))
173 LIB += -lws2_32 -lnetapi32
174 endif
175
176 LIB += -L/usr/local/lib @LIB@
177
178 #
179 # C compiler flags: mainstream compilation
180 #
181 DEFINE += @DEFINE@
182 CFLAGS += $(DEFINE) $(INCLUDE)
183 CFLAGS += -Wall -Winline
184 CFLAGS += -D_REENTRANT
185 CFLAGS += -D_GNU_SOURCE
186
187 # flags needed for clean beos compilation
188 ifeq ($(SYS),beos)
189 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
190 endif
191
192 ifneq (,$(findstring darwin,$(SYS)))
193 CFLAGS += -traditional-cpp
194 endif
195
196 ifneq (,$(findstring mingw32,$(SYS)))
197 CFLAGS += -fnative-struct
198 endif
199
200 # Optimizations : don't compile debug versions with them
201 ifeq ($(OPTIMS),1)
202 CFLAGS += -O3
203 CFLAGS += -ffast-math -funroll-loops
204 ifneq ($(DEBUG),1)
205 ifneq ($(PROFILING),1)
206 CFLAGS += -fomit-frame-pointer
207 endif
208 endif
209
210 # Optimizations for x86 familiy
211 ifneq (,$(findstring 86,$(ARCH)))
212 # Optional Pentium Pro optimizations
213 ifneq (,$(findstring ppro,$(ARCH)))
214 CFLAGS += -march=pentiumpro -mcpu=pentiumpro
215 else
216 CFLAGS += -march=pentium -mcpu=pentium
217 endif
218 endif
219
220 # Optimizations for PowerPC
221 ifneq (,$(findstring powerpc,$(ARCH)))
222 CFLAGS += -mmultiple -mhard-float -mstring
223 endif
224
225 # Optimizations for Sparc
226 ifneq (,$(findstring sparc,$(ARCH)))
227 CFLAGS += -mhard-float
228 endif
229
230 #end of optimisations
231 endif
232
233 #
234 # C compiler flags: dependancies
235 #
236 DCFLAGS += $(INCLUDE)
237 DCFLAGS += -MM
238
239 #
240 # C compiler flags: linking
241 #
242 LCFLAGS += @LCFLAGS@ $(LIB)
243 LCFLAGS += -Wall
244 #LCFLAGS += -s
245 ifneq (,$(findstring mingw32,$(SYS)))
246 LCFLAGS += -mwindows -Xlinker --force-exe-suffix
247 endif
248
249 #
250 # C compiler flags: plugin compilation
251 #
252 ifneq (,$(findstring mingw32,$(SYS)))
253 PCFLAGS += -fnative-struct
254 else
255 PCFLAGS += -fPIC
256 endif
257
258 #
259 # C compiler flags: plugin linking
260 #
261 PLCFLAGS += @PLCFLAGS@
262
263 #
264 # Debugging and profiling support
265 #
266 ifeq ($(DEBUG),1)
267 CFLAGS += -g
268 endif
269
270 ifeq ($(PROFILING),1)
271 CFLAGS += -pg
272 endif
273