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

Diff of /trunk/xvidcore/build/generic/Makefile.linux

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3, Fri Mar 8 02:46:11 2002 UTC revision 266, Sun Jul 7 11:21:20 2002 UTC
# Line 1  Line 1 
1  #/**************************************************************************  #############################################################################
2  # *  #
3  # * linux makefile  # GNU/Linux Makefile
4  # *  #
5  # * nasm args:  # Edit this file to enable/disable optimizations
6  # * -f fmt              elf (linux), coff (djgpp)  #
7  # * -DPREFIX    add '_' prefix to symbol names  # $Id: Makefile.linux,v 1.4 2002-07-07 11:21:20 chl Exp $
8  # *  #
9  # * libso:  #############################################################################
 # * (-lm not neccessary if using -ffast-math)  
 # *  
 # *************************************************************************/  
   
10    
11  include Makefile.inc  include Makefile.inc
12    
13  CC = gcc  # 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  #CC=icc
 #CC = /opt/experimental/bin/gcc         # that's where SuSE installs gcc3  
30    
31  CFLAGS = -DARCH_X86 -DLINUX  # Assembler
32    AS = nasm
33    AFLAGS = -f elf
34    
35    # Constants which should not be modified
36    CFLAGS += -DARCH_X86
37    CFLAGS += -DLINUX
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  LIBDIR = /usr/local/lib
52    
53  ifeq ($(CC),icc)  ifeq ($(CC),icc)
54      CFLAGS+= -O3 -ip -tpp6 -xM                  # -tpp7 might be faster (P4 optmization)...  
55      CFLAGS+= -I/opt/intel/compiler50/ia32/include -I/opt/intel/compiler50/ia32/substitute_headers/      # -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  else
61    
62  # CFLAGS += -funroll-loops -ffast-math -fstrict-aliasing -fomit-frame-pointer    # 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      # General Optimization options
69          # Optimize code for size (implies -O2)
70      CFLAGS += -Os
71          # Unroll loops code, this might speed up loops
72      CFLAGS += -funroll-loops
73          # Generates FPU math code
74      CFLAGS += -ffast-math
75          # ??? (man gcc)
76      CFLAGS += -fstrict-aliasing
77          # Omit the x86 push ebp; mov ebp, esp function
78          # header and its corresponding function tailer
79      CFLAGS += -fomit-frame-pointer
80          # Generates Position Independant Code depending on your nasm version,
81          # this could generate shared libraries that segfault because of a nasm
82          # bug
83  # CFLAGS += -fPIC  # CFLAGS += -fPIC
 # CFLAGS += -m486  
 # CFLAGS += -march=pentium -mcpu=pentium  
 # CFLAGS += -march=pentiumpro -mcpu=pentiumpro  
84    
85      CFLAGS += -Wall -O3 -funroll-loops -ffast-math -march=pentiumpro -mcpu=pentiumpro  
86      CFLAGS += -fstrict-aliasing -fomit-frame-pointer    # Architecture options : Valid for every gcc version
87      # Uncomment the one which you want to compile for
88    
89      # CFLAGS += -march=i386 -mcpu=i386
90      # CFLAGS += -march=i486 -mcpu=i486
91      # CFLAGS += -march=i586 -mcpu=i586
92      # CFLAGS += -march=i686 -mcpu=i686
93    
94      # Architecture options : Valid for every gcc >= 3.1
95      # Uncomment the one which you want to compile for
96    
97      # CFLAGS += -march=pentium-mmx -mcpu=pentium-mmx
98      # CFLAGS += -march=pentium3 -mcpu=pentium3
99      # CFLAGS += -march=pentium4 -mcpu=pentium4
100      # CFLAGS += -march=athlon -mcpu=athlon
101      # CFLAGS += -march=k6 -mcpu=k6
102      # CFLAGS += -march=k6-2 -mcpu=k6-2
103      # CFLAGS += -march=k6-3 -mcpu=k6-3
104      # CFLAGS += -march=athlon-tbird -mcpu=athlon-tbird
105      # CFLAGS += -march=athlon-xp -mcpu=athlon-xp
106      # CFLAGS += -march=athlon-mp -mcpu=athlon-mp
107    
108      # Architecture specific optimization for every gcc
109          # Aligns the stack to 2^4=16bytes boundaries in each function
110          # Local variables should be aligned and make the code faster
111          # some gcc versions (3.0.4) have problems with this option
112          # we can't really trust gcc output :-( You're warned.
113      CFLAGS += -mpreferred-stack-boundary=4
114    
115      # Architecture specific optimization available in gcc >= 3.1
116          # generates floating point sse code (for >= pentium 3)
117      # CFLAGS += -mfpmath=sse
118          # generates both floating point sse and 387 code, this double the amount
119          # of fp registers and could make the code faster
120          # (Still experimental in gcc 3.1.0)
121      # CFLAGS += -mfpmath=sse,387
122    
123  endif  endif
124    
125  AS = nasm  #############################################################################
126  AFLAGS = -f elf  #
127    # Makefile rules
128    #
129    #############################################################################
130    
131  %.o: %.asm  %.o: %.asm
132          $(AS) $(AFLAGS) $< -o $@          $(AS) $(AFLAGS) $< -o $@
# Line 59  Line 147 
147    
148  clean:  clean:
149          $(RM) `find $(SRCDIR) -name "*.o"`          $(RM) `find $(SRCDIR) -name "*.o"`
   
 remove-all:  
         $(RM) $(DIRS)  
         $(RM) $(DIRS_INTEL)  
150          $(RM) $(LIB)          $(RM) $(LIB)
151          $(RM) $(LIBSO)          $(RM) $(LIBSO)
152    
   
153  install: libxvidcore.so  install: libxvidcore.so
154          cp libxvidcore.so $(LIBDIR)                     # you have to bee root for this          cp libxvidcore.so $(LIBDIR)                     # you have to bee root for this
155          /sbin/ldconfig          /sbin/ldconfig

Legend:
Removed from v.3  
changed lines
  Added in v.266

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