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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3 - (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 :     # CFLAGS += -march=pentiumpro -mcpu=pentiumpro
35 :    
36 :     CFLAGS += -Wall -O3 -funroll-loops -ffast-math -march=pentiumpro -mcpu=pentiumpro
37 :     CFLAGS += -fstrict-aliasing -fomit-frame-pointer
38 :     endif
39 :    
40 :     AS = nasm
41 :     AFLAGS = -f elf
42 :    
43 :     %.o: %.asm
44 :     $(AS) $(AFLAGS) $< -o $@
45 :    
46 :     RM = rm -rf
47 :    
48 :    
49 :     all: $(LIB) $(LIBSO)
50 :    
51 :    
52 :     $(LIB): $(SRC:.c=.o) $(SRC_INTEL:.asm=.o)
53 :     ar rcs $@ $^
54 :    
55 :    
56 :     $(LIBSO): $(SRC:.c=.o) $(SRC_INTEL:.asm=.o)
57 :     $(CC) $(CFLAGS) $^ -shared -lc -lm -o $@
58 :    
59 :    
60 :     clean:
61 :     $(RM) `find $(SRCDIR) -name "*.o"`
62 :    
63 :     remove-all:
64 :     $(RM) $(DIRS)
65 :     $(RM) $(DIRS_INTEL)
66 :     $(RM) $(LIB)
67 :     $(RM) $(LIBSO)
68 :    
69 :    
70 :     install: libxvidcore.so
71 :     cp libxvidcore.so $(LIBDIR) # you have to bee root for this
72 :     /sbin/ldconfig
73 :    
74 :     install-test: libxvidcore.so # if you don't want to overwrite previous compile
75 :     cp libxvidcore.so $(LIBDIR)/libtestcore.so
76 :     /sbin/ldconfig

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