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