]> git.sesse.net Git - vlc/blob - Makefile.opts.in
* ./plugins/win32: skeleton for the win32 interface Ipkiss is developing.
[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 DLL_PATH = @DLL_PATH@
55
56
57 # Installation environment
58
59 exec_prefix = @exec_prefix@
60 prefix = @prefix@
61 bindir = @bindir@
62 datadir = @datadir@
63 libdir = @libdir@
64 includedir = @includedir@
65
66 #
67 # Libraries for special cases
68 #
69 LIB_ALSA = @LIB_ALSA@
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_PLUGIN = @LIB_DVDREAD_PLUGIN@
77 LIB_DVDREAD = @LIB_DVDREAD@
78 LIB_DVDREAD_PLUGIN = @LIB_DVDREAD_PLUGIN@
79 LIB_ESD = @LIB_ESD@
80 LIB_FILTER_DISTORT = @LIB_FILTER_DISTORT@
81 LIB_GGI = @LIB_GGI@
82 LIB_GLIDE = @LIB_GLIDE@
83 LIB_GNOME = @LIB_GNOME@
84 LIB_GTK = @LIB_GTK@
85 LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@
86 LIB_IMDCT = @LIB_IMDCT@
87 LIB_IMDCT3DN = @LIB_IMDCT3DN@
88 LIB_IMDCTSSE = @LIB_IMDCTSSE@
89 LIB_KDE = @LIB_KDE@
90 LIB_LIBDVDCSS = @LIB_LIBDVDCSS@
91 LIB_MACOSX = @LIB_MACOSX@
92 LIB_MAD = @LIB_MAD@
93 LIB_MOTIONALTIVEC = @LIB_MOTIONALTIVEC@
94 LIB_MPEG_TS = @LIB_MPEG_TS@
95 LIB_NCURSES = @LIB_NCURSES@
96 LIB_QNX = @LIB_QNX@
97 LIB_QT = @LIB_QT@
98 LIB_RC = @LIB_RC@
99 LIB_SDL = @LIB_SDL@
100 LIB_WIN32 = @LIB_WIN32@
101 LIB_X11 = @LIB_X11@
102 LIB_XVIDEO = @LIB_XVIDEO@
103
104 #
105 # CFLAGS for special cases
106 #
107 CFLAGS_VLC = @CFLAGS_VLC@
108 CFLAGS_ARTS = @CFLAGS_ARTS@
109 CFLAGS_DVD = @CFLAGS_DVD@
110 CFLAGS_DVDREAD = @CFLAGS_DVDREAD@
111 CFLAGS_ESD = @CFLAGS_ESD@
112 CFLAGS_GLIDE = @CFLAGS_GLIDE@
113 CFLAGS_GNOME = @CFLAGS_GNOME@
114 CFLAGS_GTK = @CFLAGS_GTK@
115 CFLAGS_KDE = @CFLAGS_KDE@
116 CFLAGS_IDCTALTIVEC = @CFLAGS_IDCTALTIVEC@
117 CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
118 CFLAGS_MACOSX = @CFLAGS_MACOSX@
119 CFLAGS_MAD = @CFLAGS_MAD@
120 CFLAGS_MOTIONALTIVEC = @CFLAGS_MOTIONALTIVEC@
121 CFLAGS_QT = @CFLAGS_QT@
122 CFLAGS_SDL = @CFLAGS_SDL@
123 CFLAGS_WIN32 = @CFLAGS_WIN32@
124 CFLAGS_X11 = @CFLAGS_X11@
125 CFLAGS_XVIDEO = @CFLAGS_XVIDEO@
126
127 #
128 # Additional objects
129 #
130 SRC_DVD_EXTRA = @SRC_DVD_EXTRA@
131 SRC_DVDCSS_EXTRA = @SRC_DVDCSS_EXTRA@
132
133 #
134 # Other special cases
135 #
136 NEED_GETOPT = @NEED_GETOPT@
137 NEED_LIBDVDCSS = @NEED_LIBDVDCSS@
138
139 ###############################################################################
140 # Configuration pre-processing
141 ###############################################################################
142
143 # PROGRAM_OPTIONS is an identification string of the compilation options
144 PROGRAM_OPTIONS = $(SYS) $(ARCH)
145 ifeq ($(DEBUG),1)
146 PROGRAM_OPTIONS += DEBUG
147 DEFINE += -DDEBUG
148 endif
149 ifeq ($(TRACE),1)
150 PROGRAM_OPTIONS += TRACE
151 DEFINE += -DTRACE
152 endif
153 ifeq ($(CPROF),1)
154 PROGRAM_OPTIONS += CPROF
155 DEFINE += -DCPROF
156 endif
157 ifeq ($(GPROF),1)
158 PROGRAM_OPTIONS += GPROF
159 DEFINE += -DGPROF
160 endif
161
162 # PROGRAM_BUILD is a complete identification of the build
163 # (we can't use fancy options with date since OSes like Solaris
164 # or FreeBSD have strange date implementations)
165 ifeq ($(SYS),beos)
166 # XXX: beos does not support hostname (how lame...)
167 PROGRAM_BUILD = `date` $(USER)
168 else
169 PROGRAM_BUILD = `date` $(USER)@`hostname`
170 endif
171
172 # PROGRAM_VERSION is the current vlc version
173 PROGRAM_VERSION=@VLC_VERSION@
174 LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
175
176 # DEFINE will contain some of the constants definitions decided in Makefile, 
177 # including SYS_xx. It will be passed to C compiler.
178 DEFINE_SYS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
179 DEFINE += $(DEFINE_SYS)
180
181 # On Linux and Solaris, activate 64-bit off_t (by default under BSD)
182 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 
183
184 # Gettext support
185 DEFINE += -DLOCALEDIR=\"$(datadir)/locale\"
186
187 # Data and plugin location
188 DEFINE += -DDATA_PATH=\"@prefix@/share/videolan\"
189 DEFINE += -DPLUGIN_PATH=\"@prefix@/lib/videolan/vlc\"
190
191 ###############################################################################
192 # Tuning and other variables - do not change anything except if you know
193 # exactly what you are doing
194 ###############################################################################
195
196 #
197 # C headers directories
198 #
199 INCLUDE += @INCLUDE@
200 INCLUDE += -Iinclude -Iextras
201
202 #
203 # Libraries needed by built-in modules
204 #
205 LIB_BUILTINS := $(patsubst %,$$LIB_%,$(shell echo $(BUILTINS) | tr '[a-z]' '[A-Z]'))
206 LIB += $(LIB_BUILTINS)
207
208 #
209 # Libraries
210 #
211 ifneq (,$(findstring mingw32,$(SYS)))
212 LIB += -lws2_32 -lnetapi32
213 endif
214
215 LIB += @LIB@
216
217 #
218 # C compiler flags: mainstream compilation
219 #
220 DEFINE += @DEFINE@
221 CFLAGS += $(DEFINE) $(INCLUDE)
222 CFLAGS += -Wall -Winline
223 CFLAGS += -pipe
224 CFLAGS += -D_REENTRANT
225 CFLAGS += -D_GNU_SOURCE
226
227 ifeq ($(RELEASE),1)
228 CFLAGS += -DHAVE_RELEASE
229 endif
230
231 # flags needed for clean beos compilation
232 ifeq ($(SYS),beos)
233 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
234 endif
235
236 ifneq (,$(findstring darwin,$(SYS)))
237 CFLAGS += -no-cpp-precomp
238 endif
239
240 ifneq (,$(findstring mingw32,$(SYS)))
241 CFLAGS += -fnative-struct -D_OFF_T_ -D_off_t=long
242 endif
243
244 ifneq (,$(findstring bsd,$(SYS)))
245 CFLAGS += -pthread
246 endif
247
248 # Optimizations : don't compile debug versions with them
249 ifeq ($(OPTIMS),1)
250 CFLAGS += -O3
251 CFLAGS += -ffast-math -funroll-loops
252 ifneq ($(DEBUG),1)
253 ifneq ($(GPROF),1)
254 ifneq ($(CPROF),1)
255 CFLAGS += -fomit-frame-pointer
256 endif
257 endif
258 endif
259
260 ifneq (,$(findstring powerpc,$(ARCH)))
261 # Optimizations for PowerPC
262 CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
263 ifneq (,$(TUNING))
264 CFLAGS += -mtune=$(TUNING)
265 endif
266 else
267 ifneq (,$(findstring sparc,$(ARCH)))
268 # Optimizations for Sparc
269 CFLAGS += -mhard-float
270 ifneq (,$(TUNING))
271 CFLAGS += -mcpu=$(TUNING)
272 endif
273 else
274 # Generic optimizations
275 ifneq (,$(TUNING))
276 CFLAGS += -mcpu=$(TUNING)
277 endif
278 endif
279 endif
280
281 #end of optimisations
282 endif
283
284 #
285 # C compiler flags: dependancies
286 #
287 DCFLAGS += $(INCLUDE)
288 DCFLAGS += -MM
289
290 #
291 # C compiler flags: linking
292 #
293 LDFLAGS += @LDFLAGS@
294 LDFLAGS += $(LIB)
295 LDFLAGS += -Wall
296 ifneq ($(DEBUG),1)
297 ifneq ($(GPROF),1)
298 ifneq ($(CPROF),1)
299 #LDFLAGS += -s
300 endif
301 endif
302 endif
303 ifneq (,$(findstring mingw32,$(SYS)))
304 LDFLAGS += -mwindows -Xlinker --force-exe-suffix
305 endif
306
307 #
308 # C compiler and linker flags: setting soname
309 #
310 SOFLAGS = @SOFLAGS@
311
312 #
313 # C compiler flags: plugin compilation
314 #
315 ifneq (,$(findstring mingw32,$(SYS)))
316 PCFLAGS += -fnative-struct
317 else
318 PCFLAGS += -fPIC
319 endif
320
321 #
322 # C compiler flags: plugin linking
323 #
324 PLDFLAGS += @PLDFLAGS@
325
326 #
327 # Debugging and profiling support
328 #
329 ifeq ($(DEBUG),1)
330 CFLAGS += -g
331 endif
332
333 ifeq ($(CPROF),1)
334 CFLAGS += -finstrument-functions
335 endif
336
337 ifeq ($(GPROF),1)
338 CFLAGS += -pg
339 endif
340
341