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