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