]> git.sesse.net Git - vlc/blobdiff - Makefile.opts.in
* ./plugins/gtk/gtk.glade, plugins/gtk/gnome.glade, ./plugins/kde/kde.cpp:
[vlc] / Makefile.opts.in
index 8c132af9e0ec3fa8494505e8ed654ba763e6cc50..cbb703b551b8291f211a45fffd5ba997d2dab567 100644 (file)
 # (c)1998 VideoLAN
 ###############################################################################
 
+HAVE_MAKEFILE_OPTS = 1
+
 ###############################################################################
 # Configuration
 ###############################################################################
 
-# Debugging mode on or off (set to 1 to activate)
-DEBUG=@DEBUG@
-STATS=@STATS@
-OPTIMS=@OPTIMS@
-GETOPT=@GETOPT@
+# 
+# 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@
 
-PLUGINS:=@PLUGINS@
-BUILTINS:=@BUILTINS@
+# 
+# Built-in modules to build
+# WARNING: do NOT put gtk and gnome together in this rule.
+# 
+BUILTINS :=@BUILTINS@
 
-SYS=@SYS@
-ALIASES=@ALIASES@
-INSTALL=@INSTALL@
-ARCH=@ARCH@
+# 
+# Additional build options
+# 
+SYS = @SYS@
+ALIASES =@ALIASES@
+INSTALL = @INSTALL@
+ARCH = @ARCH@
 
-exec_prefix=@exec_prefix@
-prefix=@prefix@
-bindir=@bindir@
-datadir=@datadir@
-libdir=@libdir@
+#
+# Compilation options
+#
+DEBUG = @DEBUG@
+CPROF = @CPROF@
+GPROF = @GPROF@
+OPTIMS = @OPTIMS@
+TUNING = @TUNING@
+RELEASE = @RELEASE@
 
-CC=@CC@
-SHELL=@SHELL@
+# 
+# Build environment
+# 
+CC = @CC@
+CFLAGS = @CFLAGS@
+SHELL = @SHELL@
+RANLIB = @RANLIB@
+WINDRES = @WINDRES@
+MOC = @MOC@
+DLL_PATH = @DLL_PATH@
+
+# 
+# Installation environment
+# 
+exec_prefix = @exec_prefix@
+prefix = @prefix@
+bindir = @bindir@
+datadir = @datadir@
+libdir = @libdir@
+includedir = @includedir@
+
+#
+# Libraries for special cases
+#
+LIB_COMMON = @LIB_COMMON@
+LIB_VLC = @LIB_VLC@
+
+LIB_A52 = @LIB_A52@
+LIB_AA = @LIB_AA@
+LIB_ALSA = @LIB_ALSA@
+LIB_ARTS = @LIB_ARTS@
+LIB_BEOS = @LIB_BEOS@
+LIB_CHROMA_I420_RGB = @LIB_CHROMA_I420_RGB@
+LIB_DARWIN = @LIB_DARWIN@
+LIB_DIRECTX = @LIB_DIRECTX@
+LIB_DSP = @LIB_DSP@
+LIB_DVD = @LIB_DVD@
+LIB_DVDREAD = @LIB_DVDREAD@
+LIB_ESD = @LIB_ESD@
+LIB_FILTER_DISTORT = @LIB_FILTER_DISTORT@
+LIB_GGI = @LIB_GGI@
+LIB_GLIDE = @LIB_GLIDE@
+LIB_GNOME = @LIB_GNOME@
+LIB_GTK = @LIB_GTK@
+LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@
+LIB_IMDCT = @LIB_IMDCT@
+LIB_IMDCT3DN = @LIB_IMDCT3DN@
+LIB_IMDCTSSE = @LIB_IMDCTSSE@
+LIB_IPV4 = @LIB_IPV4@
+LIB_IPV6 = @LIB_IPV6@
+LIB_KDE = @LIB_KDE@
+LIB_LIRC = @LIB_LIRC@
+LIB_MACOSX = @LIB_MACOSX@
+LIB_MAD = @LIB_MAD@
+LIB_MEMCPYALTIVEC = @LIB_MEMCPYALTIVEC@
+LIB_MOTIONALTIVEC = @LIB_MOTIONALTIVEC@
+LIB_MPEG_TS = @LIB_MPEG_TS@
+LIB_NCURSES = @LIB_NCURSES@
+LIB_QNX = @LIB_QNX@
+LIB_QT = @LIB_QT@
+LIB_RC = @LIB_RC@
+LIB_SDL = @LIB_SDL@
+LIB_VCD = @LIB_VCD@
+LIB_VORBIS = @LIB_VORBIS@
+LIB_WAVEOUT = @LIB_WAVEOUT@
+LIB_WIN32 = @LIB_WIN32@
+LIB_X11 = @LIB_X11@
+LIB_XVIDEO = @LIB_XVIDEO@
+
+#
+# CFLAGS for special cases
+#
+CFLAGS_COMMON = @CFLAGS_COMMON@
+CFLAGS_VLC = @CFLAGS_VLC@
+
+CFLAGS_ARTS = @CFLAGS_ARTS@
+CFLAGS_DVD = @CFLAGS_DVD@
+CFLAGS_DVDREAD = @CFLAGS_DVDREAD@
+CFLAGS_ESD = @CFLAGS_ESD@
+CFLAGS_GLIDE = @CFLAGS_GLIDE@
+CFLAGS_GNOME = @CFLAGS_GNOME@
+CFLAGS_GTK = @CFLAGS_GTK@
+CFLAGS_KDE = @CFLAGS_KDE@
+CFLAGS_IDCTALTIVEC = @CFLAGS_IDCTALTIVEC@
+CFLAGS_MACOSX = @CFLAGS_MACOSX@
+CFLAGS_MAD = @CFLAGS_MAD@
+CFLAGS_MEMCPYALTIVEC = @CFLAGS_MEMCPYALTIVEC@
+CFLAGS_MOTIONALTIVEC = @CFLAGS_MOTIONALTIVEC@
+CFLAGS_QT = @CFLAGS_QT@
+CFLAGS_SDL = @CFLAGS_SDL@
+CFLAGS_WIN32 = @CFLAGS_WIN32@
+CFLAGS_X11 = @CFLAGS_X11@
+CFLAGS_XVIDEO = @CFLAGS_XVIDEO@
+
+#
+# Other special cases
+#
+NEED_GETOPT = @NEED_GETOPT@
 
 ###############################################################################
 # Configuration pre-processing
