summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@inai.de>2013-06-18 03:55:08 +0200
committerPaul Moore <pmoore@redhat.com>2014-04-29 13:52:05 -0400
commitc92404d08090a67a019776d5478f4dd615306968 (patch)
treea83d0b89d51e6139569ede36d6c78602e46078f1 /tools
parenteca0c1ecb7b7f7a0d390b3c84f0099f8ce688f27 (diff)
downloadlibseccomp-c92404d08090a67a019776d5478f4dd615306968.tar.gz
build: initial attempt to use autotools as the build system
With my apologies to Jan for delaying this patch for so long, there are a number of differences between Jan's original patch and what is being merged in this patch; almost all of the changes are due to changes in the underlying code base, but there are a few minor fixes as well. Signed-off-by: Jan Engelhardt <jengelh@inai.de> Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile70
-rw-r--r--tools/Makefile.am16
2 files changed, 16 insertions, 70 deletions
diff --git a/tools/Makefile b/tools/Makefile
deleted file mode 100644
index 6e3101f..0000000
--- a/tools/Makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# Enhanced Seccomp Library Makefile
-#
-# Copyright (c) 2012 Red Hat <pmoore@redhat.com>
-# Author: Paul Moore <pmoore@redhat.com>
-#
-
-#
-# 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>.
-#
-
-#
-# macros
-#
-
-include ../macros.mk
-
-#
-# configuration
-#
-
-include $(TOPDIR)/configure.mk
-include $(TOPDIR)/install.mk
-
-OBJS = util.o
-
-LIBFLAGS := ../src/libseccomp.a $(OBJS)
-
-TOOLS = scmp_bpf_disasm \
- scmp_bpf_sim \
- scmp_sys_resolver \
- scmp_arch_detect
-
-TOOLS_INSTALL = scmp_sys_resolver
-
-DEPS_OBJS = $(OBJS:%.o=%.d)
-DEPS_TOOLS = $(TOOLS:%=%.d)
-
-#
-# targets
-#
-
-.PHONY: install clean
-
-all: $(TOOLS) $(OBJS)
-
--include $(DEPS_TOOLS) $(DEPS_OBJS)
-
-$(DEPS_TOOLS):
- $(MAKEDEP_EXEC)
- $(ADDDEP) $@ $(OBJS)
-
-$(TOOLS):
- $(COMPILE_EXEC)
-
-install: $(TOOLS_INSTALL)
- $(INSTALL_BIN_MACRO)
-
-clean:
- $(RM) $(DEPS_TOOLS) $(DEPS_OBJS) $(TOOLS) $(OBJS)
diff --git a/tools/Makefile.am b/tools/Makefile.am
new file mode 100644
index 0000000..28087e9
--- /dev/null
+++ b/tools/Makefile.am
@@ -0,0 +1,16 @@
+# -*- Makefile -*-
+
+noinst_LTLIBRARIES = util.la
+
+util_la_SOURCES = util.c util.h
+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_bpf_disasm_LDADD = util.la
+scmp_bpf_sim_LDADD = util.la
+
+EXTRA_DIST = bpf.h