changeset 21287:f423ce0a1c36

Move common code for generating multiple libraries to mpcommon.mak.
author diego
date Mon, 27 Nov 2006 01:40:39 +0000
parents eb5e0d858b98
children 2dcbbe65d16d
files libmpcodecs/Makefile libvo/Makefile mpcommon.mak
diffstat 3 files changed, 10 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/Makefile	Mon Nov 27 01:36:13 2006 +0000
+++ b/libmpcodecs/Makefile	Mon Nov 27 01:40:39 2006 +0000
@@ -2,11 +2,8 @@
 include ../config.mak
 
 LIBNAME = libmpcodecs.a
+ifeq ($(MENCODER),yes)
 LIBNAME2 = libmpencoders.a
-
-LIBS =$(LIBNAME)
-ifeq ($(MENCODER),yes)
-LIBS+=$(LIBNAME2)
 endif
 
 SRCS = native/minilzo.c \
@@ -176,12 +173,6 @@
 
 include ../mpcommon.mak
 
-all:    $(LIBS)
-
-$(LIBNAME2): $(OBJS2)
-	$(AR) r $@ $^
-	$(RANLIB) $@
-
 clean::
 	rm -f native/*.o native/*.a native/*~
 
--- a/libvo/Makefile	Mon Nov 27 01:36:13 2006 +0000
+++ b/libvo/Makefile	Mon Nov 27 01:40:39 2006 +0000
@@ -1,12 +1,9 @@
 
 include ../config.mak
 
+LIBNAME2 = libosd.a
+ifeq ($(MPLAYER),yes)
 LIBNAME = libvo.a
-LIBNAME2 = libosd.a
-
-LIBS =$(LIBNAME2)
-ifeq ($(MPLAYER),yes)
-LIBS+=$(LIBNAME)
 endif
 
 SRCS=aspect.c \
@@ -45,9 +42,3 @@
 
 .m.o:
 	$(CC) -c $(CFLAGS) -o $@ $<
-
-all:    $(LIBS)
-
-$(LIBNAME2): $(OBJS2)
-	$(AR) r $@ $^
-	$(RANLIB) $@
--- a/mpcommon.mak	Mon Nov 27 01:36:13 2006 +0000
+++ b/mpcommon.mak	Mon Nov 27 01:40:39 2006 +0000
@@ -10,12 +10,18 @@
 .c.o:
 	$(CC) -c $(CFLAGS) -o $@ $<
 
-all:    $(LIBNAME)
+LIBS = $(LIBNAME) $(LIBNAME2)
+
+all:    $(LIBS)
 
 $(LIBNAME): $(OBJS)
 	$(AR) r $@ $^
 	$(RANLIB) $@
 
+$(LIBNAME2): $(OBJS2)
+	$(AR) r $@ $^
+	$(RANLIB) $@
+
 clean::
 	rm -f *.o *.a *~