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

Diff of /trunk/xvidcore/build/generic/Makefile.linuxppc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 44, Thu Mar 21 13:43:48 2002 UTC revision 536, Tue Sep 24 22:27:32 2002 UTC
# Line 1  Line 1 
1  #/**************************************************************************  #############################################################################
2  # *  #
3  # * linux makefile  # GNU/Linux PPC Makefile
 # *  
 # * nasm args:  
 # * -f fmt              elf (linux), coff (djgpp)  
 # * -DPREFIX    add '_' prefix to symbol names  
 # *  
 # * libso:  
 # * (-lm not neccessary if using -ffast-math)  
 # *  
 # *************************************************************************/  
   
   
4  #  #
5  # Adapted from linux x86 Makefile by Guillaume Morin <guillaume@morinfr.org>  # Edit this file to enable/disable optimizations
6  #  #
7  # This needs lots of work but that is a good beginning :-)  # $Id: Makefile.linuxppc,v 1.8 2002-09-24 22:27:32 edgomez Exp $
8    #
9    #############################################################################
10    
11  include Makefile.inc  include Makefile.inc
12    
13  CC = gcc  # You can set/add options to CC and CFLAGS without editing this Makefile
14  #CC=icc  # You have just to export an environment CC/CFLAGS variable before running
15  #CC = /opt/experimental/bin/gcc         # that's where SuSE installs gcc3  # make.
16    #
17    # Examples :
18    # $ export CC='gcc-3.1'
19    # $ export CFLAGS='-maccumulate-outgoing-args'
20    # $ make
21    # ...
22    
23  CFLAGS = -DLINUX -DARCH_PPC -DARCH_IS_BIG_ENDIAN  # You can choose a specific compiler here removing the sharp symbol
24  LIBDIR = /usr/local/lib  #   - Default is 'cc' which is a symlink to your default distro gcc
25    
 # CFLAGS += -funroll-loops -ffast-math -fstrict-aliasing -fomit-frame-pointer  
 # CFLAGS += -fPIC  
 # CFLAGS += -m486  
 # CFLAGS += -march=pentium -mcpu=pentium  
 # CFLAGS += -march=pentiumpro -mcpu=pentiumpro  
26    
27      CFLAGS += -Wall -O3 -funroll-loops -ffast-math  # CC = gcc
28      CFLAGS += -fstrict-aliasing -fomit-frame-pointer  # CC = gcc-3.1
29    
30    # Assembler
31  AS = as  AS = as
 AFLAGS = -f elf  
32    
33  %.o: %.asm  # Constants which should not be modified
34          $(AS) $(AFLAGS) $< -o $@  CFLAGS += -DLINUX
35    CFLAGS += -DARCH_PPC
36    CFLAGS += -DARCH_IS_BIG_ENDIAN
37    
38    # Enable some experimental/debugging code
39    #   (Use only if you know what you're doing !)
40        # PSNR during encoding
41    # CFLAGS += -D_DEBUG_PSNR
42    
43  RM = rm -rf  # Enable BFrame decoding (still beta)
44    # CFLAGS += -DBFRAMES_DEC
45    
46    LIBDIR = /usr/local/lib
47    
48  all: $(LIB) $(LIBSO)    # Warning level options
49          # Shows all warnings
50      CFLAGS += -Wall
51          # To detect non ANSI C code (xvid is not ANSI C (yet?))
52      # CFLAGS += -pedantic
53    
54    
55      # General Optimization options
56          # Optimize code for size (implies -O2)
57      CFLAGS += -Os
58          # Unroll loops code, this might speed up loops
59      CFLAGS += -funroll-loops
60          # Generates FPU math code
61      CFLAGS += -ffast-math
62          # ??? (man gcc)
63      CFLAGS += -fstrict-aliasing
64          # Omit the frame pointer saving at function beginning
65      CFLAGS += -fomit-frame-pointer
66          # Generates Position Independant Code depending on your nasm version,
67          # this could generate shared libraries that segfault because of a nasm
68          # bug
69      CFLAGS += -fPIC
70    
71      # Debugging and Profiling options
72         # Writes debugging symbols in object files
73      # CFLAGS += -g
74         # Includes profiling code in generated code, don't forget to disable
75         # -fomit-frame-pointer as these 2 options are exclusive.
76      # CFLAGS += -pg
77         # Precise profiling + test coverage (-pg must be activated)
78         # Build the library twice and execute a program using the lib twice too
79           # First pass : Will create sourcefile.da files to keep branch statistics
80      # CFLAGS += -fprofile-arcs
81           # Second pass : Will create .bb and .bbg files suitable for coverage and
82           #               branch probabilities during compilation
83      # CFLAGS += -fprofile-arcs -fbranch-probabilities -ftest-coverage
84    
85    #############################################################################
86    #
87    # Makefile rules
88    #
89    #############################################################################
90    
91    %.o: %.s
92            $(AS) $< -o $@
93    
94  $(LIB): $(SRC:.c=.o) $(SRC_INTEL:.asm=.o)  RM = rm -rf
95          ar rcs $@ $^  
96    all: $(LIB) $(LIBSO)
97    
98    $(LIB): $(SRC:.c=.o) $(SRC_PPC:.s=.o)
99            ar rcs $@ $^
100    
101  $(LIBSO): $(SRC:.c=.o) $(SRC_INTEL:.asm=.o)  $(LIBSO): $(SRC:.c=.o) $(SRC_PPC:.s=.o)
102          $(CC) $(CFLAGS) $^ -shared -lc -lm -o $@          $(CC) $(CFLAGS) $^ -shared -lc -lm -o $@
103    
   
104  clean:  clean:
105          $(RM) `find $(SRCDIR) -name "*.o"`          $(RM) `find $(SRCDIR) -name "*.o"`
   
 remove-all:  
         $(RM) $(DIRS)  
         $(RM) $(DIRS_INTEL)  
106          $(RM) $(LIB)          $(RM) $(LIB)
107          $(RM) $(LIBSO)          $(RM) $(LIBSO)
108    
109    install: $(LIBSO) $(LIB)
110  install: libxvidcore.so          cp $(LIBSO) $(LIBDIR)                   # you have to be root for this
111          cp libxvidcore.so $(LIBDIR)                     # you have to bee root for this          cp $(LIB) $(LIBDIR)
112          /sbin/ldconfig          /sbin/ldconfig
113    
114  install-test: libxvidcore.so                            # if you don't want to overwrite previous compile  install-test: $(LIBSO)                      # if you don't want to overwrite previous compile
115          cp libxvidcore.so $(LIBDIR)/libtestcore.so          cp $(LIBSO) $(LIBDIR)/libtestcore.so
116          /sbin/ldconfig          /sbin/ldconfig

Legend:
Removed from v.44  
changed lines
  Added in v.536

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