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

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

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

revision 3, Fri Mar 8 02:46:11 2002 UTC revision 512, Sun Sep 22 12:13:21 2002 UTC
# Line 1  Line 1 
1  #/**************************************************************************  #############################################################################
2  # *  #
3  # * sparc makefile  # GNU/Linux SPARC Makefile
4  # *  #
5  # *  # Edit this file to enable/disable optimizations
6  # *  #
7  # *************************************************************************/  # $Id: Makefile.sparc,v 1.2 2002-09-22 12:13:21 edgomez Exp $
8    #
9    #############################################################################
10    
11  include Makefile.inc  include Makefile.inc
12    
13    # 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    # You can choose a specific compiler here removing the sharp symbol
24    #   - Default is 'cc' which is a symlink to your default distro gcc
25    
26    
27    # CC = gcc
28    # CC = gcc-3.1
29    
30    # Assembler
31    AS = as
32    
33    # Constants which should not be modified
34    CFLAGS += -DLINUX
35    CFLAGS += -DARCH_SPARC
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    # 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  CC = gcc  %.o: %.s
92  CFLAGS = -fPIC -Wall -DARCH_IS_BIG_ENDIAN -DARCH_SPARC          $(AS) $< -o $@
   
93    
94  RM = rm -rf  RM = rm -rf
95    
   
96  all: $(LIB) $(LIBSO)  all: $(LIB) $(LIBSO)
97    
   
98  $(LIB): $(SRC:.c=.o)  $(LIB): $(SRC:.c=.o)
99          ar rcs $@ $^          ar rcs $@ $^
100    
   
101  $(LIBSO): $(SRC:.c=.o)  $(LIBSO): $(SRC:.c=.o)
102          $(CC) $^ -shared -lc -lm -o $@          $(CC) $(CFLAGS) $^ -shared -lc -lm -o $@
   
103    
104  clean:  clean:
105          $(RM) $(DIRS)          $(RM) `find $(SRCDIR) -name "*.o"`
         $(RM) $(DIRS_INTEL)  
106          $(RM) $(LIB)          $(RM) $(LIB)
107          $(RM) $(LIBSO)          $(RM) $(LIBSO)
108    
109  %.o: %.c  install: $(LIBSO) $(LIB)
110          $(CC) $(CFLAGS) -o $@ -c $<          cp $(LIBSO) $(LIBDIR)                   # you have to be root for this
111            cp $(LIB) $(LIBDIR)
112            /sbin/ldconfig
113    
114    install-test: $(LIBSO)                      # if you don't want to overwrite previous compile
115            cp $(LIBSO) $(LIBDIR)/libtestcore.so
116            /sbin/ldconfig

Legend:
Removed from v.3  
changed lines
  Added in v.512

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