]>
Commit | Line | Data |
---|---|---|
0662f2bb ML |
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 | ||
21 | ACLOCAL_AMFLAGS = -I autostuff | |
f1c916ed | 22 | AM_LIBTOOLFLAGS = --silent |
962143bc | 23 | GNUMAKEFLAGS = --no-print-directory |
0662f2bb | 24 | |
025c2644 UH |
25 | # Enable more compiler warnings. |
26 | AM_CFLAGS = -std=c99 -Wall -Wextra -pedantic -Wmissing-prototypes -Wshadow | |
0838c979 ML |
27 | # Set flag used in libserialport.h to indicate we are building the library |
28 | # using autotools. | |
29 | AM_CFLAGS += -DLIBSERIALPORT_ATBUILD | |
025c2644 | 30 | |
0662f2bb ML |
31 | lib_LTLIBRARIES = libserialport.la |
32 | ||
39acdc47 | 33 | libserialport_la_SOURCES = serialport.c timing.c libserialport_internal.h |
27e231ff | 34 | if LINUX |
e33dcf90 ML |
35 | libserialport_la_SOURCES += linux.c linux_termios.c linux_termios.h |
36 | endif | |
37 | if WIN32 | |
e9d78d82 | 38 | libserialport_la_SOURCES += windows.c |
e33dcf90 ML |
39 | endif |
40 | if MACOSX | |
41 | libserialport_la_SOURCES += macosx.c | |
27e231ff | 42 | endif |
ccd512d5 UJ |
43 | if FREEBSD |
44 | libserialport_la_SOURCES += freebsd.c | |
45 | endif | |
0662f2bb | 46 | |
f1c916ed | 47 | libserialport_la_LIBADD = $(SP_LIBS) |
6692d8c1 | 48 | |
f1c916ed | 49 | libserialport_la_LDFLAGS = -version-info $(SP_LIB_VERSION) -no-undefined |
025c2644 UH |
50 | if MACOSX |
51 | libserialport_la_LDFLAGS += -framework IOKit -framework CoreFoundation | |
52 | endif | |
53 | ||
f1c916ed | 54 | nodist_include_HEADERS = libserialport.h |
0662f2bb ML |
55 | |
56 | pkgconfigdir = $(libdir)/pkgconfig | |
57 | pkgconfig_DATA = libserialport.pc | |
58 | ||
8073f87d ML |
59 | TESTS = test_timing |
60 | check_PROGRAMS = test_timing | |
61 | test_timing_SOURCES = timing.c test_timing.c | |
62 | test_timing_CFLAGS = $(AM_CFLAGS) | |
63 | ||
d9cc984f UH |
64 | EXTRA_DIST = Doxyfile \ |
65 | examples/Makefile \ | |
66 | examples/README \ | |
67 | examples/list_ports.c \ | |
9ddf0858 | 68 | examples/port_info.c \ |
47200531 | 69 | examples/port_config.c \ |
a20ed296 | 70 | examples/await_events.c \ |
47200531 | 71 | examples/handle_errors.c |
8814faa3 | 72 | |
0662f2bb ML |
73 | MAINTAINERCLEANFILES = ChangeLog |
74 | ||
f1c916ed DE |
75 | .PHONY: ChangeLog doc |
76 | ||
0662f2bb | 77 | ChangeLog: |
962143bc | 78 | git --git-dir '$(top_srcdir)/.git' log >$@ || touch $@ |
0662f2bb ML |
79 | |
80 | dist-hook: ChangeLog | |
cd5f5281 | 81 | |
f1c916ed | 82 | doc: $(nodist_include_HEADERS) $(top_srcdir)/Doxyfile |
104f093d | 83 | doxygen $(top_srcdir)/Doxyfile |