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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 512 - (view) (download)

1 : edgomez 512 #############################################################################
2 :     #
3 :     # GNU/Linux PPC Altivec Makefile
4 :     #
5 :     # Edit this file to enable/disable optimizations
6 :     #
7 :     # $Id: Makefile.linuxppc_altivec,v 1.6 2002-09-22 12:13:21 edgomez Exp $
8 :     #
9 :     #############################################################################
10 : canard 71
11 :     include Makefile.inc
12 :    
13 : edgomez 512 # 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 : canard 71
23 : edgomez 512 # 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_PPC
36 :     CFLAGS += -DARCH_PPC_ALTIVEC
37 :     CFLAGS += -DARCH_IS_BIG_ENDIAN
38 :    
39 :     # Enable some experimental/debugging code
40 :     # (Use only if you know what you're doing !)
41 :     # PSNR during encoding
42 :     # CFLAGS += -D_DEBUG_PSNR
43 :    
44 :     # Enable BFrame decoding (still beta)
45 :     # CFLAGS += -DBRAMES_DEC
46 :    
47 : canard 71 LIBDIR = /usr/local/lib
48 :    
49 : edgomez 512 # Warning level options
50 :     # Shows all warnings
51 :     CFLAGS += -Wall
52 :     # To detect non ANSI C code (xvid is not ANSI C (yet?))
53 :     # CFLAGS += -pedantic
54 : canard 71
55 : canard 93
56 : edgomez 512 # General Optimization options
57 :     # Optimize code for size (implies -O2)
58 :     CFLAGS += -Os
59 :     # Unroll loops code, this might speed up loops
60 :     CFLAGS += -funroll-loops
61 :     # Generates FPU math code
62 :     CFLAGS += -ffast-math
63 :     # ??? (man gcc)
64 :     CFLAGS += -fstrict-aliasing
65 :     # Omit the frame pointer saving at function beginning
66 :     CFLAGS += -fomit-frame-pointer
67 :     # Generates Position Independant Code depending on your nasm version,
68 :     # this could generate shared libraries that segfault because of a nasm
69 :     # bug
70 :     CFLAGS += -fPIC
71 : canard 92
72 : edgomez 512 # Debugging and Profiling options
73 :     # Writes debugging symbols in object files
74 :     # CFLAGS += -g
75 :     # Includes profiling code in generated code, don't forget to disable
76 :     # -fomit-frame-pointer as these 2 options are exclusive.
77 :     # CFLAGS += -pg
78 :     # Precise profiling + test coverage (-pg must be activated)
79 :     # Build the library twice and execute a program using the lib twice too
80 :     # First pass : Will create sourcefile.da files to keep branch statistics
81 :     # CFLAGS += -fprofile-arcs
82 :     # Second pass : Will create .bb and .bbg files suitable for coverage and
83 :     # branch probabilities during compilation
84 :     # CFLAGS += -fprofile-arcs -fbranch-probabilities -ftest-coverage
85 : canard 71
86 : edgomez 512 #############################################################################
87 :     #
88 :     # Makefile rules
89 :     #
90 :     #############################################################################
91 :    
92 : canard 71 %.o: %.s
93 :     $(AS) $< -o $@
94 :    
95 :     RM = rm -rf
96 :    
97 :     all: $(LIB) $(LIBSO)
98 :    
99 :     $(LIB): $(SRC:.c=.o) $(SRC_ALTIVEC:.s=.o)
100 :     ar rcs $@ $^
101 :    
102 :     $(LIBSO): $(SRC:.c=.o) $(SRC_ALTIVEC:.s=.o)
103 :     $(CC) $(CFLAGS) $^ -shared -lc -lm -o $@
104 :    
105 :     clean:
106 :     $(RM) `find $(SRCDIR) -name "*.o"`
107 :     $(RM) $(LIB)
108 :     $(RM) $(LIBSO)
109 :    
110 : edgomez 512 install: $(LIBSO) $(LIB)
111 :     cp $(LIBSO) $(LIBDIR) # you have to be root for this
112 :     cp $(LIB) $(LIBDIR)
113 : canard 71 /sbin/ldconfig
114 :    
115 : edgomez 512 install-test: $(LIBSO) # if you don't want to overwrite previous compile
116 :     cp $(LIBSO) $(LIBDIR)/libtestcore.so
117 : canard 71 /sbin/ldconfig

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