[DVDnav-discuss] r965 - in trunk/libdvdnav: Makefile misc/dvdnav-config2.sh

nicodvb subversion at mplayerhq.hu
Sat Nov 17 22:26:10 CET 2007


Author: nicodvb
Date: Sat Nov 17 22:26:09 2007
New Revision: 965

Log:
build libdvdnavmini.so with the same rules as libdvdnav.so, but without linking -ldvdread (mplayer works this way)

Modified:
   trunk/libdvdnav/Makefile
   trunk/libdvdnav/misc/dvdnav-config2.sh

Modified: trunk/libdvdnav/Makefile
==============================================================================
--- trunk/libdvdnav/Makefile	(original)
+++ trunk/libdvdnav/Makefile	Sat Nov 17 22:26:09 2007
@@ -23,6 +23,7 @@ CFLAGS += -DHAVE_CONFIG_H -DHAVE_DLFCN_H
 
 ifeq ($(DVDREAD),internal)
 L=libdvdnav
+MINI_L=libdvdnavmini
 DVDREAD_L=libdvdread
 VPATH+= $(SRC_PATH_BARE)/src/dvdread
 DVDREAD_HEADERS = src/dvdread/dvd_reader.h \
@@ -44,6 +45,7 @@ endif
 LIB = $(L).a
 DVDREAD_LIB = $(DVDREAD_L).a
 SHLIB = $(L).so
+MINI_SHLIB = $(MINI_L).so
 DVDREAD_SHLIB = $(DVDREAD_L).so
 
 .OBJDIR=        obj
@@ -59,7 +61,7 @@ DVDREAD_DEPS= ${DVDREAD_OBJS:%.o=%.d}
 BUILDDEPS = Makefile config.mak
 
 ifeq ($(BUILD_SHARED),yes)
-all:	$(SHLIB) $(DVDREAD_SHLIB) dvdnav-config
+all:	$(SHLIB) $(MINI_SHLIB) $(DVDREAD_SHLIB) dvdnav-config
 install: $(SHLIB) $(DVDREAD_SHLIB) install-shared install-dvdnav-config
 endif
 
@@ -95,6 +97,8 @@ ${DVDREAD_LIB}: version.h $(.OBJDIR) $(D
 
 ${SHLIB}: version.h $(.OBJDIR) $(SHOBJS) $(BUILDDEPS)
 	cd $(.OBJDIR) && $(CC) $(SHLDFLAGS) -ldvdread $(THREADLIB) -o $@ $(SHOBJS)
+${MINI_SHLIB}: version.h $(.OBJDIR) $(SHOBJS) $(BUILDDEPS)
+	cd $(.OBJDIR) && $(CC) $(SHLDFLAGS) $(THREADLIB) -o $@ $(SHOBJS)
 ${DVDREAD_SHLIB}: version.h $(.OBJDIR) $(DVDREAD_SHOBJS) $(BUILDDEPS)
 	cd $(.OBJDIR) && $(CC) $(SHLDFLAGS) -ldl -o $@ $(DVDREAD_SHOBJS)
 
@@ -118,16 +122,22 @@ install-shared: $(SHLIB)
 
 	install $(INSTALLSTRIP) -m 755 $(.OBJDIR)/$(SHLIB) \
 		$(shlibdir)/$(SHLIB).$(SHLIB_VERSION)
+	install $(INSTALLSTRIP) -m 755 $(.OBJDIR)/$(MINI_SHLIB) \
+		$(shlibdir)/$(MINI_SHLIB).$(SHLIB_VERSION)
 	install $(INSTALLSTRIP) -m 755 $(.OBJDIR)/$(DVDREAD_SHLIB) \
 		$(shlibdir)/$(DVDREAD_SHLIB).$(SHLIB_VERSION)
 
 	cd $(shlibdir) && \
 		ln -sf $(SHLIB).$(SHLIB_VERSION) $(SHLIB).$(SHLIB_MAJOR)
 	cd $(shlibdir) && \
+		ln -sf $(MINI_SHLIB).$(SHLIB_VERSION) $(MINI_SHLIB).$(SHLIB_MAJOR)
+	cd $(shlibdir) && \
 		ln -sf $(DVDREAD_SHLIB).$(SHLIB_VERSION) $(DVDREAD_SHLIB).$(SHLIB_MAJOR)
 	cd $(shlibdir) && \
 		ln -sf $(SHLIB).$(SHLIB_MAJOR) $(SHLIB)
 	cd $(shlibdir) && \
+		ln -sf $(MINI_SHLIB).$(SHLIB_MAJOR) $(MINI_SHLIB)
+	cd $(shlibdir) && \
 		ln -sf $(DVDREAD_SHLIB).$(SHLIB_MAJOR) $(DVDREAD_SHLIB)
 
 install-static: $(LIB)

Modified: trunk/libdvdnav/misc/dvdnav-config2.sh
==============================================================================
--- trunk/libdvdnav/misc/dvdnav-config2.sh	(original)
+++ trunk/libdvdnav/misc/dvdnav-config2.sh	Sat Nov 17 22:26:09 2007
@@ -1,6 +1,7 @@
 dvdreadlib="-ldvdread"
+dvdreadmsg="[--minilibs]"
 if test "$dvdread" = "external"; then
-    dvdreadmsg="[--minilibs --minicflags]"
+    dvdreadmsg="[--minicflags]"
     dvdreadcflags="-I$dvdreaddir"
     extracflags="-DDVDNAV_USES_EXTERNAL_DVDREAD"
 fi
@@ -50,11 +51,7 @@ while test $# -gt 0; do
       echo_libs=yes
       ;;
     --minilibs)
-      if test "$dvdread" = "external"; then
           echo_minilibs=yes
-      else
-          usage 1 1>&2
-      fi
       ;;
     *)
       usage 1 1>&2



More information about the DVDnav-discuss mailing list