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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 488 - (view) (download)

1 : edgomez 488 #############################################################################
2 :     #
3 :     # GNU/Linux Makefile
4 :     #
5 :     # Edit this file to enable/disable optimizations
6 :     #
7 :     # $Id: Makefile.cygwin,v 1.2 2002-09-19 19:54:03 edgomez Exp $
8 :     #
9 :     #############################################################################
10 : Isibaar 91
11 :     include Makefile.inc
12 :    
13 : edgomez 488 # 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 : Isibaar 91
23 : edgomez 488 # 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 : Isibaar 91
26 :    
27 : edgomez 488 # CC = gcc
28 :     # CC = gcc-3.1
29 :     # CC = icc
30 :    
31 :     # Assembler
32 : Isibaar 91 AS = nasm
33 :     AFLAGS = -f win32 -DPREFIX
34 :    
35 : edgomez 488 # Constants which should not be modified
36 :     CFLAGS += -DARCH_X86
37 :     CFLAGS += -DLINUX
38 :     CFLAGS += -UWIN32
39 :     CFLAGS += -mno-cygwin
40 :    
41 :     # Enable some experimental/debugging code
42 :     # (Use only if you know what you're doing !)
43 :     # PSNR during encoding
44 :     # CFLAGS += -D_DEBUG_PSNR
45 :    
46 :     LIBDIR = /usr/local/lib
47 :    
48 :     # Warning level options
49 :     # Shows all warnings
50 :     CFLAGS += -Wall
51 :     # To detect non ANSI C code (xvid is not ANSI C (yet?))
52 :     # CFLAGS += -pedantic
53 :    
54 :    
55 :     # General Optimization options
56 :     # Optimize code for size (implies -O2)
57 :     CFLAGS += -Os
58 :     # Unroll loops code, this might speed up loops
59 :     CFLAGS += -funroll-loops
60 :     # Generates FPU math code
61 :     CFLAGS += -ffast-math
62 :     # ??? (man gcc)
63 :     CFLAGS += -fstrict-aliasing
64 :     # Omit the x86 push ebp; mov ebp, esp function
65 :     # header and its corresponding function tailer
66 :     CFLAGS += -fomit-frame-pointer
67 :     # Generates Position Independant Code depending on your nasm version,
68 :     # this could generate shared libraries that segfault because of a nasm
69 :     # bug (win32 produces PIC all the time)
70 :     # CFLAGS += -fPIC
71 :    
72 :     # Debugging and Profiling options
73 :     # Writes debugging symbols in object files
74 :     # CFLAGS += -g
75 :     # Includes profiling code in generated code, don't forget to disable
76 :     # -fomit-frame-pointer as these 2 options are exclusive.
77 :     # Try a first run with -fprofile-arcs only then build the lib again
78 :     # with add branch and coverage... this will allow you to profile
79 :     # the lib line a line.
80 :     # CFLAGS += -pg -fprofile-arcs -fbranch-probabilities -ftest-coverage
81 :    
82 :    
83 :     # Architecture options : Valid for every gcc version
84 :     # Uncomment the one which you want to compile for
85 :    
86 :     # CFLAGS += -march=i386 -mcpu=i386
87 :     # CFLAGS += -march=i486 -mcpu=i486
88 :     # CFLAGS += -march=i586 -mcpu=i586
89 :     # CFLAGS += -march=i686 -mcpu=i686
90 :     # CFLAGS += -march=pentium -mcpu=pentium
91 :     # CFLAGS += -march=pentiumpro -mcpu=pentiumpro
92 :    
93 :     # Architecture options : Valid for every gcc >= 3.1
94 :     # Uncomment the one which you want to compile for
95 :    
96 :     # CFLAGS += -march=pentium-mmx -mcpu=pentium-mmx
97 :     # CFLAGS += -march=pentium3 -mcpu=pentium3
98 :     # CFLAGS += -march=pentium4 -mcpu=pentium4
99 :     # CFLAGS += -march=athlon -mcpu=athlon
100 :     # CFLAGS += -march=k6 -mcpu=k6
101 :     # CFLAGS += -march=k6-2 -mcpu=k6-2
102 :     # CFLAGS += -march=k6-3 -mcpu=k6-3
103 :     # CFLAGS += -march=athlon-tbird -mcpu=athlon-tbird
104 :     # CFLAGS += -march=athlon-xp -mcpu=athlon-xp
105 :     # CFLAGS += -march=athlon-mp -mcpu=athlon-mp
106 :    
107 :     # x86 specific optimization for every gcc
108 :     # Aligns the stack to 2^4=16bytes boundaries in each function
109 :     # Local variables should be aligned and make the code faster
110 :     # some gcc versions (3.0.4) have problems with this option
111 :     # we can't really trust gcc output :-( You're warned.
112 :     CFLAGS += -mpreferred-stack-boundary=4
113 :    
114 :     # Architecture specific optimization available in gcc >= 3.1
115 :     # generates floating point sse code (for >= pentium 3)
116 :     # CFLAGS += -mfpmath=sse
117 :     # generates both floating point sse and 387 code, this double the amount
118 :     # of fp registers and could make the code faster
119 :     # (Still experimental in gcc 3.1.0)
120 :     # CFLAGS += -mfpmath=sse,387
121 :    
122 :     endif
123 :    
124 :     #############################################################################
125 :     #
126 :     # Makefile rules
127 :     #
128 :     #############################################################################
129 :    
130 : Isibaar 91 %.o: %.asm
131 :     $(AS) $(AFLAGS) $< -o $@
132 :    
133 :     RM = rm -rf
134 :    
135 :    
136 : edgomez 488 all: $(LIB) $(LIBSO:.so=.dll)
137 :    
138 :    
139 : Isibaar 91 $(LIB): $(SRC:.c=.o) $(SRC_INTEL:.asm=.o)
140 :     ar rcs $@ $^
141 :    
142 : edgomez 488 $(LIBSO:.so=.dll): $(SRC:.c=.o) $(SRC_INTEL:.asm=.o)
143 :     $(CC) $(CFLAGS) -shared -Wl,--dll,--out-implib,$@.a -o $@ $^ libxvidcore.def
144 :    
145 : Isibaar 91 clean:
146 :     $(RM) `find $(SRCDIR) -name "*.o"`
147 :     $(RM) $(LIB)
148 : edgomez 488 $(RM) $(LIBSO:.so=.dll)
149 : Isibaar 91
150 : edgomez 488 install: $(LIBSO:.so=.dll) $(LIBSO:.so=.dll) $(LIB)
151 :     cp $(LIBSO:.so=.dll) $(LIBDIR) # you have to bee root for this
152 :     cp $(LIBSO:.so=.dll.a) $(LIBDIR)
153 :     cp $(LIB) $(LIBDIR)
154 :     /sbin/ldconfig

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