summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..c939ea9
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,33 @@
+#!/usr/bin/make -f
+# Copyright (C) 2015 Luke Shumaker
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+include $(dir $(lastword $(MAKEFILE_LIST)))/config.mk
+include $(topsrcdir)/automake.head.mk
+
+am_subdirs = wrapper modules
+
+makefiles = Makefile automake.head.mk automake.tail.mk automake.txt common.once.head.mk common.once.tail.mk common.each.head.mk common.each.tail.mk
+am_src_files = COPYING HACKING README configure config.mk.in
+am_cfg_files = config.mk
+am_out_files = config.sh config.h
+
+config_vars = $(filter-out topsrcdir,$(shell $(SED) -n 's/^\s*\([a-z][^ !?:=]*\).*=.*/\1/p' $(topoutdir)/config.mk) PACKAGE VERSION)
+$(outdir)/config.sh: $(outdir)/config.mk
+ $(PRINTF) '%s=%s\n' $(foreach v,$(config_vars),$v $($v)) | LC_ALL=C $(SORT) > $@
+$(outdir)/config.h: $(outdir)/config.sh
+ . $(abspath $<) && $(PRINTF) '#define %s "%s"\n' $(foreach v,$(config_vars),$v '$($v)') PACKAGE_UPPER $${PACKAGE^^} | LC_ALL=C $(SORT) > $@
+
+include $(topsrcdir)/automake.tail.mk