Makefile.opts.in 6.13 KB
Newer Older
Sam Hocevar's avatar
 
Sam Hocevar committed
1 2 3 4 5
###############################################################################
# vlc (VideoLAN Client) options Makefile
# (c)1998 VideoLAN
###############################################################################

Sam Hocevar's avatar
 
Sam Hocevar committed
6 7
HAVE_MAKEFILE_OPTS = 1

Sam Hocevar's avatar
 
Sam Hocevar committed
8 9 10 11
###############################################################################
# Configuration
###############################################################################

Sam Hocevar's avatar
 
Sam Hocevar committed
12
# 
13
# Build options
Sam Hocevar's avatar
 
Sam Hocevar committed
14
# 
Sam Hocevar's avatar
 
Sam Hocevar committed
15 16 17 18 19
SYS = @SYS@
ALIASES =@ALIASES@
INSTALL = @INSTALL@
ARCH = @ARCH@

Sam Hocevar's avatar
 
Sam Hocevar committed
20 21 22 23
#
# Compilation options
#
DEBUG = @DEBUG@
Sam Hocevar's avatar
 
Sam Hocevar committed
24 25
CPROF = @CPROF@
GPROF = @GPROF@
Sam Hocevar's avatar
 
Sam Hocevar committed
26
OPTIMS = @OPTIMS@
27
TUNING = @TUNING@
28
RELEASE = @RELEASE@
Sam Hocevar's avatar
 
Sam Hocevar committed
29

Sam Hocevar's avatar
 
Sam Hocevar committed
30 31 32 33
# 
# Build environment
# 
CC = @CC@
Sam Hocevar's avatar
 
Sam Hocevar committed
34
CFLAGS = @CFLAGS@
Sam Hocevar's avatar
 
Sam Hocevar committed
35
SHELL = @SHELL@
Sam Hocevar's avatar
 
Sam Hocevar committed
36
RANLIB = @RANLIB@
Sam Hocevar's avatar
 
Sam Hocevar committed
37
STRIP = @STRIP@
Sam Hocevar's avatar
 
Sam Hocevar committed
38
MOC = @MOC@
Sam Hocevar's avatar
 
Sam Hocevar committed
39 40
WINDRES = @WINDRES@
BCBUILDER = @BCBUILDER@
Sam Hocevar's avatar
 
Sam Hocevar committed
41 42 43 44 45 46 47 48 49

# 
# Installation environment
# 
exec_prefix = @exec_prefix@
prefix = @prefix@
bindir = @bindir@
datadir = @datadir@
libdir = @libdir@
Sam Hocevar's avatar
 
Sam Hocevar committed
50
includedir = @includedir@
Sam Hocevar's avatar
 
Sam Hocevar committed
51

Sam Hocevar's avatar
 
Sam Hocevar committed
52
#
Sam Hocevar's avatar
 
Sam Hocevar committed
53
# CFLAGS for special cases
Sam Hocevar's avatar
 
Sam Hocevar committed
54
#
Sam Hocevar's avatar
 
Sam Hocevar committed
55 56 57 58
vlc_CFLAGS = @vlc_CFLAGS@
plugins_CFLAGS := @plugins_CFLAGS@
builtins_CFLAGS := @builtins_CFLAGS@

Gildas Bazin's avatar
 
Gildas Bazin committed
59
a52_CFLAGS = @a52_CFLAGS@
Sam Hocevar's avatar
 
Sam Hocevar committed
60
arts_CFLAGS = @arts_CFLAGS@
Sam Hocevar's avatar
Sam Hocevar committed
61 62
chroma_i420_yuy2_mmx_CFLAGS = @chroma_i420_yuy2_mmx_CFLAGS@
directx_CFLAGS = @directx_CFLAGS@
Sam Hocevar's avatar
 
Sam Hocevar committed
63 64 65
dvd_CFLAGS = @dvd_CFLAGS@
dvdread_CFLAGS = @dvdread_CFLAGS@
esd_CFLAGS = @esd_CFLAGS@
66
ffmpeg_CFLAGS = @ffmpeg_CFLAGS@
Sam Hocevar's avatar
 
Sam Hocevar committed
67 68 69 70
glide_CFLAGS = @glide_CFLAGS@
gnome_CFLAGS = @gnome_CFLAGS@
gtk_CFLAGS = @gtk_CFLAGS@
idctaltivec_CFLAGS = @idctaltivec_CFLAGS@
Sam Hocevar's avatar
Sam Hocevar committed
71
kde_CFLAGS = @kde_CFLAGS@
Sam Hocevar's avatar
 
