forked from sionescu/libfixposix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
175 lines (139 loc) · 5.14 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# -*- makefile-automake -*-
########################################################################
# #
# Global Automake variables #
# #
########################################################################
ACLOCAL_AMFLAGS = -I config/m4
AM_CFLAGS = $(LFP_CFLAGS) -fvisibility=hidden
AM_CPPFLAGS = -include $(top_builddir)/config.h \
-include $(top_srcdir)/src/lib/aux/macros.h \
-I$(top_srcdir)/src/include \
-I$(top_builddir)/src/include
EXTRA_DIST = \
LICENCE \
README.md \
VERSION \
distro/debian \
distro/libfixposix.spec \
distro/libfixposix.rpmlintrc \
distro/PKGBUILD \
src/tests/lib \
$(wildcard $(top_srcdir)/src/tests/*.in)
########################################################################
# #
# PKG-CONFIG #
# #
########################################################################
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = src/libfixposix.pc
########################################################################
# #
# libfixposix.so #
# #
########################################################################
lib_LTLIBRARIES = src/lib/libfixposix.la
# Private headers, used only for internal definitions
# The only purpose of this definition it to ensure that
# «make dist» knows about them
noinst_HEADERS = \
src/lib/aux/inlines.h \
src/lib/aux/macros.h \
src/lib/bitset.h \
src/lib/spawn.h
include_HEADERS = src/include/lfp.h
include_lfpdir = $(includedir)/lfp
include_lfp_HEADERS = \
src/include/lfp/aux.h \
src/include/lfp/stdlib.h \
src/include/lfp/string.h \
src/include/lfp/strerror.h \
src/include/lfp/errno.h \
src/include/lfp/fcntl.h \
src/include/lfp/stat.h \
src/include/lfp/unistd.h \
src/include/lfp/ioctl.h \
src/include/lfp/mman.h \
src/include/lfp/select.h \
src/include/lfp/socket.h \
src/include/lfp/wait.h \
src/include/lfp/signal.h \
src/include/lfp/spawn.h \
src/include/lfp/dirent.h \
$(top_builddir)/src/include/lfp/time.h \
src/include/lfp/resource.h \
src/include/lfp/sendfile.h \
src/include/lfp/syslog.h \
src/include/lfp/buildinfo.h
# src/include/lfp/signalfd.h
src_lib_libfixposix_la_SOURCES = \
src/libfixposix.libtool \
src/lib/stdlib.c \
src/lib/string.c \
src/lib/strerror.c \
src/lib/errno.c \
src/lib/fcntl.c \
src/lib/stat.c \
src/lib/unistd.c \
src/lib/ioctl.c \
src/lib/mman.c \
src/lib/select.c \
src/lib/socket.c \
src/lib/wait.c \
src/lib/signal.c \
src/lib/spawnattr.c \
src/lib/bitset.c \
src/lib/spawn_file_actions.c \
src/lib/spawn.c \
src/lib/dirent.c \
src/lib/time.c \
src/lib/resource.c \
src/lib/sendfile.c \
src/lib/syslog.c \
src/lib/buildinfo.c
# src/lib/install_signalfd.c
src_lib_libfixposix_la_DEPENDENCIES = \
src/libfixposix.libtool
src_lib_libfixposix_la_LIBADD = $(LFP_LIBS)
src_lib_libfixposix_la_LDFLAGS = $(LFP_LDFLAGS) -no-undefined \
-version-info `@AWK@ '/^Version:/ { print $$2 }' $(top_srcdir)/src/libfixposix.libtool`
########################################################################
# #
# TESTS #
# #
########################################################################
if TESTS
LOG_DRIVER = env AM_TAP_AWK='$(AWK)' \
TOP_SRCDIR=$(top_srcdir) \
TOP_BUILDDIR=$(top_builddir) \
$(SHELL) $(top_srcdir)/config/aux/tap-driver.sh
compile_tests = \
src/tests/buildinfo
run_tests = \
src/tests/spawn \
src/tests/select \
src/tests/mkstemp
check_PROGRAMS = $(compile_tests) $(run_tests)
check_SCRIPTS = \
src/tests/buildinfo.bats
# Bats tests must be created by /.configure to get the correct path of
# the Bats interpreter, but the configure script fails to preserve the
# execute bit, so we restore it here.
%.bats: %.bats.in $(top_builddir)/Makefile
sed 's:\@BATSPATH\@:$(BATSPATH):' < $< > $@
chmod +x $@
TESTS = ${run_tests} ${check_SCRIPTS}
XFAIL_TESTS =
src_tests_buildinfo_SOURCES = src/tests/buildinfo.c
src_tests_buildinfo_CFLAGS = @CHECK_CFLAGS@
src_tests_buildinfo_LDADD = @CHECK_LIBS@ $(top_builddir)/src/lib/libfixposix.la
src_tests_spawn_SOURCES = src/tests/spawn.c
src_tests_spawn_CFLAGS = @CHECK_CFLAGS@
src_tests_spawn_LDADD = @CHECK_LIBS@ $(top_builddir)/src/lib/libfixposix.la
src_tests_select_SOURCES = src/tests/select.c
src_tests_select_CFLAGS = @CHECK_CFLAGS@
src_tests_select_LDADD = @CHECK_LIBS@ $(top_builddir)/src/lib/libfixposix.la
src_tests_mkstemp_SOURCES = src/tests/mkstemp.c
src_tests_mkstemp_CFLAGS = @CHECK_CFLAGS@
src_tests_mkstemp_LDADD = @CHECK_LIBS@ $(top_builddir)/src/lib/libfixposix.la
endif