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