Sam Hocevar committed
72 73 74
mad_CFLAGS = @mad_CFLAGS@
memcpyaltivec_CFLAGS = @memcpyaltivec_CFLAGS@
motionaltivec_CFLAGS = @motionaltivec_CFLAGS@
Sam Hocevar's avatar
Sam Hocevar committed
75
mpeg_ts_dvbpsi_CFLAGS = @mpeg_ts_dvbpsi_CFLAGS@
Sam Hocevar's avatar
 
Sam Hocevar committed
76 77 78 79
qt_CFLAGS = @qt_CFLAGS@
sdl_CFLAGS = @sdl_CFLAGS@
x11_CFLAGS = @x11_CFLAGS@
xvideo_CFLAGS = @xvideo_CFLAGS@
Sam Hocevar's avatar
 
Sam Hocevar committed
80

Sam Hocevar's avatar
 
Sam Hocevar committed
81
#
Sam Hocevar's avatar
 
Sam Hocevar committed
82
# Libraries for special cases
Sam Hocevar's avatar
 
Sam Hocevar committed
83
#
Sam Hocevar's avatar
 
Sam Hocevar committed
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
vlc_LDFLAGS = @vlc_LDFLAGS@
plugins_LDFLAGS += @plugins_LDFLAGS@
builtins_LDFLAGS += @builtins_LDFLAGS@

a52_LDFLAGS = @a52_LDFLAGS@
aa_LDFLAGS = @aa_LDFLAGS@
alsa_LDFLAGS = @alsa_LDFLAGS@
arts_LDFLAGS = @arts_LDFLAGS@
beos_LDFLAGS = @beos_LDFLAGS@
chroma_i420_rgb_LDFLAGS = @chroma_i420_rgb_LDFLAGS@
directx_LDFLAGS = @directx_LDFLAGS@
dsp_LDFLAGS = @dsp_LDFLAGS@
dvd_LDFLAGS = @dvd_LDFLAGS@
dvdread_LDFLAGS = @dvdread_LDFLAGS@
esd_LDFLAGS = @esd_LDFLAGS@
filter_distort_LDFLAGS = @filter_distort_LDFLAGS@
100
ffmpeg_LDFLAGS = @ffmpeg_LDFLAGS@
Sam Hocevar's avatar
 
Sam Hocevar committed
101 102 103 104
ggi_LDFLAGS = @ggi_LDFLAGS@
glide_LDFLAGS = @glide_LDFLAGS@
gnome_LDFLAGS = @gnome_LDFLAGS@
gtk_LDFLAGS = @gtk_LDFLAGS@
105
http_LDFLAGS = @http_LDFLAGS@
Sam Hocevar's avatar
 
Sam Hocevar committed
106 107 108 109 110
idctaltivec_LDFLAGS = @idctaltivec_LDFLAGS@
imdct_LDFLAGS = @imdct_LDFLAGS@
imdct3dn_LDFLAGS = @imdct3dn_LDFLAGS@
imdctsse_LDFLAGS = @imdctsse_LDFLAGS@
ipv4_LDFLAGS = @ipv4_LDFLAGS@
Gildas Bazin's avatar
 
Gildas Bazin committed
111
ipv6_LDFLAGS = @ipv6_LDFLAGS@
Sam Hocevar's avatar
 
Sam Hocevar committed
112 113 114 115 116 117
kde_LDFLAGS = @kde_LDFLAGS@
lirc_LDFLAGS = @lirc_LDFLAGS@
macosx_LDFLAGS = @macosx_LDFLAGS@
mad_LDFLAGS = @mad_LDFLAGS@
memcpyaltivec_LDFLAGS = @memcpyaltivec_LDFLAGS@
motionaltivec_LDFLAGS = @motionaltivec_LDFLAGS@
Sam Hocevar's avatar
Sam Hocevar committed
118
mpeg_ts_dvbpsi_LDFLAGS = @mpeg_ts_dvbpsi_LDFLAGS@
Sam Hocevar's avatar
 
