]> sigrok.org Git - libserialport.git/blame_incremental - Makefile.am
windows: Handle the case where there are no serial ports at all.
[libserialport.git] / Makefile.am
... / ...
CommitLineData
1##
2## This file is part of the libserialport project.
3##
4## Copyright (C) 2010-2012 Bert Vermeulen <bert@biot.com>
5## Copyright (C) 2013 Martin Ling <martin-libserialport@earth.li>
6##
7## This program is free software: you can redistribute it and/or modify
8## it under the terms of the GNU Lesser General Public License as
9## published by the Free Software Foundation, either version 3 of the
10## License, or (at your option) any later version.
11##
12## This program is distributed in the hope that it will be useful,
13## but WITHOUT ANY WARRANTY; without even the implied warranty of
14## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15## GNU General Public License for more details.
16##
17## You should have received a copy of the GNU Lesser General Public License
18## along with this program. If not, see <http://www.gnu.org/licenses/>.
19##
20
21ACLOCAL_AMFLAGS = -I autostuff
22AM_LIBTOOLFLAGS = --silent
23GNUMAKEFLAGS = --no-print-directory
24
25# Enable more compiler warnings.
26AM_CFLAGS = -std=c99 -Wall -Wextra -pedantic -Wmissing-prototypes -Wshadow
27
28lib_LTLIBRARIES = libserialport.la
29
30libserialport_la_SOURCES = serialport.c timing.c libserialport_internal.h
31if LINUX
32libserialport_la_SOURCES += linux.c linux_termios.c linux_termios.h
33endif
34if WIN32
35libserialport_la_SOURCES += windows.c windows_ddk.c windows_ddk.h
36endif
37if MACOSX
38libserialport_la_SOURCES += macosx.c
39endif
40if FREEBSD
41libserialport_la_SOURCES += freebsd.c
42endif
43
44libserialport_la_LIBADD = $(SP_LIBS)
45
46libserialport_la_LDFLAGS = -version-info $(SP_LIB_VERSION) -no-undefined
47if MACOSX
48libserialport_la_LDFLAGS += -framework IOKit -framework CoreFoundation
49endif
50
51nodist_include_HEADERS = libserialport.h
52
53pkgconfigdir = $(libdir)/pkgconfig
54pkgconfig_DATA = libserialport.pc
55
56TESTS = test_timing
57check_PROGRAMS = test_timing
58test_timing_SOURCES = timing.c test_timing.c
59test_timing_CFLAGS = $(AM_CFLAGS)
60
61EXTRA_DIST = Doxyfile \
62 examples/Makefile \
63 examples/README \
64 examples/list_ports.c \
65 examples/port_info.c
66
67MAINTAINERCLEANFILES = ChangeLog
68
69.PHONY: ChangeLog doc
70
71ChangeLog:
72 git --git-dir '$(top_srcdir)/.git' log >$@ || touch $@
73
74dist-hook: ChangeLog
75
76doc: $(nodist_include_HEADERS) $(top_srcdir)/Doxyfile
77 doxygen $(top_srcdir)/Doxyfile