aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-10-21 02:50:34 -0400
committerMike Frysinger <vapier@gentoo.org>2021-10-21 02:50:34 -0400
commite20993aae51de13bfc4028105aa7756771046c64 (patch)
tree8e56347ad5c050a8e026aeffbe687600081187d8 /src
parentbuild: require automake-1.15 (diff)
downloadsandbox-e20993aae51de13bfc4028105aa7756771046c64.tar.gz
sandbox-e20993aae51de13bfc4028105aa7756771046c64.tar.bz2
sandbox-e20993aae51de13bfc4028105aa7756771046c64.zip
build: flatten build a bit to avoid (most) recursive make
Provides a bit of a speed up. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'src')
-rw-r--r--src/Makefile4
-rw-r--r--src/Makefile.am17
-rw-r--r--src/local.mk15
3 files changed, 19 insertions, 17 deletions
diff --git a/src/Makefile b/src/Makefile
new file mode 100644
index 0000000..4b2bc35
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,4 @@
+# Helper for developers.
+all sandbox: src/sandbox ;
+clean: ; rm -f *.o *.l[ao] .libs/* sandbox
+%: ; $(MAKE) -C .. $@
diff --git a/src/Makefile.am b/src/Makefile.am
deleted file mode 100644
index e7aeb30..0000000
--- a/src/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-AUTOMAKE_OPTIONS = foreign
-
-bin_PROGRAMS = sandbox
-
-AM_CPPFLAGS = \
- -I$(top_srcdir) \
- -I$(top_srcdir)/libsbutil \
- -I$(top_srcdir)/libsbutil/include \
- $(SANDBOX_DEFINES)
-
-sandbox_LDADD = $(top_builddir)/libsbutil/libsbutil.la $(LIBDL)
-sandbox_SOURCES = \
- environ.c \
- namespaces.c \
- options.c \
- sandbox.h \
- sandbox.c
diff --git a/src/local.mk b/src/local.mk
new file mode 100644
index 0000000..1fe2b31
--- /dev/null
+++ b/src/local.mk
@@ -0,0 +1,15 @@
+bin_PROGRAMS += %D%/sandbox
+
+%C%_sandbox_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/libsbutil \
+ -I$(top_srcdir)/libsbutil/include
+
+%C%_sandbox_LDADD = libsbutil/libsbutil.la $(LIBDL)
+%C%_sandbox_SOURCES = \
+ %D%/environ.c \
+ %D%/namespaces.c \
+ %D%/options.c \
+ %D%/sandbox.h \
+ %D%/sandbox.c