Parent Directory | Revision Log
Revision 1.8 - (view) (download)
1 : | edgomez | 1.6 | ############################################################################# |
2 : | # | ||
3 : | # GNU/Linux PPC Altivec Makefile | ||
4 : | # | ||
5 : | # Edit this file to enable/disable optimizations | ||
6 : | # | ||
7 : | edgomez | 1.8 | # $Id: Makefile.linuxppc_altivec,v 1.7 2002/09/24 22:27:32 edgomez Exp $ |
8 : | edgomez | 1.6 | # |
9 : | ############################################################################# | ||
10 : | canard | 1.1 | |
11 : | edgomez | 1.6 | 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 : | canard | 1.1 | |
23 : | edgomez | 1.6 | # 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 : | canard | 1.1 | |
26 : | |||
27 : | edgomez | 1.6 | # CC = gcc |
28 : | # CC = gcc-3.1 | ||
29 : | canard | 1.1 | |
30 : | edgomez | 1.6 | # Assembler |
31 : | AS = as | ||
32 : | canard | 1.1 | |
33 : | edgomez | 1.6 | # 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 : | canard | 1.4 | |
44 : | edgomez | 1.6 | # Enable BFrame decoding (still beta) |
45 : | edgomez | 1.7 | # CFLAGS += -DBFRAMES_DEC |
46 : | canard | 1.3 | |
47 : | edgomez | 1.6 | LIBDIR = /usr/local/lib |
48 : | |||
49 : | # 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 : | |||
55 : | |||
56 : | # 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 : | |||
72 : | # 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 : | |||
86 : | ############################################################################# | ||
87 : | # | ||
88 : | # Makefile rules | ||
89 : | # | ||
90 : | ############################################################################# | ||
91 : | canard | 1.1 | |
92 : | %.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 | 1.6 | install: $(LIBSO) $(LIB) |
111 : | cp $(LIBSO) $(LIBDIR) # you have to be root for this | ||
112 : | cp $(LIB) $(LIBDIR) | ||
113 : | canard | 1.1 | /sbin/ldconfig |
114 : | |||
115 : | edgomez | 1.6 | install-test: $(LIBSO) # if you don't want to overwrite previous compile |
116 : | cp $(LIBSO) $(LIBDIR)/libtestcore.so | ||
117 : | canard | 1.1 | /sbin/ldconfig |
No admin address has been configured | ViewVC Help |
Powered by ViewVC 1.0.4 |