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