4 |
# |
# |
5 |
# Edit this file to enable/disable optimizations |
# Edit this file to enable/disable optimizations |
6 |
# |
# |
7 |
# $Id: Makefile.linux,v 1.3 2002-06-23 19:48:06 edgomez Exp $ |
# $Id: Makefile.linux,v 1.6.2.4 2002-12-14 08:14:37 suxen_drol Exp $ |
8 |
# |
# |
9 |
############################################################################# |
############################################################################# |
10 |
|
|
36 |
CFLAGS += -DARCH_X86 |
CFLAGS += -DARCH_X86 |
37 |
CFLAGS += -DLINUX |
CFLAGS += -DLINUX |
38 |
|
|
39 |
|
# Enable multithreaded ME (experimental), other routines to follow |
40 |
|
# CFLAGS += -D_SMP |
41 |
|
|
42 |
# Enable some experimental/debugging code |
# Enable some experimental/debugging code |
43 |
# (Use only if you know what you're doing !) |
# (Use only if you know what you're doing !) |
44 |
# PSNR during encoding |
# PSNR during encoding |
45 |
# CFLAGS += -D_DEBUG_PSNR |
# CFLAGS += -D_DEBUG_PSNR |
|
# BFRAMES encoding |
|
|
# CFLAGS += -DBFRAMES |
|
|
# BFRAMES decoding |
|
|
# CFLAGS += -DBFRAMES_DEC |
|
46 |
|
|
47 |
LIBDIR = /usr/local/lib |
LIBDIR = /usr/local/lib |
48 |
|
|
61 |
# To detect non ANSI C code (xvid is not ANSI C (yet?)) |
# To detect non ANSI C code (xvid is not ANSI C (yet?)) |
62 |
# CFLAGS += -pedantic |
# CFLAGS += -pedantic |
63 |
|
|
64 |
|
|
65 |
# General Optimization options |
# General Optimization options |
66 |
# Optimize code for size (implies -O2) |
# Optimize code for size (implies -O2) |
67 |
CFLAGS += -Os |
CFLAGS += -Os |
77 |
# Generates Position Independant Code depending on your nasm version, |
# Generates Position Independant Code depending on your nasm version, |
78 |
# this could generate shared libraries that segfault because of a nasm |
# this could generate shared libraries that segfault because of a nasm |
79 |
# bug |
# bug |
80 |
# CFLAGS += -fPIC |
CFLAGS += -fPIC |
81 |
|
|
82 |
|
# Debugging and Profiling options |
83 |
|
# Writes debugging symbols in object files |
84 |
|
# CFLAGS += -g |
85 |
|
# Includes profiling code in generated code, don't forget to disable |
86 |
|
# -fomit-frame-pointer as these 2 options are exclusive. |
87 |
|
# CFLAGS += -p |
88 |
|
|
89 |
|
|
90 |
# Architecture options : Valid for every gcc version |
# Architecture options : Valid for every gcc version |
94 |
# CFLAGS += -march=i486 -mcpu=i486 |
# CFLAGS += -march=i486 -mcpu=i486 |
95 |
# CFLAGS += -march=i586 -mcpu=i586 |
# CFLAGS += -march=i586 -mcpu=i586 |
96 |
# CFLAGS += -march=i686 -mcpu=i686 |
# CFLAGS += -march=i686 -mcpu=i686 |
97 |
|
# CFLAGS += -march=pentium -mcpu=pentium |
98 |
|
# CFLAGS += -march=pentiumpro -mcpu=pentiumpro |
99 |
|
|
100 |
# Architecture options : Valid for every gcc >= 3.1 |
# Architecture options : Valid for every gcc >= 3.1 |
101 |
# Uncomment the one which you want to compile for |
# Uncomment the one which you want to compile for |
111 |
# CFLAGS += -march=athlon-xp -mcpu=athlon-xp |
# CFLAGS += -march=athlon-xp -mcpu=athlon-xp |
112 |
# CFLAGS += -march=athlon-mp -mcpu=athlon-mp |
# CFLAGS += -march=athlon-mp -mcpu=athlon-mp |
113 |
|
|
114 |
# Architecture specific optimization for every gcc |
# x86 specific optimization for every gcc |
115 |
# Aligns the stack to 2^4=16bytes boundaries in each function |
# Aligns the stack to 2^4=16bytes boundaries in each function |
116 |
# Local variables should be aligned and make the code faster |
# Local variables should be aligned and make the code faster |
117 |
# some gcc versions (3.0.4) have problems with this option |
# some gcc versions (3.0.4) have problems with this option |
135 |
############################################################################# |
############################################################################# |
136 |
|
|
137 |
%.o: %.asm |
%.o: %.asm |
138 |
$(AS) $(AFLAGS) $< -o $@ |
$(AS) $(AFLAGS) -I$(<D) $< -o $@ |
139 |
|
|
140 |
RM = rm -rf |
RM = rm -rf |
141 |
|
|
158 |
|
|
159 |
install: libxvidcore.so |
install: libxvidcore.so |
160 |
cp libxvidcore.so $(LIBDIR) # you have to bee root for this |
cp libxvidcore.so $(LIBDIR) # you have to bee root for this |
161 |
|
cp $(SRCDIR)/xvid.h /usr/local/include |
162 |
/sbin/ldconfig |
/sbin/ldconfig |
163 |
|
|
164 |
install-test: libxvidcore.so # if you don't want to overwrite previous compile |
install-test: libxvidcore.so # if you don't want to overwrite previous compile |