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