1 lib_LTLIBRARIES = libmtp.la 2 3 libmtp_la_CFLAGS = @LIBUSB_CFLAGS@ 4 libmtp_la_SOURCES = libmtp.c unicode.c unicode.h util.c util.h playlist-spl.c \ 5 gphoto2-endian.h _stdint.h ptp.c ptp.h libusb-glue.h \ 6 music-players.h device-flags.h playlist-spl.h mtpz.h \ 7 chdk_live_view.h chdk_ptp.h 8 9 if MTPZ_COMPILE 10 libmtp_la_SOURCES += mtpz.c 11 endif 12 13 if LIBUSB1_COMPILE 14 libmtp_la_SOURCES += libusb1-glue.c 15 endif 16 17 if LIBUSB0_COMPILE 18 libmtp_la_SOURCES += libusb-glue.c 19 endif 20 21 if LIBOPENUSB_COMPILE 22 libmtp_la_SOURCES += libopenusb1-glue.c 23 endif 24 25 include_HEADERS=libmtp.h 26 EXTRA_DIST=libmtp.h.in libmtp.sym ptp-pack.c 27 28 # --------------------------------------------------------------------------- 29 # Advanced information about versioning: 30 # * "Writing shared libraries" by Mike Hearn 31 # http://plan99.net/~mike/writing-shared-libraries.html 32 # * libtool.info chapter "Versioning" 33 # * libtool.info chapter "Updating library version information" 34 # --------------------------------------------------------------------------- 35 # Versioning: 36 # - CURRENT (Major): Increment if the interface has changes. AGE is always 37 # *changed* at the same time. 38 # - AGE (Micro): Increment if any interfaces have been added; set to 0 39 # if any interfaces have been removed. Removal has 40 # precedence over adding, so set to 0 if both happened. 41 # It denotes upward compatibility. 42 # - REVISION (Minor): Increment any time the source changes; set to 43 # 0 if you incremented CURRENT. 44 # 45 # To summarize. Any interface *change* increment CURRENT. If that interface 46 # change does not break upward compatibility (ie it is an addition), 47 # increment AGE, Otherwise AGE is reset to 0. If CURRENT has changed, 48 # REVISION is set to 0, otherwise REVISION is incremented. 49 # --------------------------------------------------------------------------- 50 CURRENT=12 51 AGE=3 52 REVISION=0 53 SOVERSION=$(CURRENT):$(REVISION):$(AGE) 54 LT_CURRENT_MINUS_AGE=`expr $(CURRENT) - $(AGE)` 55 56 if COMPILE_MINGW32 57 W32_LIBS=-lws2_32 58 W32_LDFLAGS=-export-dynamic 59 if MS_LIB_EXE 60 noinst_DATA=libmtp.lib 61 libmtp.def: $(srcdir)/libmtp.sym 62 echo "LIBRARY \"@PACKAGE@\"" > libmtp.def 63 echo "DESCRIPTION \"Media Transfer Protocol (MTP) library\"" >> libmtp.def 64 echo "VERSION @VERSION@" >> libmtp.def 65 echo >> libmtp.def 66 echo "EXPORTS" >> libmtp.def 67 cat $< >> libmtp.def 68 libmtp.lib: libmtp.la libmtp.def 69 lib -name:libmtp-$(LT_CURRENT_MINUS_AGE).dll -def:libmtp.def -out:$@ 70 install-data-local: libmtp.lib libmtp.def 71 $(INSTALL) libmtp.def $(DESTDIR)$(libdir) 72 $(INSTALL) libmtp.lib $(DESTDIR)$(libdir) 73 endif 74 endif 75 76 libmtp_la_LDFLAGS=@LDFLAGS@ -no-undefined -export-symbols $(srcdir)/libmtp.sym -version-info $(SOVERSION) $(W32_LDFLAGS) 77 libmtp_la_LIBADD=$(W32_LIBS) $(LTLIBICONV) @LIBUSB_LIBS@ 78 libmtp_la_DEPENDENCIES=$(srcdir)/libmtp.sym 79 80 DISTCLEANFILES = _stdint.h gphoto2-endian.h 81