Created
December 1, 2011 02:44
-
-
Save rdp/1413008 to your computer and use it in GitHub Desktop.
get libdvdnav to cross compile/mingw--please read comments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git diff | |
diff --git a/Makefile b/Makefile | |
index dcb9407..e64b50c 100644 | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -9,7 +9,7 @@ RANLIB=ranlib | |
VPATH+= $(SRC_PATH_BARE)/src | |
CFLAGS += $(USEDEBUG) -Wall -funsigned-char | |
-CFLAGS += -I$(CURDIR) -I$(SRC_PATH)/src | |
+CFLAGS += -I$(CURDIR) -I$(SRC_PATH)/src | |
CFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE | |
CFLAGS += -DHAVE_CONFIG_H -DHAVE_DLFCN_H | |
@@ -78,7 +78,7 @@ ${DVDREAD_LIB}: version.h $(DVDREAD_OBJS) $(BUILDDEPS) | |
cd $(.OBJDIR) && $(RANLIB) $@ | |
${DVDREAD_SHLIB}: version.h $(DVDREAD_SHOBJS) $(BUILDDEPS) | |
- cd $(.OBJDIR) && $(CC) $(SHLDFLAGS) $(LDFLAGS) -ldl -Wl,-soname=$(DVDREAD_SHLIB).$(SHLIB_MAJOR) -o $@ $(DVDREA | |
+ cd $(.OBJDIR) && $(CC) $(SHLDFLAGS) $(LDFLAGS) -Wl,-soname=$(DVDREAD_SHLIB).$(SHLIB_MAJOR) -o $@ $(DVDREAD_SHO | |
.c.so: $(BUILDDEPS) | |
cd $(.OBJDIR) && $(CC) -fPIC -DPIC -MD $(CFLAGS) -c -o $@ $< | |
diff --git a/msvc/contrib/dlfcn.c b/msvc/contrib/dlfcn.c | |
index 3a00045..15f9ec6 100644 | |
--- a/msvc/contrib/dlfcn.c | |
+++ b/msvc/contrib/dlfcn.c | |
@@ -9,8 +9,8 @@ | |
#include <string.h> | |
#include <stdio.h> | |
-#include "dlfcn.h" | |
-#include "os_types.h" | |
+#include "../include/dlfcn.h" | |
+#include "../include/os_types.h" | |
void *dlopen(const char *module_name, int mode) | |
{ | |
diff --git a/src/dvd_input.c b/src/dvd_input.c | |
index 2a427ca..30ee0ed 100644 | |
--- a/src/dvd_input.c | |
+++ b/src/dvd_input.c | |
@@ -49,11 +49,12 @@ char * (*dvdinput_error) (dvd_input_t); | |
#else | |
/* dlopening libdvdcss */ | |
+#undef HAVE_DLFCN_H | |
#ifdef HAVE_DLFCN_H | |
#include <dlfcn.h> | |
#else | |
/* Only needed on MINGW at the moment */ | |
-#include "../../msvc/contrib/dlfcn.c" | |
+#include "../msvc/contrib/dlfcn.c" | |
#endif | |
typedef struct dvdcss_s *dvdcss_handle; |
after install run /usr/bin/i586-mingw32msvc-ranlib /usr/win32/lib/libdvdread.a
turns out this wasn't necessary see http://betterlogic.com/roger/2011/11/libdvdnav-compile-linker-woe/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
also rename the file INSTALL