]> git.sesse.net Git - vlc/blobdiff - Makefile.opts.in
* DirectX plugin by Gildas Bazin <gbazin@netcourrier.com>.
[vlc] / Makefile.opts.in
index 8c132af9e0ec3fa8494505e8ed654ba763e6cc50..13fcf0d960194957d6fa37b998d2c106f63ad80f 100644 (file)
@@ -7,28 +7,82 @@
 # 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@
+
+# 
+# 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@
 
-PLUGINS:=@PLUGINS@
-BUILTINS:=@BUILTINS@
-
-SYS=@SYS@
-ALIASES=@ALIASES@
-INSTALL=@INSTALL@
-ARCH=@ARCH@
+#
+# Compilation options
+#
+DEBUG = @DEBUG@
+STATS = @STATS@
+TRACE = @TRACE@
+OPTIMS = @OPTIMS@
+GETOPT = @GETOPT@
+
+# 
+# Build environment
+# 
+CC = @CC@
+CFLAGS = @CFLAGS@
+SHELL = @SHELL@
+RANLIB = @RANLIB@
+MOC = @MOC@
+
+# 
+# Installation environment
+# 
+exec_prefix = @exec_prefix@
+prefix = @prefix@
+bindir = @bindir@
+datadir = @datadir@
+libdir = @libdir@
 
-exec_prefix=@exec_prefix@
-prefix=@prefix@
-bindir=@bindir@
-datadir=@datadir@
-libdir=@libdir@
+#
+# Libraries for special cases
+#
+LIB_ALSA = @LIB_ALSA@
+LIB_BEOS = @LIB_BEOS@
+LIB_DARWIN = @LIB_DARWIN@
+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_MACOSX = @LIB_MACOSX@
+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@
 
-CC=@CC@
-SHELL=@SHELL@
+#
+# CFLAGS for special cases
+#
+CFLAGS_GTK = @CFLAGS_GTK@
+CFLAGS_X11 = @CFLAGS_X11@
 
 ###############################################################################
 # Configuration pre-processing
@@ -40,8 +94,12 @@ ifeq ($(DEBUG),1)
 PROGRAM_OPTIONS += DEBUG
 DEFINE += -DDEBUG
 endif
+ifeq ($(TRACE),1)
+PROGRAM_OPTIONS += TRACE
+DEFINE += -DTRACE
+endif
 ifeq ($(STATS),1)
-PROGRAM_OPTIONS += DEBUG
+PROGRAM_OPTIONS += STATS
 DEFINE += -DSTATS
 endif
 
@@ -60,7 +118,7 @@ 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 += -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
 
 # On Linux activate 64-bit off_t (by default under BSD)
 ifneq (,$(findstring linux,$(SYS)))
@@ -81,17 +139,23 @@ INCLUDE += -Iinclude -Iextras -I/usr/local/include
 #
 # Libraries
 #
-LIB = @LIB@ -L/usr/local/lib
+LIB += @LIB@ -L/usr/local/lib
 
-ifeq ($(SYS),beos)
-LIB += -lbe -lroot -lgame
-else
-LIB += -lm
+ifneq (,$(findstring mingw32,$(SYS)))
+LIB += -lws2_32 -lnetapi32
+endif
+
+#
+# Libraries needed by built-in modules
+#
+ifneq (,$(BUILTINS))
+LIB += $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
 endif
 
 #
 # C compiler flags: mainstream compilation
 #
+DEFINE += @DEFINE@
 CFLAGS += $(DEFINE) $(INCLUDE)
 CFLAGS += -Wall -Winline
 CFLAGS += -D_REENTRANT
@@ -110,7 +174,9 @@ endif
 ifeq ($(OPTIMS),1)
 CFLAGS += -O3
 CFLAGS += -ffast-math -funroll-loops
+ifneq ($(DEBUG),1)
 CFLAGS += -fomit-frame-pointer
+endif
 
 # Optimizations for x86 familiy
 ifneq (,$(findstring 86,$(ARCH)))
@@ -135,11 +201,6 @@ endif
 #end of optimisations
 endif
 
-# Optional MMX optimizations for x86
-ifneq (,$(findstring mmx,$(ARCH)))
-CFLAGS += -DHAVE_MMX
-endif
-
 #
 # C compiler flags: dependancies
 #
@@ -152,25 +213,14 @@ DCFLAGS += -MM
 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
-endif
-endif
+ifneq (,$(findstring mingw32,$(SYS)))
+LCFLAGS += -Xlinker --force-exe-suffix
 endif
 
 #
-# Debugging and profiling support (unless optimisations are active)
+# Debugging and profiling support
 #
-ifneq ($(OPTIMS),1)
+ifeq ($(DEBUG),1)
 CFLAGS += -g
 endif