[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 686 - (view) (download)

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

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