Linus Walleij | fbbef8b | 2011-11-17 19:19:51 +0100 | [diff] [blame^] | 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 \ |
Linus Walleij | f3c4405 | 2008-08-16 21:14:56 +0000 | [diff] [blame] | 6 | music-players.h device-flags.h playlist-spl.h |
Linus Walleij | fbbef8b | 2011-11-17 19:19:51 +0100 | [diff] [blame^] | 7 | |
| 8 | if LIBUSB1_COMPILE |
| 9 | libmtp_la_SOURCES += libusb1-glue.c |
| 10 | endif |
| 11 | |
| 12 | if LIBUSB0_COMPILE |
| 13 | libmtp_la_SOURCES += libusb-glue.c |
| 14 | endif |
| 15 | |
Linus Walleij | eb8c6fe | 2006-02-03 09:46:22 +0000 | [diff] [blame] | 16 | include_HEADERS=libmtp.h |
Linus Walleij | b02a066 | 2006-04-25 08:05:09 +0000 | [diff] [blame] | 17 | EXTRA_DIST=libmtp.h.in libmtp.sym ptp-pack.c |
Linus Walleij | eb8c6fe | 2006-02-03 09:46:22 +0000 | [diff] [blame] | 18 | |
Linus Walleij | e8c5464 | 2006-03-28 09:45:00 +0000 | [diff] [blame] | 19 | # --------------------------------------------------------------------------- |
| 20 | # Advanced information about versioning: |
| 21 | # * "Writing shared libraries" by Mike Hearn |
Linus Walleij | 1aec6fd | 2011-06-08 09:08:33 +0200 | [diff] [blame] | 22 | # http://plan99.net/~mike/writing-shared-libraries.html |
Linus Walleij | e8c5464 | 2006-03-28 09:45:00 +0000 | [diff] [blame] | 23 | # * libtool.info chapter "Versioning" |
| 24 | # * libtool.info chapter "Updating library version information" |
| 25 | # --------------------------------------------------------------------------- |
| 26 | # Versioning: |
| 27 | # - CURRENT (Major): Increment if the interface has changes. AGE is always |
| 28 | # *changed* at the same time. |
| 29 | # - AGE (Micro): Increment if any interfaces have been added; set to 0 |
Linus Walleij | 362d13e | 2009-08-02 19:59:21 +0000 | [diff] [blame] | 30 | # if any interfaces have been removed. Removal has |
Linus Walleij | e8c5464 | 2006-03-28 09:45:00 +0000 | [diff] [blame] | 31 | # precedence over adding, so set to 0 if both happened. |
| 32 | # It denotes upward compatibility. |
Linus Walleij | 362d13e | 2009-08-02 19:59:21 +0000 | [diff] [blame] | 33 | # - REVISION (Minor): Increment any time the source changes; set to |
Linus Walleij | e8c5464 | 2006-03-28 09:45:00 +0000 | [diff] [blame] | 34 | # 0 if you incremented CURRENT. |
| 35 | # |
| 36 | # To summarize. Any interface *change* increment CURRENT. If that interface |
Linus Walleij | 362d13e | 2009-08-02 19:59:21 +0000 | [diff] [blame] | 37 | # change does not break upward compatibility (ie it is an addition), |
| 38 | # increment AGE, Otherwise AGE is reset to 0. If CURRENT has changed, |
Linus Walleij | e8c5464 | 2006-03-28 09:45:00 +0000 | [diff] [blame] | 39 | # REVISION is set to 0, otherwise REVISION is incremented. |
| 40 | # --------------------------------------------------------------------------- |
Linus Walleij | 1aec6fd | 2011-06-08 09:08:33 +0200 | [diff] [blame] | 41 | CURRENT=9 |
| 42 | AGE=0 |
Linus Walleij | d5ab76b | 2011-10-22 15:04:02 +0200 | [diff] [blame] | 43 | REVISION=1 |
Linus Walleij | eb8c6fe | 2006-02-03 09:46:22 +0000 | [diff] [blame] | 44 | SOVERSION=$(CURRENT):$(REVISION):$(AGE) |
Linus Walleij | 6f05002 | 2009-05-06 21:14:41 +0000 | [diff] [blame] | 45 | LT_CURRENT_MINUS_AGE=`expr $(CURRENT) - $(AGE)` |
Linus Walleij | eb8c6fe | 2006-02-03 09:46:22 +0000 | [diff] [blame] | 46 | |
| 47 | if COMPILE_MINGW32 |
Linus Walleij | 6f05002 | 2009-05-06 21:14:41 +0000 | [diff] [blame] | 48 | W32_LIBS=-lws2_32 |
| 49 | W32_LDFLAGS=-export-dynamic |
| 50 | if MS_LIB_EXE |
Linus Walleij | eb8c6fe | 2006-02-03 09:46:22 +0000 | [diff] [blame] | 51 | noinst_DATA=libmtp.lib |
Linus Walleij | 6f05002 | 2009-05-06 21:14:41 +0000 | [diff] [blame] | 52 | libmtp.def: $(srcdir)/libmtp.sym |
Linus Walleij | eb8c6fe | 2006-02-03 09:46:22 +0000 | [diff] [blame] | 53 | echo "LIBRARY \"@PACKAGE@\"" > libmtp.def |
| 54 | echo "DESCRIPTION \"Media Transfer Protocol (MTP) library\"" >> libmtp.def |
| 55 | echo "VERSION @VERSION@" >> libmtp.def |
| 56 | echo >> libmtp.def |
| 57 | echo "EXPORTS" >> libmtp.def |
Linus Walleij | 6f05002 | 2009-05-06 21:14:41 +0000 | [diff] [blame] | 58 | cat $< >> libmtp.def |
Linus Walleij | eb8c6fe | 2006-02-03 09:46:22 +0000 | [diff] [blame] | 59 | libmtp.lib: libmtp.la libmtp.def |
| 60 | lib -name:libmtp-$(LT_CURRENT_MINUS_AGE).dll -def:libmtp.def -out:$@ |
| 61 | install-data-local: libmtp.lib libmtp.def |
| 62 | $(INSTALL) libmtp.def $(DESTDIR)$(libdir) |
| 63 | $(INSTALL) libmtp.lib $(DESTDIR)$(libdir) |
| 64 | endif |
Linus Walleij | 6f05002 | 2009-05-06 21:14:41 +0000 | [diff] [blame] | 65 | endif |
Linus Walleij | 8609af3 | 2006-12-28 21:25:17 +0000 | [diff] [blame] | 66 | |
Linus Walleij | 6f05002 | 2009-05-06 21:14:41 +0000 | [diff] [blame] | 67 | libmtp_la_LDFLAGS=@LDFLAGS@ -no-undefined -export-symbols $(srcdir)/libmtp.sym -version-info $(SOVERSION) $(W32_LDFLAGS) |
Linus Walleij | fbbef8b | 2011-11-17 19:19:51 +0100 | [diff] [blame^] | 68 | libmtp_la_LIBADD=$(W32_LIBS) $(LTLIBICONV) @LIBUSB_LIBS@ |
Linus Walleij | 6f05002 | 2009-05-06 21:14:41 +0000 | [diff] [blame] | 69 | libmtp_la_DEPENDENCIES=$(srcdir)/libmtp.sym |
Linus Walleij | dd987c3 | 2009-01-06 00:35:05 +0000 | [diff] [blame] | 70 | |
Marcus Meissner | adffb35 | 2011-01-31 09:18:55 +0100 | [diff] [blame] | 71 | DISTCLEANFILES = _stdint.h gphoto2-endian.h |