Parent Directory | Revision Log
Revision 536 - (view) (download)
1 : | edgomez | 512 | ############################################################################# |
2 : | # | ||
3 : | # GNU/Linux SPARC Makefile | ||
4 : | # | ||
5 : | # Edit this file to enable/disable optimizations | ||
6 : | # | ||
7 : | edgomez | 536 | # $Id: Makefile.sparc,v 1.3 2002-09-24 22:27:32 edgomez Exp $ |
8 : | edgomez | 512 | # |
9 : | ############################################################################# | ||
10 : | Isibaar | 3 | |
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 : | Isibaar | 3 | |
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 : | Isibaar | 3 | |
26 : | |||
27 : | edgomez | 512 | # 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 : | edgomez | 536 | # CFLAGS += -DBFRAMES_DEC |
45 : | edgomez | 512 | |
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 | ||
92 : | $(AS) $< -o $@ | ||
93 : | |||
94 : | Isibaar | 3 | RM = rm -rf |
95 : | |||
96 : | all: $(LIB) $(LIBSO) | ||
97 : | |||
98 : | $(LIB): $(SRC:.c=.o) | ||
99 : | ar rcs $@ $^ | ||
100 : | |||
101 : | $(LIBSO): $(SRC:.c=.o) | ||
102 : | edgomez | 512 | $(CC) $(CFLAGS) $^ -shared -lc -lm -o $@ |
103 : | Isibaar | 3 | |
104 : | edgomez | 512 | clean: |
105 : | $(RM) `find $(SRCDIR) -name "*.o"` | ||
106 : | Isibaar | 3 | $(RM) $(LIB) |
107 : | $(RM) $(LIBSO) | ||
108 : | |||
109 : | edgomez | 512 | install: $(LIBSO) $(LIB) |
110 : | cp $(LIBSO) $(LIBDIR) # you have to be root for this | ||
111 : | cp $(LIB) $(LIBDIR) | ||
112 : | /sbin/ldconfig | ||
113 : | Isibaar | 3 | |
114 : | edgomez | 512 | install-test: $(LIBSO) # if you don't want to overwrite previous compile |
115 : | cp $(LIBSO) $(LIBDIR)/libtestcore.so | ||
116 : | /sbin/ldconfig |
No admin address has been configured | ViewVC Help |
Powered by ViewVC 1.0.4 |