1
mirror of https://code.videolan.org/videolan/vlc synced 2024-10-07 03:56:28 +02:00
vlc/Makefile.opts.in
Sam Hocevar 76fcb7fc4f * Changed libdvdcss API to force binary incompatibility. Yeah, this is
evil, but if we don't do it now we'll have to do it when more people
    are using it.
  * Fixed minor libdvdcss stuff such as the soname and compilation flags.
  * New --with-dvdcss flag.
    Explanation:
     o default: build libdvdcss, statically link vlc against it.
     o --with-dvdcss=no: build libdvdcss, dynamically link vlc against it.
     o --with-dvdcss=yes: don't build libdvdcss, use already installed one.
     o --with-dvdcss=/foo: don't build libdvdcss, use libdvdcss from /foo/*.
    (this looks a bit strange to me, I'll find better flag settings)
2001-07-27 01:05:17 +00:00

277 lines
5.8 KiB
Makefile

###############################################################################
# vlc (VideoLAN Client) options Makefile
# (c)1998 VideoLAN
###############################################################################
###############################################################################
# Configuration
###############################################################################
#
# Plugins to build
# WARNING: if you do not have a dynamic loader on your platform, remove
# the plugins in this line and put them as built-ins, otherwise your
# application won't be able to load them.
#
PLUGINS :=@PLUGINS@
#
# Built-in modules to build
# WARNING: do NOT put gtk and gnome together in this rule.
#
BUILTINS :=@BUILTINS@
#
# Additional build options
#
SYS = @SYS@
ALIASES =@ALIASES@
INSTALL = @INSTALL@
ARCH = @ARCH@
#
# Compilation options
#
DEBUG = @DEBUG@
STATS = @STATS@
TRACE = @TRACE@
PROFILING = @PROFILING@
OPTIMS = @OPTIMS@
GETOPT = @GETOPT@
#
# Build environment
#
CC = @CC@
CFLAGS = @CFLAGS@
SHELL = @SHELL@
RANLIB = @RANLIB@
WINDRES = @WINDRES@
MOC = @MOC@
#
# Installation environment
#
exec_prefix = @exec_prefix@
prefix = @prefix@
bindir = @bindir@
datadir = @datadir@
libdir = @libdir@
includedir = @includedir@
#
# Libraries for special cases
#
LIB_ALSA = @LIB_ALSA@
LIB_BEOS = @LIB_BEOS@
LIB_DARWIN = @LIB_DARWIN@
LIB_DVD = @LIB_DVD@
LIB_DVD_PLUGIN = @LIB_DVD_PLUGIN@
LIB_ESD = @LIB_ESD@
LIB_GGI = @LIB_GGI@
LIB_GLIDE = @LIB_GLIDE@
LIB_GNOME = @LIB_GNOME@
LIB_GTK = @LIB_GTK@
LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@
LIB_KDE = @LIB_KDE@
LIB_MACOSX = @LIB_MACOSX@
LIB_QNX = @LIB_QNX@
LIB_NCURSES = @LIB_NCURSES@
LIB_QT = @LIB_QT@
LIB_TS = @LIB_TS@
LIB_SDL = @LIB_SDL@
LIB_DIRECTX = @LIB_DIRECTX@
LIB_X11 = @LIB_X11@
LIB_XVIDEO = @LIB_XVIDEO@
LIB_YUV = @LIB_YUV@
#
# CFLAGS for special cases
#
CFLAGS_DVD = @CFLAGS_DVD@
CFLAGS_GTK = @CFLAGS_GTK@
CFLAGS_SDL = @CFLAGS_SDL@
CFLAGS_X11 = @CFLAGS_X11@
#
# Other special cases
#
LOCAL_LIBDVDCSS = @LOCAL_LIBDVDCSS@
###############################################################################
# Configuration pre-processing
###############################################################################
# PROGRAM_OPTIONS is an identification string of the compilation options
PROGRAM_OPTIONS = $(SYS) $(ARCH)
ifeq ($(DEBUG),1)
PROGRAM_OPTIONS += DEBUG
DEFINE += -DDEBUG
endif
ifeq ($(TRACE),1)
PROGRAM_OPTIONS += TRACE
DEFINE += -DTRACE
endif
ifeq ($(PROFILING),1)
PROGRAM_OPTIONS += PROFILING
DEFINE += -DPROFILING
endif
ifeq ($(STATS),1)
PROGRAM_OPTIONS += STATS
DEFINE += -DSTATS
endif
# PROGRAM_BUILD is a complete identification of the build
# (we can't use fancy options with date since OSes like Solaris
# or FreeBSD have strange date implementations)
ifeq ($(SYS),beos)
# XXX: beos does not support hostname (how lame...)
PROGRAM_BUILD = `date` $(USER)
else
PROGRAM_BUILD = `date` $(USER)@`hostname`
endif
# PROGRAM_VERSION is the current vlc version
PROGRAM_VERSION=@VLC_VERSION@
LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
# DEFINE will contain some of the constants definitions decided in Makefile,
# including SYS_xx. It will be passed to C compiler.
DEFINE_CONSTANTS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
DEFINE += $(DEFINE_CONSTANTS)
# On Linux activate 64-bit off_t (by default under BSD)
ifneq (,$(findstring linux,$(SYS)))
DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
endif
###############################################################################
# Tuning and other variables - do not change anything except if you know
# exactly what you are doing
###############################################################################
#
# C headers directories
#
INCLUDE += @INCLUDE@
INCLUDE += -Iinclude -Iextras -I/usr/local/include
#
# Libraries needed by built-in modules
#
ifneq (,$(BUILTINS))
LIB_BUILTINS := $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
LIB += $(LIB_BUILTINS)
endif
#
# Libraries
#
ifneq (,$(findstring mingw32,$(SYS)))
LIB += -lws2_32 -lnetapi32
endif
LIB += -L/usr/local/lib @LIB@
#
# C compiler flags: mainstream compilation
#
DEFINE += @DEFINE@
CFLAGS += $(DEFINE) $(INCLUDE)
CFLAGS += -Wall -Winline
CFLAGS += -pipe
CFLAGS += -D_REENTRANT
CFLAGS += -D_GNU_SOURCE
# flags needed for clean beos compilation
ifeq ($(SYS),beos)
CFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
endif
ifneq (,$(findstring darwin,$(SYS)))
CFLAGS += -traditional-cpp
endif
ifneq (,$(findstring mingw32,$(SYS)))
CFLAGS += -fnative-struct -D_OFF_T_ -D_off_t=long
endif
ifneq (,$(findstring bsd,$(SYS)))
CFLAGS += -pthread
endif
# Optimizations : don't compile debug versions with them
ifeq ($(OPTIMS),1)
CFLAGS += -O3
CFLAGS += -ffast-math -funroll-loops
ifneq ($(DEBUG),1)
ifneq ($(PROFILING),1)
CFLAGS += -fomit-frame-pointer
endif
endif
# Optimizations for x86 familiy
ifneq (,$(findstring 86,$(ARCH)))
# Optional Pentium Pro optimizations
ifneq (,$(findstring ppro,$(ARCH)))
CFLAGS += -march=pentiumpro -mcpu=pentiumpro
else
CFLAGS += -march=pentium -mcpu=pentium
endif
endif
# Optimizations for PowerPC
ifneq (,$(findstring powerpc,$(ARCH)))
CFLAGS += -mmultiple -mhard-float -mstring
endif
# Optimizations for Sparc
ifneq (,$(findstring sparc,$(ARCH)))
CFLAGS += -mhard-float
endif
#end of optimisations
endif
#
# C compiler flags: dependancies
#
DCFLAGS += $(INCLUDE)
DCFLAGS += -MM
#
# C compiler flags: linking
#
LCFLAGS += @LCFLAGS@ $(LIB)
LCFLAGS += -Wall
#LCFLAGS += -s
ifneq (,$(findstring mingw32,$(SYS)))
LCFLAGS += -mwindows -Xlinker --force-exe-suffix
endif
#
# C compiler flags: plugin compilation
#
ifneq (,$(findstring mingw32,$(SYS)))
PCFLAGS += -fnative-struct
else
PCFLAGS += -fPIC
endif
#
# C compiler flags: plugin linking
#
PLCFLAGS += @PLCFLAGS@
#
# Debugging and profiling support
#
ifeq ($(DEBUG),1)
CFLAGS += -g
endif
ifeq ($(PROFILING),1)
CFLAGS += -pg
endif