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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 381 - (view) (download)

1 : Isibaar 381 #############################################################################
2 :     #
3 :     # GNU/Linux Makefile
4 :     #
5 :     # Edit this file to enable/disable optimizations
6 :     #
7 :     # $Id: Makefile.beos,v 1.1 2002-08-18 14:06:32 Isibaar Exp $
8 :     #
9 :     #############################################################################
10 :    
11 :     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 :     # CC = icc
30 :    
31 :     # Assembler
32 :     AS = nasm
33 :     AFLAGS = -f elf
34 :    
35 :     # Constants which should not be modified
36 :     CFLAGS += -DARCH_X86
37 :     CFLAGS += -DBEOS
38 :    
39 :     # Enable multithreaded ME (experimental), other routines to follow
40 :     # CFLAGS += -D_SMP
41 :    
42 :     # Enable some experimental/debugging code
43 :     # (Use only if you know what you're doing !)
44 :     # PSNR during encoding
45 :     # CFLAGS += -D_DEBUG_PSNR
46 :     # BFRAMES encoding
47 :     # CFLAGS += -DBFRAMES
48 :     # BFRAMES decoding
49 :     # CFLAGS += -DBFRAMES_DEC
50 :    
51 :     LIBDIR = /usr/local/lib
52 :    
53 :     ifeq ($(CC),icc)
54 :    
55 :     # -tpp7 might be faster (P4 optmization)...
56 :     CFLAGS += -O3 -ip -tpp6 -xM
57 :     CFLAGS += -I/opt/intel/compiler50/ia32/include
58 :     CFLAGS += -I/opt/intel/compiler50/ia32/substitute_headers/
59 :    
60 :     else
61 :    
62 :     # Warning level options
63 :     # Shows all warnings
64 :     CFLAGS += -Wall
65 :     # To detect non ANSI C code (xvid is not ANSI C (yet?))
66 :     # CFLAGS += -pedantic
67 :    
68 :    
69 :     # General Optimization options
70 :     # Optimize code for size (implies -O2)
71 :     CFLAGS += -Os
72 :     # Unroll loops code, this might speed up loops
73 :     CFLAGS += -funroll-loops
74 :     # Generates FPU math code
75 :     CFLAGS += -ffast-math
76 :     # ??? (man gcc)
77 :     CFLAGS += -fstrict-aliasing
78 :     # Omit the x86 push ebp; mov ebp, esp function
79 :     # header and its corresponding function tailer
80 :     CFLAGS += -fomit-frame-pointer
81 :     # Generates Position Independant Code depending on your nasm version,
82 :     # this could generate shared libraries that segfault because of a nasm
83 :     # bug
84 :     CFLAGS += -fPIC
85 :    
86 :     # Debugging and Profiling options
87 :     # Writes debugging symbols in object files
88 :     # CFLAGS += -g
89 :     # Includes profiling code in generated code, don't forget to disable
90 :     # -fomit-frame-pointer as these 2 options are exclusive.
91 :     # CFLAGS += -p
92 :    
93 :    
94 :     # Architecture options : Valid for every gcc version
95 :     # Uncomment the one which you want to compile for
96 :    
97 :     # CFLAGS += -march=i586 -mcpu=i586
98 :     CFLAGS += -march=i686 -mcpu=i686
99 :     # CFLAGS += -march=pentium -mcpu=pentium
100 :     # CFLAGS += -march=pentiumpro -mcpu=pentiumpro
101 :    
102 :     # Architecture options : Valid for every gcc >= 3.1
103 :     # Uncomment the one which you want to compile for
104 :    
105 :     # CFLAGS += -march=pentium-mmx -mcpu=pentium-mmx
106 :     # CFLAGS += -march=pentium3 -mcpu=pentium3
107 :     # CFLAGS += -march=pentium4 -mcpu=pentium4
108 :     # CFLAGS += -march=athlon -mcpu=athlon
109 :     # CFLAGS += -march=k6 -mcpu=k6
110 :     # CFLAGS += -march=k6-2 -mcpu=k6-2
111 :     # CFLAGS += -march=k6-3 -mcpu=k6-3
112 :     # CFLAGS += -march=athlon-tbird -mcpu=athlon-tbird
113 :     # CFLAGS += -march=athlon-xp -mcpu=athlon-xp
114 :     # CFLAGS += -march=athlon-mp -mcpu=athlon-mp
115 :    
116 :     # x86 specific optimization for every gcc
117 :     # Aligns the stack to 2^4=16bytes boundaries in each function
118 :     # Local variables should be aligned and make the code faster
119 :     # some gcc versions (3.0.4) have problems with this option
120 :     # we can't really trust gcc output :-( You're warned.
121 :     CFLAGS += -mpreferred-stack-boundary=4
122 :    
123 :     # Architecture specific optimization available in gcc >= 3.1
124 :     # generates floating point sse code (for >= pentium 3)
125 :     # CFLAGS += -mfpmath=sse
126 :     # generates both floating point sse and 387 code, this double the amount
127 :     # of fp registers and could make the code faster
128 :     # (Still experimental in gcc 3.1.0)
129 :     # CFLAGS += -mfpmath=sse,387
130 :    
131 :     endif
132 :    
133 :     #############################################################################
134 :     #
135 :     # Makefile rules
136 :     #
137 :     #############################################################################
138 :    
139 :     %.o: %.asm
140 :     $(AS) $(AFLAGS) $< -o $@
141 :    
142 :     RM = rm -rf
143 :    
144 :    
145 :     all: $(LIB) $(LIBSO)
146 :    
147 :    
148 :     $(LIB): $(SRC:.c=.o) $(SRC_INTEL:.asm=.o)
149 :     ar rcs $@ $^
150 :    
151 :    
152 :     $(LIBSO): $(SRC:.c=.o) $(SRC_INTEL:.asm=.o)
153 :     $(CC) $(CFLAGS) $^ -nostart -lbe -o $@
154 :    
155 :    
156 :     clean:
157 :     $(RM) `find $(SRCDIR) -name "*.o"`
158 :     $(RM) $(LIB)
159 :     $(RM) $(LIBSO)
160 :    
161 :     install: libxvidcore.so
162 :     cp libxvidcore.so $(LIBDIR) # you have to bee root for this
163 :     /sbin/ldconfig
164 :    
165 :     install-test: libxvidcore.so # if you don't want to overwrite previous compile
166 :     cp libxvidcore.so $(LIBDIR)/libtestcore.so
167 :     /sbin/ldconfig

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