Signed-off-by: Paul Moore <[email protected]>
---
configure.ac | 4 +++-
src/Makefile.am | 27 ++++++++++++++++++++-------
src/python/Makefile.am | 7 ++++---
src/python/setup.py | 2 +-
tests/Makefile.am | 2 +-
tools/Makefile.am | 4 ++--
6 files changed, 31 insertions(+), 15 deletions(-)
diff --git a/configure.ac b/configure.ac
index b6788ea..66d149a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,7 +15,9 @@ m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AC_DISABLE_STATIC
LT_INIT
-
+dnl ####
+dnl build flags
+dnl ####
AM_CPPFLAGS="-I\${top_srcdir}/include"
AM_CFLAGS="-Wall"
AM_LDFLAGS="-Wl,-z -Wl,relro"
diff --git a/src/Makefile.am b/src/Makefile.am
index 3148e8c..59a1574 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,14 +5,27 @@ if ENABLE_PYTHON
SUBDIRS += python
endif
+SOURCES = \
+ api.c arch.c db.c gen_pfc.c gen_bpf.c hash.c \
+ arch-x86.c arch-x86-syscalls.c \
+ arch-x86_64.c arch-x86_64-syscalls.c \
+ arch-x32.c arch-x32-syscalls.c \
+ arch-arm.c arch-arm-syscalls.c \
+ arch-mips.c arch-mips-syscalls.c \
+ \
+ arch.h db.h gen_bpf.h gen_pfc.h hash.h system.h \
+ arch-x86.h arch-x86_64.h arch-x32.h\
+ arch-arm.h \
+ arch-mips.h
+
+noinst_LTLIBRARIES = libseccomp-internal.la
+
+libseccomp_internal_la_SOURCES = ${SOURCES}
+
lib_LTLIBRARIES = libseccomp.la
-libseccomp_la_SOURCES = api.c arch.c arch-x86.c arch-x86-syscalls.c \
- arch-x86_64.c arch-x86_64-syscalls.c arch-x32.c arch-x32-syscalls.c \
- arch-arm.c arch-arm-syscalls.c arch-mips.c arch-mips-syscalls.c \
- db.c hash.c gen_pfc.c gen_bpf.c \
- \
- arch-mips.h arch-arm.h arch-x32.h arch-x86.h arch-x86_64.h arch.h \
- db.h gen_bpf.h gen_pfc.h hash.h system.h
+libseccomp_la_SOURCES = ${SOURCES}
+libseccomp_la_CFLAGS = -fvisibility=hidden
libseccomp_la_LDFLAGS = \
-version-number ${VERSION_MAJOR}:${VERSION_MINOR}:${VERSION_MICRO}
+
diff --git a/src/python/Makefile.am b/src/python/Makefile.am
index 48dcc66..1559984 100644
--- a/src/python/Makefile.am
+++ b/src/python/Makefile.am
@@ -4,8 +4,9 @@ PYTHON = /usr/bin/env python
PY_DISTUTILS = \
VERSION_RELEASE="@PACKAGE_VERSION@" \
- CFLAGS="-I\${top_srcdir}/include ${CFLAGS} ${CPPFLAGS}" \
- LDFLAGS="${LDFLAGS}" \
+ CPPFLAGS="-I\${top_srcdir}/include ${AM_CPPFLAGS} ${CPPFLAGS}" \
+ CFLAGS="${AM_CFLAGS} ${CFLAGS}" \
+ LDFLAGS="${AM_LDFLAGS} ${LDFLAGS}" \
${PYTHON} ./setup.py
# support silent builds
@@ -18,7 +19,7 @@ PY_INSTALL = ${PY_DISTUTILS} install
all-local: build
-build: ../libseccomp.la libseccomp.pxd seccomp.pyx
+build: ../libseccomp-internal.la libseccomp.pxd seccomp.pyx
${PY_BUILD} && touch build
install-exec-local: build
diff --git a/src/python/setup.py b/src/python/setup.py
index 62ba24a..a8a95df 100644
--- a/src/python/setup.py
+++ b/src/python/setup.py
@@ -40,6 +40,6 @@ setup(
cmdclass = {'build_ext': build_ext},
ext_modules = [
Extension("seccomp", ["seccomp.pyx"],
- extra_objects=["../.libs/libseccomp.so"])
+ extra_objects=["../libseccomp-internal.la"])
]
)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d0c6a44..7d76267 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,7 +1,7 @@
# -*- Makefile -*-
AM_LDFLAGS = -static
-LDADD = util.la ../src/libseccomp.la
+LDADD = util.la ../src/libseccomp-internal.la
check_LTLIBRARIES = util.la
util_la_SOURCES = util.c util.h
diff --git a/tools/Makefile.am b/tools/Makefile.am
index d74c07f..8109ce4 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -7,7 +7,7 @@ util_la_LDFLAGS = -module
bin_PROGRAMS = scmp_sys_resolver
noinst_PROGRAMS = scmp_arch_detect scmp_bpf_disasm scmp_bpf_sim
-scmp_sys_resolver_LDADD = ../src/libseccomp.la
-scmp_arch_detect_LDADD = ../src/libseccomp.la
+scmp_sys_resolver_LDADD = ../src/libseccomp-internal.la
+scmp_arch_detect_LDADD = ../src/libseccomp-internal.la
scmp_bpf_disasm_LDADD = util.la
scmp_bpf_sim_LDADD = util.la
------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
libseccomp-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libseccomp-discuss