[svn] / trunk / xvidcore / build / generic / Makefile.linuxppc_altivec Repository:
ViewVC logotype

View of /trunk/xvidcore/build/generic/Makefile.linuxppc_altivec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 536 - (download) (annotate)
Tue Sep 24 22:27:32 2002 UTC (16 years, 10 months ago) by edgomez
File size: 3342 byte(s)
Fix typo mistake
#############################################################################
#
# GNU/Linux PPC Altivec  Makefile
# 
# Edit this file to enable/disable optimizations
#
# $Id: Makefile.linuxppc_altivec,v 1.7 2002-09-24 22:27:32 edgomez Exp $
# 
#############################################################################

include Makefile.inc

# You can set/add options to CC and CFLAGS without editing this Makefile
# You have just to export an environment CC/CFLAGS variable before running
# make.
#
# Examples :
# $ export CC='gcc-3.1'
# $ export CFLAGS='-maccumulate-outgoing-args'
# $ make
# ...

# You can choose a specific compiler here removing the sharp symbol
#   - Default is 'cc' which is a symlink to your default distro gcc


# CC = gcc
# CC = gcc-3.1

# Assembler
AS = as

# Constants which should not be modified
CFLAGS += -DLINUX
CFLAGS += -DARCH_PPC
CFLAGS += -DARCH_PPC_ALTIVEC
CFLAGS += -DARCH_IS_BIG_ENDIAN

# Enable some experimental/debugging code
#   (Use only if you know what you're doing !)
    # PSNR during encoding
# CFLAGS += -D_DEBUG_PSNR

# Enable BFrame decoding (still beta)
# CFLAGS += -DBFRAMES_DEC

LIBDIR = /usr/local/lib

  # Warning level options
      # Shows all warnings
  CFLAGS += -Wall
      # To detect non ANSI C code (xvid is not ANSI C (yet?))
  # CFLAGS += -pedantic


  # General Optimization options
      # Optimize code for size (implies -O2)
  CFLAGS += -Os
      # Unroll loops code, this might speed up loops
  CFLAGS += -funroll-loops
      # Generates FPU math code
  CFLAGS += -ffast-math
      # ??? (man gcc)
  CFLAGS += -fstrict-aliasing
      # Omit the frame pointer saving at function beginning
  CFLAGS += -fomit-frame-pointer
      # Generates Position Independant Code depending on your nasm version,
      # this could generate shared libraries that segfault because of a nasm
      # bug
  CFLAGS += -fPIC

  # Debugging and Profiling options
     # Writes debugging symbols in object files
  # CFLAGS += -g
     # Includes profiling code in generated code, don't forget to disable
     # -fomit-frame-pointer as these 2 options are exclusive.
  # CFLAGS += -pg
     # Precise profiling + test coverage (-pg must be activated)
     # Build the library twice and execute a program using the lib twice too
       # First pass : Will create sourcefile.da files to keep branch statistics
  # CFLAGS += -fprofile-arcs 
       # Second pass : Will create .bb and .bbg files suitable for coverage and
       #               branch probabilities during compilation
  # CFLAGS += -fprofile-arcs -fbranch-probabilities -ftest-coverage

#############################################################################
#
# Makefile rules
#
#############################################################################

%.o: %.s
	$(AS) $< -o $@

RM = rm -rf

all: $(LIB) $(LIBSO)

$(LIB): $(SRC:.c=.o) $(SRC_ALTIVEC:.s=.o)
	ar rcs $@ $^

$(LIBSO): $(SRC:.c=.o) $(SRC_ALTIVEC:.s=.o)
	$(CC) $(CFLAGS) $^ -shared -lc -lm -o $@

clean:	
	$(RM) `find $(SRCDIR) -name "*.o"`
	$(RM) $(LIB)
	$(RM) $(LIBSO)

install: $(LIBSO) $(LIB)
	cp $(LIBSO) $(LIBDIR)                   # you have to be root for this
	cp $(LIB) $(LIBDIR)
	/sbin/ldconfig 

install-test: $(LIBSO)                      # if you don't want to overwrite previous compile
	cp $(LIBSO) $(LIBDIR)/libtestcore.so
	/sbin/ldconfig

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4