Parent Directory | Revision Log
Revision 512 - (view) (download)
1 : | edgomez | 512 | ############################################################################# |
2 : | # | ||
3 : | # SGI IRIX64 MIPS Makefile | ||
4 : | # | ||
5 : | # Edit this file to enable/disable optimizations | ||
6 : | # | ||
7 : | # $Id: Makefile.irix64,v 1.2 2002-09-22 12:13:21 edgomez Exp $ | ||
8 : | # | ||
9 : | ############################################################################# | ||
10 : | suxen_drol | 238 | |
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 : | suxen_drol | 238 | |
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 : | suxen_drol | 238 | |
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_MIPS | ||
36 : | CFLAGS += -DARCH_IS_BIG_ENDIAN | ||
37 : | CFLAGS += -mabi=n32 -mips4 -mcpu=r8000 | ||
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 : | 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 : | |||
92 : | %.o: %.s | ||
93 : | $(AS) $< -o $@ | ||
94 : | |||
95 : | suxen_drol | 238 | RM = rm -rf |
96 : | |||
97 : | all: $(LIB) $(LIBSO) | ||
98 : | |||
99 : | $(LIB): $(SRC:.c=.o) | ||
100 : | ar rcs $@ $^ | ||
101 : | |||
102 : | $(LIBSO): $(SRC:.c=.o) | ||
103 : | edgomez | 512 | $(CC) $(CFLAGS) $^ -shared -lc -lm -o $@ |
104 : | suxen_drol | 238 | |
105 : | edgomez | 512 | clean: |
106 : | $(RM) `find $(SRCDIR) -name "*.o"` | ||
107 : | suxen_drol | 238 | $(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 : | /sbin/ldconfig | ||
114 : | suxen_drol | 238 | |
115 : | edgomez | 512 | install-test: $(LIBSO) # if you don't want to overwrite previous compile |
116 : | cp $(LIBSO) $(LIBDIR)/libtestcore.so | ||
117 : | /sbin/ldconfig |
No admin address has been configured | ViewVC Help |
Powered by ViewVC 1.0.4 |