30 |
# |
# |
31 |
############################################################################## |
############################################################################## |
32 |
|
|
|
# Our main targets |
|
|
STATIC_LIB=libxvidcore.$(STATIC_EXTENSION) |
|
|
SHARED_LIB=libxvidcore.$(SHARED_EXTENSION) |
|
|
|
|
33 |
# Their Objects |
# Their Objects |
34 |
OBJECTS=$(GENERIC_OBJECTS) |
OBJECTS=$(GENERIC_OBJECTS) |
|
OBJECTS+=$(DIVX4COMPAT_OBJECTS) |
|
35 |
OBJECTS+=$(ASSEMBLY_OBJECTS) |
OBJECTS+=$(ASSEMBLY_OBJECTS) |
36 |
OBJECTS+=$(DCT_IA64_OBJECTS) |
OBJECTS+=$(DCT_IA64_OBJECTS) |
37 |
|
|
63 |
|
|
64 |
.c.$(OBJECT_EXTENSION): |
.c.$(OBJECT_EXTENSION): |
65 |
@echo -n "Compiling $< ... " |
@echo -n "Compiling $< ... " |
66 |
@$(CC) -c $(CFLAGS) $< -o $@ |
@$(CC) -c $(ARCHITECTURE) $(BUS) $(ENDIANNESS) $(FEATURES) $(SPECIFIC_CFLAGS) $(CFLAGS) $< -o $@ |
67 |
@echo "Done" |
@echo "Done" |
68 |
|
|
69 |
#----------------------------------------------------------------------------- |
#----------------------------------------------------------------------------- |
86 |
$(SHARED_LIB): $(OBJECTS) |
$(SHARED_LIB): $(OBJECTS) |
87 |
@echo |
@echo |
88 |
@echo -n "Linking the shared library... " |
@echo -n "Linking the shared library... " |
89 |
@$(CC) $(LDFLAGS) $(OBJECTS) -o $(SHARED_LIB) $(SPECIFIC_LDFLAGS) |
@$(CC) $(LDFLAGS) $(OBJECTS) -o $(PRE_SHARED_LIB) $(SPECIFIC_LDFLAGS) |
90 |
@echo "Done" |
@echo "Done" |
91 |
|
|
92 |
#----------------------------------------------------------------------------- |
#----------------------------------------------------------------------------- |
97 |
@echo |
@echo |
98 |
@echo "+---------- Installing XviD libraries in $(libdir) ----------+" |
@echo "+---------- Installing XviD libraries in $(libdir) ----------+" |
99 |
@echo |
@echo |
100 |
|
$(INSTALL) -d $(libdir) |
101 |
$(INSTALL) -m 755 $(SHARED_LIB) $(libdir)/$(SHARED_LIB) |
$(INSTALL) -m 755 $(SHARED_LIB) $(libdir)/$(SHARED_LIB) |
102 |
$(INSTALL) -m 755 $(STATIC_LIB) $(libdir)/$(STATIC_LIB) |
$(INSTALL) -m 755 $(STATIC_LIB) $(libdir)/$(STATIC_LIB) |
103 |
@echo |
@echo |
104 |
@echo "+---------- Installing XviD header in $(includedir) ----------+" |
@echo "+---------- Installing XviD header in $(includedir) ----------+" |
105 |
@echo |
@echo |
106 |
|
$(INSTALL) -d $(includedir) |
107 |
$(INSTALL) -m 644 $(SRCDIR)/xvid.h $(includedir)/xvid.h |
$(INSTALL) -m 644 $(SRCDIR)/xvid.h $(includedir)/xvid.h |
108 |
@echo |
@echo |
109 |
|
|
119 |
# .PHONY targets |
# .PHONY targets |
120 |
#----------------------------------------------------------------------------- |
#----------------------------------------------------------------------------- |
121 |
|
|
122 |
.PHONY: distclean clean info list-objects list-targets list-install-path |
.PHONY: mrproper distclean clean info list-objects list-targets list-install-path list-cflags |
123 |
|
|
124 |
clean: |
clean: |
125 |
@echo -n "Cleaning objects... " |
@echo -n "Cleaning objects... " |
132 |
@$(RM) $(SHARED_LIB) |
@$(RM) $(SHARED_LIB) |
133 |
@echo "Done" |
@echo "Done" |
134 |
|
|
|
|
|
135 |
distclean: clean |
distclean: clean |
136 |
@echo -n "Cleaning generated files... " |
@echo -n "Cleaning generated files... " |
|
@$(RM) libxvidcore.def |
|
137 |
@$(RM) platform.inc |
@$(RM) platform.inc |
138 |
@$(RM) config.log |
@$(RM) config.log |
139 |
|
@$(RM) config.status |
140 |
@$(RM) autom4te.cache |
@$(RM) autom4te.cache |
141 |
@echo "Done" |
@echo "Done" |
142 |
|
|
143 |
|
mrproper: distclean |
144 |
|
@echo -n "Cleaning bootstrapped files... " |
145 |
|
@$(RM) configure |
146 |
|
@$(RM) install-sh |
147 |
|
@$(RM) missing |
148 |
|
@$(RM) config.guess |
149 |
|
@$(RM) mkinstalldirs |
150 |
|
@$(RM) config.sub |
151 |
|
@echo "Done" |
152 |
|
|
153 |
list-objects: |
list-objects: |
154 |
@echo |
@echo |
155 |
@echo "Object files used for this build" |
@echo "Object files used for this build" |
176 |
@echo Library: $(libdir) |
@echo Library: $(libdir) |
177 |
@echo |
@echo |
178 |
|
|
179 |
info: list-objects list-targets list-install-path |
list-cflags: |
180 |
|
@echo |
181 |
|
@echo "Using CFLAGS" |
182 |
|
@echo "---------------------------------------------------------------" |
183 |
|
@echo |
184 |
|
@echo CFLAGS=$(CFLAGS) |
185 |
|
@echo |
186 |
|
|
187 |
|
info: list-objects list-cflags list-targets list-install-path |