summaryrefslogtreecommitdiff
path: root/src/Makefile.am
blob: 1c47087dfc936345d656133fd5d68df1c4f8dcc3 (plain)
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
####
# Seccomp Library Source Files
#

#
# This library is free software; you can redistribute it and/or modify it
# under the terms of version 2.1 of the GNU Lesser General Public License
# as published by the Free Software Foundation.
#
# This library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this library; if not, see <http://www.gnu.org/licenses>.
#

SUBDIRS = .
if ENABLE_PYTHON
SUBDIRS += python
endif

SOURCES_ALL = \
	api.c system.h system.c helper.h helper.c \
	gen_pfc.h gen_pfc.c gen_bpf.h gen_bpf.c \
	hash.h hash.c \
	db.h db.c \
	arch.c arch.h \
	arch-x86.h arch-x86.c \
	arch-x86_64.h arch-x86_64.c \
	arch-x32.h arch-x32.c \
	arch-arm.h arch-arm.c \
	arch-aarch64.h arch-aarch64.c \
	arch-loongarch64.h arch-loongarch64.c \
	arch-m68k.h arch-m68k.c \
	arch-mips.h arch-mips.c \
	arch-mips64.h arch-mips64.c \
	arch-mips64n32.h arch-mips64n32.c \
	arch-parisc.h arch-parisc.c \
	arch-parisc64.h arch-parisc64.c \
	arch-ppc.h arch-ppc.c \
	arch-ppc64.h arch-ppc64.c \
	arch-riscv64.h arch-riscv64.c \
	arch-s390.h arch-s390.c \
	arch-s390x.h arch-s390x.c \
	arch-sh.h arch-sh.c \
	syscalls.h syscalls.c syscalls.perf.c

EXTRA_DIST = \
	arch-syscall-validate arch-syscall-check \
	arch-gperf-generate syscalls.csv syscalls.perf.template

TESTS = arch-syscall-check

check_PROGRAMS = arch-syscall-dump

lib_LTLIBRARIES = libseccomp.la

arch_syscall_dump_SOURCES = arch-syscall-dump.c ${SOURCES_ALL}

libseccomp_la_SOURCES = ${SOURCES_ALL}
libseccomp_la_CPPFLAGS = ${AM_CPPFLAGS} ${CODE_COVERAGE_CPPFLAGS}
libseccomp_la_CFLAGS = ${AM_CFLAGS} ${CODE_COVERAGE_CFLAGS} ${CFLAGS} \
	-fPIC -DPIC -fvisibility=hidden
libseccomp_la_LDFLAGS = ${AM_LDFLAGS} ${CODE_COVERAGE_LDFLAGS} ${LDFLAGS} \
	-version-number ${VERSION_MAJOR}:${VERSION_MINOR}:${VERSION_MICRO}

EXTRA_DIST += syscalls.perf.c syscalls.perf
CLEANFILES = syscalls.perf.c syscalls.perf

syscalls.perf: syscalls.csv syscalls.perf.template
	${AM_V_GEN} ${srcdir}/arch-gperf-generate \
		${srcdir}/syscalls.csv ${srcdir}/syscalls.perf.template

syscalls.perf.c: syscalls.perf
	${GPERF} -m 100 --null-strings --pic -tCEG -T -S1 $< > $@

check-build:
	${MAKE} ${AM_MAKEFLAGS} ${check_PROGRAMS}