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