diff mp3lib/Makefile @ 21259:92b122592776

Merge common parts of all Makefiles into one file included by all.
author diego
date Sun, 26 Nov 2006 18:12:36 +0000
parents 68df3b19a160
children b2eeabacef4d
line wrap: on
line diff
--- a/mp3lib/Makefile	Sun Nov 26 18:06:11 2006 +0000
+++ b/mp3lib/Makefile	Sun Nov 26 18:12:36 2006 +0000
@@ -1,6 +1,8 @@
 
 include ../config.mak
 
+LIBNAME = libMP3.a
+
 ifeq ($(TARGET_ARCH_SGI_MIPS),yes)
 OPTFLAGS := $(OPTFLAGS:-O4=-O0)
 endif
@@ -33,16 +35,7 @@
 endif
 endif
 
-OBJS=$(SRCS:.c=.o)
-
-.SUFFIXES: .c .o
-
-# .PHONY: all clean
-
-all:	libMP3.a
-
-.c.o:
-	$(CC) -c $(CFLAGS) -o $@ $<
+include ../mpcommon.mak
 
 decode_i586.o: decode_i586.c
 	$(CC) -c $(CFLAGS) -fomit-frame-pointer -o $@ $<
@@ -50,25 +43,11 @@
 .s.o:
 	$(CC) -c $(CFLAGS) -o $@ $<
 
-libMP3.a:	$(OBJS)
-	$(AR) r libMP3.a $(OBJS)
-	$(RANLIB) libMP3.a
-
 test1:	libMP3.a test.c
 	$(CC) $(CFLAGS) test.c ../libvo/aclib.c -o test1 -I.. ./libMP3.a ../mp_msg-mencoder.o ../cpudetect.o -lm
 
 test2:	libMP3.a test2.c
 	$(CC) $(CFLAGS) test2.c ../libvo/aclib.c -o test2 -I.. ./libMP3.a ../mp_msg-mencoder.o ../cpudetect.o -lm
 
-clean:
-	rm -f *~ *.o *.a test1 test2
-
-distclean: clean
-	rm -f .depend
-
-dep depend:
-	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
-
-ifneq ($(wildcard .depend),)
-include .depend
-endif
+distclean::
+	rm -f test1 test2