[svn] / branches / dev-api-4 / xvidcore / build / generic / Makefile Repository:
ViewVC logotype

Annotation of /branches/dev-api-4/xvidcore/build/generic/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 824 - (view) (download)
Original Path: trunk/xvidcore/build/generic/Makefile

1 : edgomez 824 ##############################################################################
2 :     #
3 :     # - Unified Makefile for XviD for *nix environments -
4 :     #
5 :     # Copyright(C) 2003 Edouard Gomez <ed.gomez@free.fr>
6 :     #
7 :     #
8 :     # Description:
9 :     # This Makefile allows building XviD sources to obtain a shared library
10 :     # and a static library. This Makefie uses variables defined in the
11 :     # platform.inc file. This platform.inc file is usually created by the
12 :     # ./configure script whenever a unix shell is available.
13 :     #
14 :     # Nota Bene for mingw32/djgpp users:
15 :     # However if you provide a platform.inc file adapted to your OS, then
16 :     # change the include platform.inc to include yourfile.inc and it should
17 :     # work too.
18 :     #
19 :     #
20 :     ##############################################################################
21 :    
22 :     include sources.inc
23 :     include platform.inc
24 :    
25 :     RM = rm -rf
26 :    
27 :     ##############################################################################
28 :     #
29 :     # Build rules
30 :     #
31 :     ##############################################################################
32 :    
33 :     # Our main targets
34 :     STATIC_LIB=libxvidcore.$(STATIC_EXTENSION)
35 :     SHARED_LIB=libxvidcore.$(SHARED_EXTENSION)
36 :    
37 :     # Their Objects
38 :     OBJECTS=$(GENERIC_OBJECTS)
39 :     OBJECTS+=$(DIVX4COMPAT_OBJECTS)
40 :     OBJECTS+=$(ASSEMBLY_OBJECTS)
41 :    
42 :     #-----------------------------------------------------------------------------
43 :     # The default rule
44 :     #-----------------------------------------------------------------------------
45 :    
46 :     .SUFFIXES: .$(OBJECT_EXTENSION) .$(ASSEMBLY_EXTENSION) .c
47 :    
48 :     all: platform.inc $(STATIC_LIB) $(SHARED_LIB)
49 :    
50 :     #-----------------------------------------------------------------------------
51 :     # Generic assembly rule
52 :     #-----------------------------------------------------------------------------
53 :    
54 :     .$(ASSEMBLY_EXTENSION).$(OBJECT_EXTENSION):
55 :     $(AS) $(AFLAGS) $< -o $@
56 :    
57 :     #-----------------------------------------------------------------------------
58 :     # Generic C rule
59 :     #-----------------------------------------------------------------------------
60 :    
61 :     .c.$(OBJECT_EXTENSION):
62 :     $(CC) -c $(CFLAGS) $< -o $@
63 :    
64 :     #-----------------------------------------------------------------------------
65 :     # Static Library
66 :     #-----------------------------------------------------------------------------
67 :    
68 :     $(STATIC_LIB): $(OBJECTS)
69 :     ar rc $(STATIC_LIB) $(OBJECTS)
70 :    
71 :     #-----------------------------------------------------------------------------
72 :     # Shared Library
73 :     #-----------------------------------------------------------------------------
74 :    
75 :     $(SHARED_LIB): $(OBJECTS)
76 :     $(CC) $(LDFLAGS) $(OBJECTS) -o $(SHARED_LIB) $(OS_LDFLAGS)
77 :    
78 :     #-----------------------------------------------------------------------------
79 :     # Installation
80 :     #-----------------------------------------------------------------------------
81 :    
82 :     install: all
83 :     @echo
84 :     @echo "+---------- Installing XviD libraries in $(libdir) ----------+"
85 :     @echo
86 :     $(INSTALL) -m 755 $(SHARED_LIB) $(libdir)/$(SHARED_LIB)
87 :     $(INSTALL) -m 755 $(STATIC_LIB) $(libdir)/$(STATIC_LIB)
88 :     @echo
89 :     @echo "+---------- Installing XviD header in $(includedir) ----------+"
90 :     @echo
91 :     $(INSTALL) -m 644 $(SRCDIR)/xvid.h $(includedir)/xvid.h
92 :     @echo
93 :    
94 :     #-----------------------------------------------------------------------------
95 :     # Platorm specific file -- dumb rule for people executing make before
96 :     # ./configure
97 :     #-----------------------------------------------------------------------------
98 :    
99 :     platform.inc: platform.inc.in
100 :     ./configure
101 :    
102 :     #-----------------------------------------------------------------------------
103 :     # .PHONY targets
104 :     #-----------------------------------------------------------------------------
105 :    
106 :     .PHONY: distclean clean info list-objects list-targets list-install-path
107 :    
108 :     clean:
109 :     $(RM) $(OBJECTS)
110 :     $(RM) $(SHARED_LIB)
111 :     $(RM) $(STATIC_LIB)
112 :    
113 :     distclean: clean
114 :     $(RM) config.log
115 :     $(RM) platform.inc
116 :     $(RM) autom4te.cache
117 :    
118 :     list-objects:
119 :     @echo
120 :     @echo "Object files used for this build"
121 :     @echo "---------------------------------------------------------------"
122 :     @echo
123 :     @echo $(OBJECTS)
124 :     @echo
125 :    
126 :     list-targets:
127 :     @echo
128 :     @echo "Target Libraries"
129 :     @echo "---------------------------------------------------------------"
130 :     @echo
131 :     @echo Shared library: $(SHARED_LIB)
132 :     @echo Static library: $(STATIC_LIB)
133 :     @echo
134 :    
135 :     list-install-path:
136 :     @echo
137 :     @echo "Install Paths"
138 :     @echo "---------------------------------------------------------------"
139 :     @echo
140 :     @echo Include: $(includedir)
141 :     @echo Library: $(libdir)
142 :     @echo
143 :    
144 :     info: list-objects list-targets list-install-path

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