• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1lib_LTLIBRARIES = libmtp.la
2
3libmtp_la_CFLAGS = @LIBUSB_CFLAGS@
4libmtp_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
9if MTPZ_COMPILE
10libmtp_la_SOURCES += mtpz.c
11endif
12
13if LIBUSB1_COMPILE
14libmtp_la_SOURCES += libusb1-glue.c
15endif
16
17if LIBUSB0_COMPILE
18libmtp_la_SOURCES += libusb-glue.c
19endif
20
21if LIBOPENUSB_COMPILE
22libmtp_la_SOURCES += libopenusb1-glue.c
23endif
24
25include_HEADERS=libmtp.h
26EXTRA_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# ---------------------------------------------------------------------------
50CURRENT=12
51AGE=3
52REVISION=0
53SOVERSION=$(CURRENT):$(REVISION):$(AGE)
54LT_CURRENT_MINUS_AGE=`expr $(CURRENT) - $(AGE)`
55
56if COMPILE_MINGW32
57W32_LIBS=-lws2_32
58W32_LDFLAGS=-export-dynamic
59if MS_LIB_EXE
60noinst_DATA=libmtp.lib
61libmtp.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
68libmtp.lib: libmtp.la libmtp.def
69	lib -name:libmtp-$(LT_CURRENT_MINUS_AGE).dll -def:libmtp.def -out:$@
70install-data-local: libmtp.lib libmtp.def
71	$(INSTALL) libmtp.def $(DESTDIR)$(libdir)
72	$(INSTALL) libmtp.lib $(DESTDIR)$(libdir)
73endif
74endif
75
76libmtp_la_LDFLAGS=@LDFLAGS@ -no-undefined -export-symbols $(srcdir)/libmtp.sym -version-info $(SOVERSION) $(W32_LDFLAGS)
77libmtp_la_LIBADD=$(W32_LIBS) $(LTLIBICONV) @LIBUSB_LIBS@
78libmtp_la_DEPENDENCIES=$(srcdir)/libmtp.sym
79
80DISTCLEANFILES = _stdint.h gphoto2-endian.h
81