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