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