@@ -40,9 +150,13 @@ ifeq ($(DEBUG),1)
 PROGRAM_OPTIONS += DEBUG
 DEFINE += -DDEBUG
 endif
-ifeq ($(STATS),1)
-PROGRAM_OPTIONS += DEBUG
-DEFINE += -DSTATS
+ifeq ($(CPROF),1)
+PROGRAM_OPTIONS += CPROF
+DEFINE += -DCPROF
+endif
+ifeq ($(GPROF),1)
+PROGRAM_OPTIONS += GPROF
+DEFINE += -DGPROF
 endif
 
 # PROGRAM_BUILD is a complete identification of the build
@@ -55,17 +169,20 @@ else
 PROGRAM_BUILD = `date` $(USER)@`hostname`
 endif
 
-# PROGRAM_VERSION is the current vlc version
-PROGRAM_VERSION=@VLC_VERSION@
-
 # DEFINE will contain some of the constants definitions decided in Makefile, 
 # including SYS_xx. It will be passed to C compiler.
-DEFINE += -DSYS_$(shell echo $(SYS) | sed 's/-.*//' | tr '[a-z].' '[A-Z]_')
+DEFINE_SYS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
+DEFINE += $(DEFINE_SYS)
 
-# 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
+# On Linux and Solaris, activate 64-bit off_t (by default under BSD)
+DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE
+
+# Gettext support
+DEFINE += -DLOCALEDIR=\"$(datadir)/locale\"
+
+# Data and plugin location
+DEFINE += -DDATA_PATH=\"@prefix@/share/videolan\"
+DEFINE += -DPLUGIN_PATH=\"@prefix@/lib/videolan/vlc\"
 
 ###############################################################################
 # Tuning and other variables - do not change anything except if you know
@@ -76,101 +193,133 @@ endif
 # C headers directories
 #
 INCLUDE += @INCLUDE@
-INCLUDE += -Iinclude -Iextras -I/usr/local/include
+INCLUDE += -Iinclude -Iextras
 
 #
-# Libraries
+# Libraries needed by built-in modules
 #
