Parent Directory | Revision Log
Revision 173 - (view) (download)
1 : | Isibaar | 3 | #/************************************************************************** |
2 : | # * | ||
3 : | # * linux makefile | ||
4 : | # * | ||
5 : | # * nasm args: | ||
6 : | # * -f fmt elf (linux), coff (djgpp) | ||
7 : | # * -DPREFIX add '_' prefix to symbol names | ||
8 : | # * | ||
9 : | # * libso: | ||
10 : | # * (-lm not neccessary if using -ffast-math) | ||
11 : | # * | ||
12 : | # *************************************************************************/ | ||
13 : | |||
14 : | |||
15 : | include Makefile.inc | ||
16 : | |||
17 : | CC = gcc | ||
18 : | #CC=icc | ||
19 : | #CC = /opt/experimental/bin/gcc # that's where SuSE installs gcc3 | ||
20 : | |||
21 : | CFLAGS = -DARCH_X86 -DLINUX | ||
22 : | LIBDIR = /usr/local/lib | ||
23 : | |||
24 : | ifeq ($(CC),icc) | ||
25 : | CFLAGS+= -O3 -ip -tpp6 -xM # -tpp7 might be faster (P4 optmization)... | ||
26 : | CFLAGS+= -I/opt/intel/compiler50/ia32/include -I/opt/intel/compiler50/ia32/substitute_headers/ | ||
27 : | |||
28 : | else | ||
29 : | |||
30 : | # CFLAGS += -funroll-loops -ffast-math -fstrict-aliasing -fomit-frame-pointer | ||
31 : | # CFLAGS += -fPIC | ||
32 : | # CFLAGS += -m486 | ||
33 : | # CFLAGS += -march=pentium -mcpu=pentium | ||
34 : | chl | 173 | CFLAGS += -march=pentiumpro -mcpu=pentiumpro |
35 : | # CFLAGS += -march=k6 -mcpu=k6 | ||
36 : | Isibaar | 3 | |
37 : | chl | 173 | CFLAGS += -Wall -O3 -funroll-loops -ffast-math |
38 : | Isibaar | 3 | CFLAGS += -fstrict-aliasing -fomit-frame-pointer |
39 : | endif | ||
40 : | |||
41 : | AS = nasm | ||
42 : | AFLAGS = -f elf | ||
43 : | |||
44 : | %.o: %.asm | ||
45 : | $(AS) $(AFLAGS) $< -o $@ | ||
46 : | |||
47 : | RM = rm -rf | ||
48 : | |||
49 : | |||
50 : | all: $(LIB) $(LIBSO) | ||
51 : | |||
52 : | |||
53 : | $(LIB): $(SRC:.c=.o) $(SRC_INTEL:.asm=.o) | ||
54 : | ar rcs $@ $^ | ||
55 : | |||
56 : | |||
57 : | $(LIBSO): $(SRC:.c=.o) $(SRC_INTEL:.asm=.o) | ||
58 : | $(CC) $(CFLAGS) $^ -shared -lc -lm -o $@ | ||
59 : | |||
60 : | |||
61 : | clean: | ||
62 : | $(RM) `find $(SRCDIR) -name "*.o"` | ||
63 : | |||
64 : | remove-all: | ||
65 : | $(RM) $(DIRS) | ||
66 : | $(RM) $(DIRS_INTEL) | ||
67 : | $(RM) $(LIB) | ||
68 : | $(RM) $(LIBSO) | ||
69 : | |||
70 : | |||
71 : | install: libxvidcore.so | ||
72 : | cp libxvidcore.so $(LIBDIR) # you have to bee root for this | ||
73 : | /sbin/ldconfig | ||
74 : | |||
75 : | install-test: libxvidcore.so # if you don't want to overwrite previous compile | ||
76 : | cp libxvidcore.so $(LIBDIR)/libtestcore.so | ||
77 : | /sbin/ldconfig |
No admin address has been configured | ViewVC Help |
Powered by ViewVC 1.0.4 |