]> git.sesse.net Git - mlt/commitdiff
On Windows install .def and version-less DLLs to let apps build against us.
authorDan Dennedy <dan@dennedy.org>
Mon, 17 Jan 2011 08:40:18 +0000 (00:40 -0800)
committerDan Dennedy <dan@dennedy.org>
Mon, 24 Jan 2011 01:39:43 +0000 (17:39 -0800)
src/framework/Makefile
src/mlt++/Makefile
src/mlt++/config.h

index dff362913427b03467d3479ba71fadff568c90f5..4cecdba00254478665d461a482e75de10b4ee6a4 100644 (file)
@@ -11,7 +11,7 @@ SHFLAGS += -install_name $(libdir)/$(SONAME) -current_version $(version) -compat
 else ifeq ($(targetos), MinGW)
 NAME = libmlt$(LIBSUF)
 TARGET = libmlt-$(soversion)$(LIBSUF)
-libdir = $(prefix)
+SHFLAGS += -Wl,--output-def,libmlt.def
 else
 NAME = libmlt$(LIBSUF)
 TARGET = $(NAME).$(version)
@@ -97,8 +97,12 @@ clean:
 
 install:
        install -d $(DESTDIR)$(libdir)
-       install -m 755 $(TARGET) $(DESTDIR)$(libdir)
-       if [ "$(targetos)" != "MinGW" ]; then \
+       if [ "$(targetos)" = "MinGW" ]; then \
+               install -m 755 $(TARGET) $(DESTDIR)$(prefix) ; \
+               install -m 755 $(TARGET) $(DESTDIR)$(libdir)/libmlt.dll ; \
+               install -m 644 libmlt.def $(DESTDIR)$(libdir) ; \
+       else \
+               install -m 755 $(TARGET) $(DESTDIR)$(libdir) ; \
                ln -sf $(TARGET) $(DESTDIR)$(libdir)/$(SONAME) ; \
                ln -sf $(TARGET) $(DESTDIR)$(libdir)/$(NAME) ; \
        fi
index efaa9a1b2e476b349e87fb23c21f497f783daf1b..3f8c4196833a85c77f0020ba3b179bee3169fc1a 100644 (file)
@@ -10,7 +10,8 @@ LIBFLAGS += -install_name $(libdir)/$(SONAME) -current_version $(version) -compa
 else ifeq ($(targetos), MinGW)
 NAME = libmlt++$(LIBSUF)
 TARGET = libmlt++-$(soversion)$(LIBSUF)
-libdir = $(prefix)
+CXXFLAGS += -DMLTPP_EXPORTS
+LIBFLAGS += -Wl,--output-def,libmlt++.def
 else
 NAME = libmlt++$(LIBSUF)
 TARGET = $(NAME).$(version)
@@ -67,10 +68,14 @@ distclean:  clean
 
 install:
        $(INSTALL) -d "$(DESTDIR)$(libdir)"
-       $(INSTALL) -m 755 $(TARGET) $(DESTDIR)$(libdir)
-       if [ "$(targetos)" != "MinGW" ]; then \
-               ln -sf $(TARGET) $(DESTDIR)$(libdir)/$(NAME) ; \
+       if [ "$(targetos)" = "MinGW" ]; then \
+               $(INSTALL) -m 755 $(TARGET) $(DESTDIR)$(prefix) ; \
+               $(INSTALL) -m 755 $(TARGET) $(DESTDIR)$(libdir)/libmlt++.dll ; \
+               $(INSTALL) -m 644 libmlt++.def $(DESTDIR)$(libdir) ; \
+       else \
+               $(INSTALL) -m 755 $(TARGET) $(DESTDIR)$(libdir) ; \
                ln -sf $(TARGET) $(DESTDIR)$(libdir)/$(SONAME) ; \
+               ln -sf $(TARGET) $(DESTDIR)$(libdir)/$(NAME) ; \
        fi
        $(INSTALL) -d "$(DESTDIR)$(prefix)/include/mlt++"
        $(INSTALL) -m 644 $(HEADERS) "$(DESTDIR)$(prefix)/include/mlt++"
index 454771e2787b57810478b15553822fa36c7bafc6..f25c66bd7a4c6ed71df4e18c7f8c54ce89371afc 100644 (file)
 #ifndef MLTPP_CONFIG_H_
 #define MLTPP_CONFIG_H_
 
-#if defined(WIN32) && defined(_MSC_VER)
+#if defined(WIN32)
     #ifdef MLTPP_EXPORTS
         #define MLTPP_DECLSPEC __declspec( dllexport )
     #else
         #define MLTPP_DECLSPEC __declspec( dllimport )
     #endif
 #else
-       #define MLTPP_DECLSPEC
+    #define MLTPP_DECLSPEC
 #endif
 
 #endif