Move library name generation to configure, simplifies build system a bit more.
authorDiego Biurrun <diego@biurrun.de>
Sat, 14 Jan 2006 15:54:58 +0000 (15:54 +0000)
committerDiego Biurrun <diego@biurrun.de>
Sat, 14 Jan 2006 15:54:58 +0000 (15:54 +0000)
Originally committed as revision 4856 to svn://svn.ffmpeg.org/ffmpeg/trunk

configure
libavcodec/Makefile
libavcodec/libpostproc/Makefile
libavformat/Makefile
libavutil/Makefile

index ef914f735ea58a43f8dbe7b458badf27d79eebc2..23b3696a4e5ad9a39b81fed1a6fab711bd2c6789 100755 (executable)
--- a/configure
+++ b/configure
@@ -230,8 +230,10 @@ FFSLDFLAGS=-Wl,-E
 LDCONFIG="ldconfig"
 LIBPREF="lib"
 LIBSUF=".a"
+LIB='$(LIBPREF)$(NAME)$(LIBSUF)'
 SLIBPREF="lib"
 SLIBSUF=".so"
+SLIBNAME='$(SLIBPREF)$(NAME)$(SLIBSUF)'
 SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)$(SLIBSUF).$(LIBVERSION)'
 SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME)$(SLIBSUF).$(LIBMAJOR)'
 EXESUF=""
@@ -1356,6 +1358,7 @@ echo "LIBOBJFLAGS=$LIBOBJFLAGS" >> config.mak
 echo "BUILDSUF=$BUILDSUF" >> config.mak
 echo "LIBPREF=$LIBPREF" >> config.mak
 echo "LIBSUF=\${BUILDSUF}$LIBSUF" >> config.mak
+echo "LIB=$LIB" >> config.mak
 echo "SLIBPREF=$SLIBPREF" >> config.mak
 echo "SLIBSUF=\${BUILDSUF}$SLIBSUF" >> config.mak
 echo "EXESUF=\${BUILDSUF}$EXESUF" >> config.mak
@@ -1508,6 +1511,7 @@ if test "$lshared" = "yes" ; then
   echo "LAVFVERSION=$lavf_version" >> config.mak
   echo "LAVUMAJOR=${lavu_version%%.*}" >> config.mak
   echo "LAVUVERSION=$lavu_version" >> config.mak
+  echo "SLIBNAME=${SLIBNAME}" >> config.mak
   echo "SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION}" >> config.mak
   echo "SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR}" >> config.mak
 fi
index 5e3fd45cf0bffbe7634964f52945f0b2527d3664..fc91026afd5eab5dd289080ed2f63dcaa5bbb9c3 100644 (file)
@@ -396,13 +396,11 @@ endif
 SRCS := $(OBJS:.o=.c) $(ASM_OBJS:.o=.S)
 OBJS := $(OBJS) $(ASM_OBJS)
 
-LIB= $(LIBPREF)avcodec$(LIBSUF)
+NAME=avcodec
 LIBAVUTIL= $(SRC_PATH)/libavutil/$(LIBPREF)avutil$(LIBSUF)
 ifeq ($(BUILD_SHARED),yes)
 LIBVERSION=$(LAVCVERSION)
 LIBMAJOR=$(LAVCMAJOR)
-NAME=avcodec
-SLIBNAME= $(SLIBPREF)avcodec$(SLIBSUF)
 endif
 TESTS= imgresample-test dct-test motion-test fft-test
 
index 3026b96f59610049b35ccf21e1b3192c5a18cefc..7ea52b2868b675f342679af84f03949d84a92344 100644 (file)
@@ -3,12 +3,10 @@ include ../../config.mak
 
 VPATH=$(SRC_PATH)/libavcodec/libpostproc
 
-LIB = $(LIBPREF)postproc$(LIBSUF)
+NAME=postproc
 ifeq ($(SHARED_PP),yes)
 LIBVERSION=$(SPPVERSION)
 LIBMAJOR=$(SPPMAJOR)
-NAME=postproc
-SLIBNAME = $(SLIBPREF)postproc$(SLIBSUF)
 endif
 
 OBJS=postprocess.o
index 3b2ee7d4d0e6be88600044615ceda3a22d62b5ba..4c837442043ed22ef8977a355e98ab724cd32d9c 100644 (file)
@@ -78,12 +78,10 @@ ifeq ($(TARGET_ARCH_SPARC64),yes)
 CFLAGS+= -mcpu=ultrasparc -mtune=ultrasparc
 endif
 
-LIB= $(LIBPREF)avformat$(LIBSUF)
+NAME=avformat
 ifeq ($(BUILD_SHARED),yes)
 LIBVERSION=$(LAVFVERSION)
 LIBMAJOR=$(LAVFMAJOR)
-NAME=avformat
-SLIBNAME= $(SLIBPREF)avformat$(SLIBSUF)
 AVCLIBS+=-lavcodec$(BUILDSUF) -L../libavcodec -lavutil$(BUILDSUF) -L../libavutil
 endif
 
index efa40da08e5d8ace0bad5da7261f3871bb5da6fa..a4b902c62a837700eb9a162beddddfdbbea9d101 100644 (file)
@@ -20,12 +20,10 @@ endif
 
 SRCS := $(OBJS:.o=.c)
 
-LIB= $(LIBPREF)avutil$(LIBSUF)
+NAME=avutil
 ifeq ($(BUILD_SHARED),yes)
 LIBVERSION=$(LAVUVERSION)
 LIBMAJOR=$(LAVUMAJOR)
-NAME=avutil
-SLIBNAME= $(SLIBPREF)avutil$(SLIBSUF)
 endif
 
 all: $(LIB) $(SLIBNAME)