]> git.sesse.net Git - vlc/blobdiff - Makefile.opts.in
Fixed bugs in the MacOS X port.
[vlc] / Makefile.opts.in
index e1ee21e0aee9c3b8cb7ced4407b129e0d594058e..ff60ce25f531877ef0b4e32b43198c50cfc32bb8 100644 (file)
@@ -3,31 +3,53 @@
 # (c)1998 VideoLAN
 ###############################################################################
 
+HAVE_MAKEFILE_OPTS = 1
+
 ###############################################################################
 # Configuration
 ###############################################################################
 
-#
-# Compilation options
-#
-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@
 
+# 
+# Additional build options
+# 
 SYS = @SYS@
 ALIASES =@ALIASES@
 INSTALL = @INSTALL@
 ARCH = @ARCH@
 
+#
+# Compilation options
+#
+DEBUG = @DEBUG@
+STATS = @STATS@
+TRACE = @TRACE@
+CPROF = @CPROF@
+GPROF = @GPROF@
+OPTIMS = @OPTIMS@
+
 # 
 # Build environment
 # 
 CC = @CC@
+CFLAGS = @CFLAGS@
 SHELL = @SHELL@
+RANLIB = @RANLIB@
+WINDRES = @WINDRES@
+MOC = @MOC@
 
 # 
 # Installation environment
@@ -37,28 +59,57 @@ prefix = @prefix@
 bindir = @bindir@
 datadir = @datadir@
 libdir = @libdir@
+includedir = @includedir@
 
 #
 # Libraries for special cases
 #
 LIB_ALSA = @LIB_ALSA@
+LIB_ALTIVEC = @LIB_ALTIVEC@
 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_LIBDVDCSS = @LIB_LIBDVDCSS@
+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_ALTIVEC = @CFLAGS_ALTIVEC@
+CFLAGS_DVD = @CFLAGS_DVD@
+CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
+CFLAGS_GTK = @CFLAGS_GTK@
+CFLAGS_SDL = @CFLAGS_SDL@
+CFLAGS_X11 = @CFLAGS_X11@
+
+#
+# Additional objects
+#
+OBJ_DVD = @OBJ_DVD@
+OBJ_LIBDVDCSS = @OBJ_LIBDVDCSS@
+
+#
+# Other special cases
+#
+NEED_GETOPT = @NEED_GETOPT@
+NEED_LIBDVDCSS = @NEED_LIBDVDCSS@
+
 ###############################################################################
 # Configuration pre-processing
 ###############################################################################
@@ -69,8 +120,20 @@ ifeq ($(DEBUG),1)
 PROGRAM_OPTIONS += DEBUG
 DEFINE += -DDEBUG
 endif
+ifeq ($(TRACE),1)
+PROGRAM_OPTIONS += TRACE
+DEFINE += -DTRACE
+endif
+ifeq ($(CPROF),1)
+PROGRAM_OPTIONS += CPROF
+DEFINE += -DCPROF
+endif
+ifeq ($(GPROF),1)
+PROGRAM_OPTIONS += GPROF
+DEFINE += -DGPROF
+endif
 ifeq ($(STATS),1)
-PROGRAM_OPTIONS += DEBUG
+PROGRAM_OPTIONS += STATS
 DEFINE += -DSTATS
 endif
 
@@ -86,15 +149,15 @@ 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 += -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
+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)))
+# On Linux and Solaris, activate 64-bit off_t (by default under BSD)
 DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
-endif
 
 ###############################################################################
 # Tuning and other variables - do not change anything except if you know
@@ -105,23 +168,35 @@ 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
+# Let's go for a crude hack !
+LIB_MOTIONALTIVEC := $(LIB_ALTIVEC)
+LIB_IDCTALTIVEC := $(LIB_ALTIVEC)
+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 needed by built-in modules
+# Libraries
 #
-LIB += $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
+ifneq (,$(findstring mingw32,$(SYS)))
+LIB += -lws2_32 -lnetapi32
+endif
+
+LIB += @LIB@
 
 #
 # C compiler flags: mainstream compilation
 #
+DEFINE += @DEFINE@
 CFLAGS += $(DEFINE) $(INCLUDE)
 CFLAGS += -Wall -Winline
+CFLAGS += -pipe
 CFLAGS += -D_REENTRANT
 CFLAGS += -D_GNU_SOURCE
 
@@ -134,11 +209,25 @@ 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 ($(GPROF),1)
+ifneq ($(CPROF),1)
 CFLAGS += -fomit-frame-pointer
+endif
+endif
+endif
 
 # Optimizations for x86 familiy
 ifneq (,$(findstring 86,$(ARCH)))
@@ -163,11 +252,6 @@ endif
 #end of optimisations
 endif
 
-# Optional MMX optimizations for x86
-ifneq (,$(findstring mmx,$(ARCH)))
-CFLAGS += -DHAVE_MMX
-endif
-
 #
 # C compiler flags: dependancies
 #
@@ -179,26 +263,49 @@ DCFLAGS += -MM
 #
 LCFLAGS += @LCFLAGS@ $(LIB)
 LCFLAGS += -Wall
+ifneq ($(DEBUG),1)
+ifneq ($(GPROF),1)
+ifneq ($(CPROF),1)
 #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
 endif
+ifneq (,$(findstring mingw32,$(SYS)))
+LCFLAGS += -mwindows -Xlinker --force-exe-suffix
+endif
+
+#
+# C compiler and linker flags: setting soname
+#
+SOFLAGS = @SOFLAGS@
+
+#
+# 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
 #
-ifneq ($(OPTIMS),1)
+PLCFLAGS += @PLCFLAGS@
+
+#
+# Debugging and profiling support
+#
+ifeq ($(DEBUG),1)
 CFLAGS += -g
 endif
 
+ifeq ($(CPROF),1)
+CFLAGS += -finstrument-functions
+endif
+
+ifeq ($(GPROF),1)
+CFLAGS += -pg
+endif
+
+