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