[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 511, Sun Sep 22 12:10:34 2002 UTC revision 512, Sun Sep 22 12:13:21 2002 UTC
# Line 1  Line 1 
1  #/**************************************************************************  #############################################################################
2  # *  #
3  # * Linux PPC makefile  # GNU/Linux PPC Makefile
4  # *  #
5  # * Adapted from linux x86 Makefile by Guillaume Morin <guillaume@morinfr.org>  # Edit this file to enable/disable optimizations
6  # *  #
7  # * libso:  # $Id: Makefile.linuxppc,v 1.7 2002-09-22 12:13:21 edgomez Exp $
8  # * (-lm not neccessary if using -ffast-math)  #
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    # You have just to export an environment CC/CFLAGS variable before running
15    # 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 += -Wall -O3 -funroll-loops -ffast-math  
 CFLAGS += -fstrict-aliasing -fomit-frame-pointer  
26    
27  ## for profiling, uncomment the next line.  # CC = gcc
28  #CFLAGS += -D_PROFILING_  # CC = gcc-3.1
29    
30  ## for debugging, comment the previous lines and uncomment the next one.  # Assembler
31  #CFLAGS += -Wall -g  AS = as
32    
33    # Constants which should not be modified
34    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  AS = as  # Enable BFrame decoding (still beta)
44    # CFLAGS += -DBRAMES_DEC
45    
46    LIBDIR = /usr/local/lib
47    
48      # 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  %.o: %.s
92          $(AS) $< -o $@          $(AS) $< -o $@
# Line 39  Line 98 
98  $(LIB): $(SRC:.c=.o) $(SRC_PPC:.s=.o)  $(LIB): $(SRC:.c=.o) $(SRC_PPC:.s=.o)
99          ar rcs $@ $^          ar rcs $@ $^
100    
   
101  $(LIBSO): $(SRC:.c=.o) $(SRC_PPC:.s=.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_PPC)  
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 be 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.511  
changed lines
  Added in v.512

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