# (c)1998 VideoLAN
###############################################################################
+HAVE_MAKEFILE_OPTS = 1
+
###############################################################################
# Configuration
###############################################################################
# Compilation options
#
DEBUG = @DEBUG@
-STATS = @STATS@
TRACE = @TRACE@
-PROFILING = @PROFILING@
+CPROF = @CPROF@
+GPROF = @GPROF@
OPTIMS = @OPTIMS@
-GETOPT = @GETOPT@
+TUNING = @TUNING@
+RELEASE = @RELEASE@
#
# Build environment
RANLIB = @RANLIB@
WINDRES = @WINDRES@
MOC = @MOC@
+DLL_PATH = @DLL_PATH@
#
# Installation environment
# Libraries for special cases
#
LIB_ALSA = @LIB_ALSA@
+LIB_ARTS = @LIB_ARTS@
LIB_BEOS = @LIB_BEOS@
LIB_DARWIN = @LIB_DARWIN@
+LIB_DIRECTX = @LIB_DIRECTX@
LIB_DVD = @LIB_DVD@
+LIB_DVD_PLUGIN = @LIB_DVD_PLUGIN@
+LIB_DVDREAD_PLUGIN = @LIB_DVDREAD_PLUGIN@
+LIB_DVDREAD = @LIB_DVDREAD@
+LIB_DVDREAD_PLUGIN = @LIB_DVDREAD_PLUGIN@
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_KDE = @LIB_KDE@
+LIB_LIBDVDCSS = @LIB_LIBDVDCSS@
LIB_MACOSX = @LIB_MACOSX@
+LIB_MAD = @LIB_MAD@
+LIB_MOTIONALTIVEC = @LIB_MOTIONALTIVEC@
+LIB_MPEG_TS = @LIB_MPEG_TS@
LIB_NCURSES = @LIB_NCURSES@
+LIB_QNX = @LIB_QNX@
LIB_QT = @LIB_QT@
-LIB_TS = @LIB_TS@
+LIB_RC = @LIB_RC@
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_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_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
+CFLAGS_MACOSX = @CFLAGS_MACOSX@
+CFLAGS_MAD = @CFLAGS_MAD@
+CFLAGS_MOTIONALTIVEC = @CFLAGS_MOTIONALTIVEC@
+CFLAGS_QT = @CFLAGS_QT@
CFLAGS_SDL = @CFLAGS_SDL@
CFLAGS_X11 = @CFLAGS_X11@
+CFLAGS_XVIDEO = @CFLAGS_XVIDEO@
+
+#
+# Additional objects
+#
+SRC_DVD_EXTRA = @SRC_DVD_EXTRA@
+SRC_DVDCSS_EXTRA = @SRC_DVDCSS_EXTRA@
#
# Other special cases
#
-LOCAL_LIBDVDCSS = @LOCAL_LIBDVDCSS@
+NEED_GETOPT = @NEED_GETOPT@
+NEED_LIBDVDCSS = @NEED_LIBDVDCSS@
###############################################################################
# Configuration pre-processing
PROGRAM_OPTIONS += TRACE
DEFINE += -DTRACE
endif
-ifeq ($(PROFILING),1)
-PROGRAM_OPTIONS += PROFILING
-DEFINE += -DPROFILING
+ifeq ($(CPROF),1)
+PROGRAM_OPTIONS += CPROF
+DEFINE += -DCPROF
endif
-ifeq ($(STATS),1)
-PROGRAM_OPTIONS += STATS
-DEFINE += -DSTATS
+ifeq ($(GPROF),1)
+PROGRAM_OPTIONS += GPROF
+DEFINE += -DGPROF
endif
# PROGRAM_BUILD is a complete identification of the build
# 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)
+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
+
+# 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
# C headers directories
#
INCLUDE += @INCLUDE@
-INCLUDE += -Iinclude -Iextras -I/usr/local/include
+INCLUDE += -Iinclude -Iextras
#
# 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_BUILTINS := $(patsubst %,$$LIB_%,$(shell echo $(BUILTINS) | tr '[a-z]' '[A-Z]'))
LIB += $(LIB_BUILTINS)
-endif
#
# Libraries
#
-ifeq (1,$(LOCAL_LIBDVDCSS))
-ifneq (,$(findstring dvd,$(BUILTINS)))
-LIB += lib/libdvdcss.a
-endif
-endif
-
ifneq (,$(findstring mingw32,$(SYS)))
LIB += -lws2_32 -lnetapi32
endif
-LIB += -L/usr/local/lib @LIB@
+LIB += @LIB@
#
# C compiler flags: mainstream compilation
DEFINE += @DEFINE@
CFLAGS += $(DEFINE) $(INCLUDE)
CFLAGS += -Wall -Winline
+CFLAGS += -pipe
CFLAGS += -D_REENTRANT
CFLAGS += -D_GNU_SOURCE
+ifeq ($(RELEASE),1)
+CFLAGS += -DRELEASE
+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
+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
CFLAGS += -O3
CFLAGS += -ffast-math -funroll-loops
ifneq ($(DEBUG),1)
-ifneq ($(PROFILING),1)
+ifneq ($(GPROF),1)
+ifneq ($(CPROF),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
+# 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
endif
#end of optimisations
#
# C compiler flags: linking
#
-LCFLAGS += @LCFLAGS@ $(LIB)
-LCFLAGS += -Wall
-#LCFLAGS += -s
+LDFLAGS += @LDFLAGS@
+LDFLAGS += $(LIB)
+LDFLAGS += -Wall
+ifneq ($(DEBUG),1)
+ifneq ($(GPROF),1)
+ifneq ($(CPROF),1)
+#LDFLAGS += -s
+endif
+endif
+endif
ifneq (,$(findstring mingw32,$(SYS)))
-LCFLAGS += -mwindows -Xlinker --force-exe-suffix
+LDFLAGS += -mwindows -Xlinker --force-exe-suffix
endif
+#
+# C compiler and linker flags: setting soname
+#
+SOFLAGS = @SOFLAGS@
+
#
# C compiler flags: plugin compilation
#
#
# C compiler flags: plugin linking
#
-PLCFLAGS += @PLCFLAGS@
+PLDFLAGS += @PLDFLAGS@
#
# Debugging and profiling support
CFLAGS += -g
endif
-ifeq ($(PROFILING),1)
+ifeq ($(CPROF),1)
+CFLAGS += -finstrument-functions
+endif
+
+ifeq ($(GPROF),1)
CFLAGS += -pg
endif
+