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