* Added a dummy libdvdcss so that the DVD plugin can be used without
[vlc.git] / Makefile.opts.in
blobc7a5d6fe3548538bca36d67125908fb575fcd1d4
1 ###############################################################################
2 # vlc (VideoLAN Client) options Makefile
3 # (c)1998 VideoLAN
4 ###############################################################################
6 HAVE_MAKEFILE_OPTS = 1
8 ###############################################################################
9 # Configuration
10 ###############################################################################
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@
20
21 # Built-in modules to build
22 # WARNING: do NOT put gtk and gnome together in this rule.
23
24 BUILTINS :=@BUILTINS@
26
27 # Additional build options
28
29 SYS = @SYS@
30 ALIASES =@ALIASES@
31 INSTALL = @INSTALL@
32 ARCH = @ARCH@
35 # Compilation options
37 DEBUG = @DEBUG@
38 STATS = @STATS@
39 TRACE = @TRACE@
40 PROFILING = @PROFILING@
41 OPTIMS = @OPTIMS@
42 GETOPT = @GETOPT@
44
45 # Build environment
46
47 CC = @CC@
48 CFLAGS = @CFLAGS@
49 SHELL = @SHELL@
50 RANLIB = @RANLIB@
51 WINDRES = @WINDRES@
52 MOC = @MOC@
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@
65 # Libraries for special cases
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_IDCTALTIVEC = @LIB_IDCTALTIVEC@
78 LIB_KDE = @LIB_KDE@
79 LIB_MACOSX = @LIB_MACOSX@
80 LIB_QNX = @LIB_QNX@
81 LIB_NCURSES = @LIB_NCURSES@
82 LIB_QT = @LIB_QT@
83 LIB_TS = @LIB_TS@
84 LIB_SDL = @LIB_SDL@
85 LIB_DIRECTX = @LIB_DIRECTX@
86 LIB_X11 = @LIB_X11@
87 LIB_XVIDEO = @LIB_XVIDEO@
88 LIB_YUV = @LIB_YUV@
91 # CFLAGS for special cases
93 CFLAGS_DVD = @CFLAGS_DVD@
94 CFLAGS_GTK = @CFLAGS_GTK@
95 CFLAGS_SDL = @CFLAGS_SDL@
96 CFLAGS_X11 = @CFLAGS_X11@
99 # Other special cases
101 OBJ_DVD = @OBJ_DVD@
102 LOCAL_LIBDVDCSS = @LOCAL_LIBDVDCSS@
104 ###############################################################################
105 # Configuration pre-processing
106 ###############################################################################
108 # PROGRAM_OPTIONS is an identification string of the compilation options
109 PROGRAM_OPTIONS = $(SYS) $(ARCH)
110 ifeq ($(DEBUG),1)
111 PROGRAM_OPTIONS += DEBUG
112 DEFINE += -DDEBUG
113 endif
114 ifeq ($(TRACE),1)
115 PROGRAM_OPTIONS += TRACE
116 DEFINE += -DTRACE
117 endif
118 ifeq ($(PROFILING),1)
119 PROGRAM_OPTIONS += PROFILING
120 DEFINE += -DPROFILING
121 endif
122 ifeq ($(STATS),1)
123 PROGRAM_OPTIONS += STATS
124 DEFINE += -DSTATS
125 endif
127 # PROGRAM_BUILD is a complete identification of the build
128 # (we can't use fancy options with date since OSes like Solaris
129 # or FreeBSD have strange date implementations)
130 ifeq ($(SYS),beos)
131 # XXX: beos does not support hostname (how lame...)
132 PROGRAM_BUILD = `date` $(USER)
133 else
134 PROGRAM_BUILD = `date` $(USER)@`hostname`
135 endif
137 # PROGRAM_VERSION is the current vlc version
138 PROGRAM_VERSION=@VLC_VERSION@
139 LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
141 # DEFINE will contain some of the constants definitions decided in Makefile, 
142 # including SYS_xx. It will be passed to C compiler.
143 DEFINE_CONSTANTS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
144 DEFINE += $(DEFINE_CONSTANTS)
146 # On Linux activate 64-bit off_t (by default under BSD)
147 ifneq (,$(findstring linux,$(SYS)))
148 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
149 endif
151 ###############################################################################
152 # Tuning and other variables - do not change anything except if you know
153 # exactly what you are doing
154 ###############################################################################
157 # C headers directories
159 INCLUDE += @INCLUDE@
160 INCLUDE += -Iinclude -Iextras -I/usr/local/include
163 # Libraries needed by built-in modules
165 ifneq (,$(BUILTINS))
166 LIB_BUILTINS := $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
167 LIB += $(LIB_BUILTINS)
168 endif
171 # Libraries
173 ifneq (,$(findstring mingw32,$(SYS)))
174 LIB += -lws2_32 -lnetapi32
175 endif
177 LIB += -L/usr/local/lib @LIB@
180 # C compiler flags: mainstream compilation
182 DEFINE += @DEFINE@
183 CFLAGS += $(DEFINE) $(INCLUDE)
184 CFLAGS += -Wall -Winline
185 CFLAGS += -pipe
186 CFLAGS += -D_REENTRANT
187 CFLAGS += -D_GNU_SOURCE
189 # flags needed for clean beos compilation
190 ifeq ($(SYS),beos)
191 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
192 endif
194 ifneq (,$(findstring darwin,$(SYS)))
195 CFLAGS += -traditional-cpp
196 endif
198 ifneq (,$(findstring mingw32,$(SYS)))
199 CFLAGS += -fnative-struct -D_OFF_T_ -D_off_t=long
200 endif
202 ifneq (,$(findstring bsd,$(SYS)))
203 CFLAGS += -pthread
204 endif
206 # Optimizations : don't compile debug versions with them
207 ifeq ($(OPTIMS),1)
208 CFLAGS += -O3
209 CFLAGS += -ffast-math -funroll-loops
210 ifneq ($(DEBUG),1)
211 ifneq ($(PROFILING),1)
212 CFLAGS += -fomit-frame-pointer
213 endif
214 endif
216 # Optimizations for x86 familiy
217 ifneq (,$(findstring 86,$(ARCH)))
218 # Optional Pentium Pro optimizations
219 ifneq (,$(findstring ppro,$(ARCH)))
220 CFLAGS += -march=pentiumpro -mcpu=pentiumpro
221 else
222 CFLAGS += -march=pentium -mcpu=pentium
223 endif
224 endif
226 # Optimizations for PowerPC
227 ifneq (,$(findstring powerpc,$(ARCH)))
228 CFLAGS += -mmultiple -mhard-float -mstring
229 endif
231 # Optimizations for Sparc
232 ifneq (,$(findstring sparc,$(ARCH)))
233 CFLAGS += -mhard-float
234 endif
236 #end of optimisations
237 endif
240 # C compiler flags: dependancies
242 DCFLAGS += $(INCLUDE)
243 DCFLAGS += -MM
246 # C compiler flags: linking
248 LCFLAGS += @LCFLAGS@ $(LIB)
249 LCFLAGS += -Wall
250 #LCFLAGS += -s
251 ifneq (,$(findstring mingw32,$(SYS)))
252 LCFLAGS += -mwindows -Xlinker --force-exe-suffix
253 endif
256 # C compiler flags: plugin compilation
258 ifneq (,$(findstring mingw32,$(SYS)))
259 PCFLAGS += -fnative-struct
260 else
261 PCFLAGS += -fPIC
262 endif
265 # C compiler flags: plugin linking
267 PLCFLAGS += @PLCFLAGS@
270 # Debugging and profiling support
272 ifeq ($(DEBUG),1)
273 CFLAGS += -g
274 endif
276 ifeq ($(PROFILING),1)
277 CFLAGS += -pg
278 endif