From e6b3cc9b3d102d0ff77ca6a137e5a53408c86b8d Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 27 Nov 2006 01:40:39 +0000 Subject: [PATCH] Move common code for generating multiple libraries to mpcommon.mak. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21303 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/Makefile | 11 +---------- libvo/Makefile | 11 +---------- mpcommon.mak | 8 +++++++- 3 files changed, 9 insertions(+), 21 deletions(-) diff --git a/libmpcodecs/Makefile b/libmpcodecs/Makefile index 12289c95e3..555aa09550 100644 --- a/libmpcodecs/Makefile +++ b/libmpcodecs/Makefile @@ -2,11 +2,8 @@ include ../config.mak LIBNAME = libmpcodecs.a -LIBNAME2 = libmpencoders.a - -LIBS =$(LIBNAME) ifeq ($(MENCODER),yes) -LIBS+=$(LIBNAME2) +LIBNAME2 = libmpencoders.a endif SRCS = native/minilzo.c \ @@ -176,12 +173,6 @@ CFLAGS = -I.. \ include ../mpcommon.mak -all: $(LIBS) - -$(LIBNAME2): $(OBJS2) - $(AR) r $@ $^ - $(RANLIB) $@ - clean:: rm -f native/*.o native/*.a native/*~ diff --git a/libvo/Makefile b/libvo/Makefile index 77e5100966..b07c0ab62f 100644 --- a/libvo/Makefile +++ b/libvo/Makefile @@ -1,12 +1,9 @@ include ../config.mak -LIBNAME = libvo.a LIBNAME2 = libosd.a - -LIBS =$(LIBNAME2) ifeq ($(MPLAYER),yes) -LIBS+=$(LIBNAME) +LIBNAME = libvo.a endif SRCS=aspect.c \ @@ -45,9 +42,3 @@ include ../mpcommon.mak .m.o: $(CC) -c $(CFLAGS) -o $@ $< - -all: $(LIBS) - -$(LIBNAME2): $(OBJS2) - $(AR) r $@ $^ - $(RANLIB) $@ diff --git a/mpcommon.mak b/mpcommon.mak index 510ba23200..e8abcee2c3 100644 --- a/mpcommon.mak +++ b/mpcommon.mak @@ -10,12 +10,18 @@ CFLAGS += -I. -I.. $(OPTFLAGS) .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 *~