meson: Simplify code for libusb dependency
[libjaylink.git] / libjaylink / Makefile.am
blob073591aa78765283707005ebf73b78a6f915f6a8
1 ##
2 ## This file is part of the libjaylink project.
3 ##
4 ## Copyright (C) 2014-2015 Marc Schink <jaylink-dev@marcschink.de>
5 ##
6 ## This program is free software: you can redistribute it and/or modify
7 ## it under the terms of the GNU General Public License as published by
8 ## the Free Software Foundation, either version 2 of the License, or
9 ## (at your option) any later version.
11 ## This program is distributed in the hope that it will be useful,
12 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 ## GNU General Public License for more details.
16 ## You should have received a copy of the GNU General Public License
17 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 if SUBPROJECT_BUILD
21 noinst_LTLIBRARIES = libjaylink.la
22 else
23 lib_LTLIBRARIES = libjaylink.la
25 library_includedir = $(includedir)/libjaylink
26 library_include_HEADERS = libjaylink.h
27 nodist_library_include_HEADERS = version.h
28 endif
30 libjaylink_la_SOURCES = \
31         buffer.c \
32         core.c \
33         c2.c \
34         device.c \
35         discovery.c \
36         discovery_tcp.c \
37         emucom.c \
38         error.c \
39         fileio.c \
40         jtag.c \
41         list.c \
42         log.c \
43         socket.c \
44         spi.c \
45         strutil.c \
46         swd.c \
47         swo.c \
48         target.c \
49         transport.c \
50         transport_tcp.c \
51         util.c \
52         version.c
54 libjaylink_la_CFLAGS = $(JAYLINK_CFLAGS)
55 libjaylink_la_LDFLAGS = $(JAYLINK_LDFLAGS) -no-undefined
56 libjaylink_la_LIBADD = $(JAYLINK_LIBS)
58 if HAVE_LIBUSB
59 libjaylink_la_SOURCES += discovery_usb.c transport_usb.c
60 libjaylink_la_CFLAGS += $(libusb_CFLAGS)
61 libjaylink_la_LIBADD += $(libusb_LIBS)
62 endif
64 noinst_HEADERS = libjaylink-internal.h