-LIB = @LIB@ -L/usr/local/lib
+LIB_BUILTINS := $(patsubst %,$$LIB_%,$(shell echo $(BUILTINS) | tr '[a-z]' '[A-Z]'))
 
-ifeq ($(SYS),beos)
-LIB += -lbe -lroot -lgame
-else
-LIB += -lm
+#
+# Libraries needed by the vlc executable
+#
+ifneq (,$(findstring mingw32,$(SYS)))
+LIB_VLC += -lws2_32 -lnetapi32
 endif
 
 #
 # C compiler flags: mainstream compilation
 #
 CFLAGS += $(DEFINE) $(INCLUDE)
-CFLAGS += -Wall -Winline
 CFLAGS += -D_REENTRANT
 CFLAGS += -D_GNU_SOURCE
 
+ifeq ($(RELEASE),1)
+CFLAGS += -DHAVE_RELEASE
+endif
+
 # 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
+CFLAGS += -no-cpp-precomp
+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
-CFLAGS += -fomit-frame-pointer
-
-# 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
+CFLAGS += @CFLAGS_OPTIM@
+ifneq ($(DEBUG),1)
+ifneq ($(GPROF),1)
+ifneq ($(CPROF),1)
+CFLAGS += @CFLAGS_OPTIM_NODEBUG@
+endif
 endif
 endif
 
-# Optimizations for PowerPC
 ifneq (,$(findstring powerpc,$(ARCH)))
-CFLAGS += -mmultiple -mhard-float -mstring
+# Optimizations for PowerPC
+CFLAGS += -mmultiple -mhard-float -mstring -mcpu=powerpc
+ifneq (,$(TUNING))
+CFLAGS += -mtune=$(TUNING)
 endif
-
-# Optimizations for Sparc
+else
 ifneq (,$(findstring sparc,$(ARCH)))
+# Optimizations for Sparc
 CFLAGS += -mhard-float
+ifneq (,$(TUNING))
+CFLAGS += -mcpu=$(TUNING)
+endif
+else
+# Generic optimizations
+ifneq (,$(TUNING))
+CFLAGS += -mcpu=$(TUNING)
+endif
 endif
-
-#end of optimisations
 endif
 
-# Optional MMX optimizations for x86
-ifneq (,$(findstring mmx,$(ARCH)))
-CFLAGS += -DHAVE_MMX
+#end of optimisations
 endif
 
 #
 # C compiler flags: dependancies
 #
 DCFLAGS += $(INCLUDE)
-DCFLAGS += -MM
+DCFLAGS += -M
 
 #
 # C compiler flags: linking
 #
-LCFLAGS += @LCFLAGS@ $(LIB)
-LCFLAGS += -Wall
-#LCFLAGS += -s
-
-ifeq ($(SYS),beos)
-LCFLAGS += -Xlinker -soname=_APP_
-else
-ifneq (,$(findstring qnx,$(SYS)))
-LCFLAGS += -Xlinker -export-dynamic
-else
-ifneq (,$(findstring darwin,$(SYS)))
-LCFLAGS += -dyn
-else
-LCFLAGS += --export-dynamic
+LDFLAGS += @LDFLAGS@
+LDFLAGS += $(LIB)
+LDFLAGS += -Wall
+ifneq ($(DEBUG),1)
+ifneq ($(GPROF),1)
+ifneq ($(CPROF),1)
+#LDFLAGS += -s
+endif
 endif
 endif
+ifneq (,$(findstring mingw32,$(SYS)))
+LDFLAGS += -mwindows -Xlinker --force-exe-suffix
+endif
+
+#
+# C compiler flags: plugin compilation
+#
+ifneq (,$(findstring mingw32,$(SYS)))
+PCFLAGS += -fnative-struct
+else
+PCFLAGS += -fPIC
 endif
 
 #
-# Debugging and profiling support (unless optimisations are active)
+# C compiler flags: plugin linking
+#
+PLDFLAGS += @PLDFLAGS@
+
+#
+# Debugging and profiling support
 #
-ifneq ($(OPTIMS),1)
+ifeq ($(DEBUG),1)
 CFLAGS += -g
 endif
 
+ifeq ($(CPROF),1)
+CFLAGS += -finstrument-functions
+endif
+
+ifeq ($(GPROF),1)
+CFLAGS += -pg
+endif
+
+