Sam Hocevar committed
119 120 121 122 123 124 125 126 127 128
ncurses_LDFLAGS = @ncurses_LDFLAGS@
qnx_LDFLAGS = @qnx_LDFLAGS@
qt_LDFLAGS = @qt_LDFLAGS@
rc_LDFLAGS = @rc_LDFLAGS@
sdl_LDFLAGS = @sdl_LDFLAGS@
vcd_LDFLAGS = @vcd_LDFLAGS@
vorbis_LDFLAGS = @vorbis_LDFLAGS@
waveout_LDFLAGS = @waveout_LDFLAGS@
x11_LDFLAGS = @x11_LDFLAGS@
xvideo_LDFLAGS = @xvideo_LDFLAGS@
Sam Hocevar's avatar
 
Sam Hocevar committed
129

Sam Hocevar's avatar
 
Sam Hocevar committed
130 131 132 133
#
# Other special cases
#
NEED_GETOPT = @NEED_GETOPT@
Sam Hocevar's avatar
 
Sam Hocevar committed
134

Sam Hocevar's avatar
 
Sam Hocevar committed
135 136 137 138 139 140 141 142
###############################################################################
# Configuration pre-processing
###############################################################################

# PROGRAM_OPTIONS is an identification string of the compilation options
PROGRAM_OPTIONS = $(SYS) $(ARCH)
ifeq ($(DEBUG),1)
PROGRAM_OPTIONS += DEBUG
Sam Hocevar's avatar
 
Sam Hocevar committed
143
CFLAGS += -DDEBUG
Sam Hocevar's avatar
 
Sam Hocevar committed
144
endif
Sam Hocevar's avatar
 
Sam Hocevar committed
145 146
ifeq ($(CPROF),1)
PROGRAM_OPTIONS += CPROF
Sam Hocevar's avatar
 
Sam Hocevar committed
147
CFLAGS += -DCPROF
Sam Hocevar's avatar
 
Sam Hocevar committed
148 149 150
endif
ifeq ($(GPROF),1)
PROGRAM_OPTIONS += GPROF
Sam Hocevar's avatar
 
Sam Hocevar committed
151
CFLAGS += -DGPROF
Sam Hocevar's avatar
 
Sam Hocevar committed
152
endif
Sam Hocevar's avatar
 
Sam Hocevar committed
153 154 155 156 157 158 159 160 161 162 163

# PROGRAM_BUILD is a complete identification of the build
# (we can't use fancy options with date since OSes like Solaris
# or FreeBSD have strange date implementations)
ifeq ($(SYS),beos)
# XXX: beos does not support hostname (how lame...)
PROGRAM_BUILD = `date` $(USER)
else
PROGRAM_BUILD = `date` $(USER)@`hostname`
endif

Sam Hocevar's avatar
 
Sam Hocevar committed
164
# On Linux and Solaris, activate 64-bit off_t (by default under BSD)
Sam Hocevar's avatar
 
Sam Hocevar committed
165
CFLAGS += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE
Sam Hocevar's avatar
 
Sam Hocevar committed
166 167

# Gettext support
Sam Hocevar's avatar
 
Sam Hocevar committed
168
CFLAGS += -DLOCALEDIR=\"$(datadir)/locale\"
Sam Hocevar's avatar
 
Sam Hocevar committed
169

Sam Hocevar's avatar
 
Sam Hocevar committed
170
# Data and plugin location
171 172
CFLAGS += -DDATA_PATH=\"@prefix@/share/vlc\"
CFLAGS += -DPLUGIN_PATH=\"@prefix@/lib/vlc\"
Sam Hocevar's avatar
 
Sam Hocevar committed
173

Sam Hocevar's avatar
 
Sam Hocevar committed
174 175 176 177 178 179 180 181
###############################################################################
# Tuning and other variables - do not change anything except if you know
# exactly what you are doing
###############################################################################

#
# C headers directories
#
Sam Hocevar's avatar
 
Sam Hocevar committed
182
CFLAGS += -Iinclude -Iextras
Sam Hocevar's avatar
 
Sam Hocevar committed
183

Sam Hocevar's avatar
 
Sam Hocevar committed
184 185 186
#
# C compiler flags: mainstream compilation
#
187
CFLAGS += -D_REENTRANT -D_THREAD_SAFE
Sam Hocevar's avatar
 
Sam Hocevar committed
188 189
CFLAGS += -D_GNU_SOURCE

190
ifeq ($(RELEASE),1)
Sam Hocevar's avatar
 
Sam Hocevar committed
191
CFLAGS += -DHAVE_RELEASE
192 193
endif

194 195
CFLAGS += -D__VLC__

