1 ###############################################################################
2 # vlc (VideoLAN Client) options Makefile
4 ###############################################################################
6 ###############################################################################
8 ###############################################################################
10 # Debugging mode on or off (set to 1 to activate)
24 exec_prefix=@exec_prefix@
33 ###############################################################################
34 # Configuration pre-processing
35 ###############################################################################
37 # PROGRAM_OPTIONS is an identification string of the compilation options
38 PROGRAM_OPTIONS = $(SYS) $(ARCH)
40 PROGRAM_OPTIONS += DEBUG
44 PROGRAM_OPTIONS += DEBUG
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)
52 # XXX: beos does not support hostname (how lame...)
53 PROGRAM_BUILD = `date` $(USER)
55 PROGRAM_BUILD = `date` $(USER)@`hostname`
58 # PROGRAM_VERSION is the current vlc version
59 PROGRAM_VERSION=@VLC_VERSION@
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]_')
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
70 ###############################################################################
71 # Tuning and other variables - do not change anything except if you know
72 # exactly what you are doing
73 ###############################################################################
76 # C headers directories
79 INCLUDE += -Iinclude -Iextras -I/usr/local/include
84 LIB = @LIB@ -L/usr/local/lib
87 LIB += -lbe -lroot -lgame
93 # C compiler flags: mainstream compilation
95 CFLAGS += $(DEFINE) $(INCLUDE)
96 CFLAGS += -Wall -Winline
97 CFLAGS += -D_REENTRANT
98 CFLAGS += -D_GNU_SOURCE
100 # flags needed for clean beos compilation
102 CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
105 ifneq (,$(findstring darwin,$(SYS)))
106 CFLAGS += -traditional-cpp
109 # Optimizations : don't compile debug versions with them
112 CFLAGS += -ffast-math -funroll-loops
113 CFLAGS += -fomit-frame-pointer
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
121 CFLAGS += -march=pentium -mcpu=pentium
125 # Optimizations for PowerPC
126 ifneq (,$(findstring powerpc,$(ARCH)))
127 CFLAGS += -mmultiple -mhard-float -mstring
130 # Optimizations for Sparc
131 ifneq (,$(findstring sparc,$(ARCH)))
132 CFLAGS += -mhard-float
135 #end of optimisations
138 # Optional MMX optimizations for x86
139 ifneq (,$(findstring mmx,$(ARCH)))
144 # C compiler flags: dependancies
146 DCFLAGS += $(INCLUDE)
150 # C compiler flags: linking
152 LCFLAGS += @LCFLAGS@ $(LIB)
157 LCFLAGS += -Xlinker -soname=_APP_
159 ifneq (,$(findstring qnx,$(SYS)))
160 LCFLAGS += -Xlinker -export-dynamic
162 ifneq (,$(findstring darwin,$(SYS)))
165 LCFLAGS += --export-dynamic
171 # Debugging and profiling support (unless optimisations are active)