X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=Makefile.opts.in;h=51fa4b87cf206902d90ba2b0f868b7304e549f0e;hb=8f954dc42ff59cdb32d8c217e9cd705691635605;hp=c7a5d6fe3548538bca36d67125908fb575fcd1d4;hpb=460360a85e2aa56f437ddb3ed25a7366a09569f5;p=vlc diff --git a/Makefile.opts.in b/Makefile.opts.in index c7a5d6fe35..51fa4b87cf 100644 --- a/Makefile.opts.in +++ b/Makefile.opts.in @@ -35,11 +35,11 @@ ARCH = @ARCH@ # Compilation options # DEBUG = @DEBUG@ -STATS = @STATS@ TRACE = @TRACE@ -PROFILING = @PROFILING@ +CPROF = @CPROF@ +GPROF = @GPROF@ OPTIMS = @OPTIMS@ -GETOPT = @GETOPT@ +TUNING = @TUNING@ # # Build environment @@ -65,6 +65,7 @@ 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@ @@ -74,7 +75,7 @@ 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@ @@ -90,16 +91,24 @@ 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@ # -# Other special cases +# Additional objects # OBJ_DVD = @OBJ_DVD@ -LOCAL_LIBDVDCSS = @LOCAL_LIBDVDCSS@ +OBJ_LIBDVDCSS = @OBJ_LIBDVDCSS@ + +# +# Other special cases +# +NEED_GETOPT = @NEED_GETOPT@ +NEED_LIBDVDCSS = @NEED_LIBDVDCSS@ ############################################################################### # Configuration pre-processing @@ -115,13 +124,13 @@ ifeq ($(TRACE),1) 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 @@ -143,10 +152,8 @@ LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@ 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 @@ -157,11 +164,14 @@ endif # C headers directories # INCLUDE += @INCLUDE@ -INCLUDE += -Iinclude -Iextras -I/usr/local/include +INCLUDE += -Iinclude -Iextras # # Libraries needed by built-in modules # +# 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) @@ -174,7 +184,7 @@ ifneq (,$(findstring mingw32,$(SYS))) LIB += -lws2_32 -lnetapi32 endif -LIB += -L/usr/local/lib @LIB@ +LIB += @LIB@ # # C compiler flags: mainstream compilation @@ -192,7 +202,7 @@ 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))) @@ -208,29 +218,32 @@ ifeq ($(OPTIMS),1) 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 @@ -247,11 +260,22 @@ DCFLAGS += -MM # LCFLAGS += @LCFLAGS@ $(LIB) LCFLAGS += -Wall +ifneq ($(DEBUG),1) +ifneq ($(GPROF),1) +ifneq ($(CPROF),1) #LCFLAGS += -s +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 # @@ -273,7 +297,12 @@ ifeq ($(DEBUG),1) CFLAGS += -g endif -ifeq ($(PROFILING),1) +ifeq ($(CPROF),1) +CFLAGS += -finstrument-functions +endif + +ifeq ($(GPROF),1) CFLAGS += -pg endif +