Sam Hocevar's avatar
 
Sam Hocevar committed
196 197
# Optimizations : don't compile debug versions with them
ifeq ($(OPTIMS),1)
Sam Hocevar's avatar
 
Sam Hocevar committed
198
CFLAGS += @CFLAGS_OPTIM@
199
ifneq ($(DEBUG),1)
Sam Hocevar's avatar
 
Sam Hocevar committed
200 201
ifneq ($(GPROF),1)
ifneq ($(CPROF),1)
Sam Hocevar's avatar
 
Sam Hocevar committed
202
CFLAGS += @CFLAGS_OPTIM_NODEBUG@
203
endif
Sam Hocevar's avatar
 
Sam Hocevar committed
204
endif
Sam Hocevar's avatar
 
Sam Hocevar committed
205
endif
Sam Hocevar's avatar
 
Sam Hocevar committed
206 207

ifneq (,$(findstring powerpc,$(ARCH)))
Christophe Massiot's avatar
Christophe Massiot committed
208
# Optimizations for PowerPC
209
CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
Christophe Massiot's avatar
Christophe Massiot committed
210
ifneq (,$(TUNING))
211
CFLAGS += -mtune=$(TUNING)
Sam Hocevar's avatar
 
Sam Hocevar committed
212
endif
Christophe Massiot's avatar
Christophe Massiot committed
213
else
Sam Hocevar's avatar
 
Sam Hocevar committed
214
ifneq (,$(findstring sparc,$(ARCH)))
Christophe Massiot's avatar
Christophe Massiot committed
215
# Optimizations for Sparc
Sam Hocevar's avatar
 
Sam Hocevar committed
216
CFLAGS += -mhard-float
Christophe Massiot's avatar
Christophe Massiot committed
217 218 219 220 221 222 223 224 225
ifneq (,$(TUNING))
CFLAGS += -mcpu=$(TUNING)
endif
else
# Generic optimizations
ifneq (,$(TUNING))
CFLAGS += -mcpu=$(TUNING)
endif
endif
Sam Hocevar's avatar
 
Sam Hocevar committed
226 227 228 229 230 231 232 233
endif

#end of optimisations
endif

#
# C compiler flags: linking
#
Sam Hocevar's avatar
 
Sam Hocevar committed
234 235
LDFLAGS += @LDFLAGS@
LDFLAGS += -Wall
236 237 238
ifneq ($(DEBUG),1)
ifneq ($(GPROF),1)
ifneq ($(CPROF),1)
Sam Hocevar's avatar
 
Sam Hocevar committed
239
#LDFLAGS += -s
240 241 242
endif
endif
endif
Sam Hocevar's avatar
 
Sam Hocevar committed
243

Sam Hocevar's avatar
 
Sam Hocevar committed
244
#
Sam Hocevar's avatar
 
Sam Hocevar committed
245
# C compiler flags: plugins and builtins compilation
Sam Hocevar's avatar
 
Sam Hocevar committed
246
#
247 248
plugins_CFLAGS += -D__PLUGIN__ -I../../include -I../../extras
builtins_CFLAGS += -D__BUILTIN__ -I../../include -I../../extras
Sam Hocevar's avatar
 
Sam Hocevar committed
249 250

#
Sam Hocevar's avatar
 
Sam Hocevar committed
251
# Linker flags: plugins and builtins linking
Sam Hocevar's avatar
 
Sam Hocevar committed
252
#
Sam Hocevar's avatar
 
Sam Hocevar committed
253
builtins_LDFLAGS += $(patsubst %,$$%_LDFLAGS,$(BUILTINS))
Sam Hocevar's avatar
 
Sam Hocevar committed
254

Sam Hocevar's avatar
 
Sam Hocevar committed
255
#
256
# Debugging and profiling support
Sam Hocevar's avatar
 
Sam Hocevar committed
257
#
258
ifeq ($(DEBUG),1)
Sam Hocevar's avatar
 
Sam Hocevar committed
259 260 261
CFLAGS += -g
endif

Sam Hocevar's avatar
 
Sam Hocevar committed
262 263 264 265 266
ifeq ($(CPROF),1)
CFLAGS += -finstrument-functions
endif

ifeq ($(GPROF),1)
Sam Hocevar's avatar
 
Sam Hocevar committed
267 268 269
CFLAGS += -pg
endif

Sam Hocevar's avatar
 
Sam Hocevar committed
270