]> git.sesse.net Git - vlc/blob - Makefile.opts.in
New simple playlist.
[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
133 # DEFINE will contain some of the constants definitions decided in Makefile, 
134 # including SYS_xx. It will be passed to C compiler.
135 DEFINE_CONSTANTS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
136 DEFINE += $(DEFINE_CONSTANTS)
137
138 # On Linux activate 64-bit off_t (by default under BSD)
139 ifneq (,$(findstring linux,$(SYS)))
140 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
141 endif
142
143 ###############################################################################
144 # Tuning and other variables - do not change anything except if you know
145 # exactly what you are doing
146 ###############################################################################
147
148 #
149 # C headers directories
150 #
151 INCLUDE += @INCLUDE@
152 INCLUDE += -Iinclude -Iextras -I/usr/local/include
153
154 #
155 # Libraries needed by built-in modules
156 #
157 ifneq (,$(BUILTINS))
158 LIB_BUILTINS := $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
159 LIB += $(LIB_BUILTINS)
160 endif
161
162 #
163 # Libraries
164 #
165 ifeq (1,$(LOCAL_LIBDVDCSS))
166 ifneq (,$(findstring dvd,$(BUILTINS)))
167 LIB += lib/libdvdcss.a
168 endif
169 endif
170
171 ifneq (,$(findstring mingw32,$(SYS)))
172 LIB += -lws2_32 -lnetapi32
173 endif
174
175 LIB += -L/usr/local/lib @LIB@
176
177 #
178 # C compiler flags: mainstream compilation
179 #
180 DEFINE += @DEFINE@
181 CFLAGS += $(DEFINE) $(INCLUDE)
182 CFLAGS += -Wall -Winline
183 CFLAGS += -D_REENTRANT
184 CFLAGS += -D_GNU_SOURCE
185
186 # flags needed for clean beos compilation
187 ifeq ($(SYS),beos)
188 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
189 endif
190
191 ifneq (,$(findstring darwin,$(SYS)))
192 CFLAGS += -traditional-cpp
193 endif
194
195 ifneq (,$(findstring mingw32,$(SYS)))
196 CFLAGS += -fnative-struct
197 endif
198
199 # Optimizations : don't compile debug versions with them
200 ifeq ($(OPTIMS),1)
201 CFLAGS += -O3
202 CFLAGS += -ffast-math -funroll-loops
203 ifneq ($(DEBUG),1)
204 ifneq ($(PROFILING),1)
205 CFLAGS += -fomit-frame-pointer
206 endif
207 endif
208
209 # Optimizations for x86 familiy
210 ifneq (,$(findstring 86,$(ARCH)))
211 # Optional Pentium Pro optimizations
212 ifneq (,$(findstring ppro,$(ARCH)))
213 CFLAGS += -march=pentiumpro -mcpu=pentiumpro
214 else
215 CFLAGS += -march=pentium -mcpu=pentium
216 endif
217 endif
218
219 # Optimizations for PowerPC
220 ifneq (,$(findstring powerpc,$(ARCH)))
221 CFLAGS += -mmultiple -mhard-float -mstring
222 endif
223
224 # Optimizations for Sparc
225 ifneq (,$(findstring sparc,$(ARCH)))
226 CFLAGS += -mhard-float
227 endif
228
229 #end of optimisations
230 endif
231
232 #
233 # C compiler flags: dependancies
234 #
235 DCFLAGS += $(INCLUDE)
236 DCFLAGS += -MM
237
238 #
239 # C compiler flags: linking
240 #
241 LCFLAGS += @LCFLAGS@ $(LIB)
242 LCFLAGS += -Wall
243 #LCFLAGS += -s
244 ifneq (,$(findstring mingw32,$(SYS)))
245 LCFLAGS += -Xlinker --force-exe-suffix
246 endif
247
248 #
249 # C compiler flags: plugin compilation
250 #
251 ifneq (,$(findstring mingw32,$(SYS)))
252 PCFLAGS += -fnative-struct
253 else
254 PCFLAGS += -fPIC
255 endif
256
257 #
258 # C compiler flags: plugin linking
259 #
260 PLCFLAGS += @PLCFLAGS@
261
262 #
263 # Debugging and profiling support
264 #
265 ifeq ($(DEBUG),1)
266 CFLAGS += -g
267 endif
268
269 ifeq ($(PROFILING),1)
270 CFLAGS += -pg
271 endif
272