summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2020-11-25 18:03:12 -0800
committerVito Caputo <vcaputo@pengaru.com>2020-11-25 18:07:09 -0800
commit799258ed87c526ab0ff1375bcb45df7ae28556ee (patch)
treefc6a11292524d43285ee2a9d05e4af0e6cf6c5c9
parent8ec1588722809a35a7d149bff10de56424e2658a (diff)
build: introduce rudimentary autotools
Now it's easy to build even
-rw-r--r--Makefile.am1
-rwxr-xr-xbootstrap3
-rw-r--r--configure.ac25
-rw-r--r--src/Makefile.am23
4 files changed, 52 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..2a97bb0
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = libiou src
diff --git a/bootstrap b/bootstrap
new file mode 100755
index 0000000..c5a7472
--- /dev/null
+++ b/bootstrap
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+autoreconf --install
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..3a88409
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,25 @@
+AC_INIT([jio], [0.1], [vcaputo@pengaru.com])
+AM_INIT_AUTOMAKE([-Wall -Werror foreign])
+AC_PROG_CC
+AM_PROG_CC_C_O
+AM_PROG_AR
+AC_PROG_RANLIB
+AM_SILENT_RULES([yes])
+
+CFLAGS="$CFLAGS -Wall"
+
+dnl Check for liburing
+PKG_CHECK_MODULES(URING, liburing)
+CFLAGS="$CFLAGS $URING_CFLAGS"
+LIBS="$LIBS $URING_LIBS"
+
+AC_CONFIG_SUBDIRS([
+ libiou
+])
+
+AC_CONFIG_FILES([
+ Makefile
+ src/Makefile
+])
+
+AC_OUTPUT
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..cfc2f3f
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,23 @@
+bin_PROGRAMS = jio
+jio_SOURCES = \
+ bootid.c \
+ bootid.h \
+ humane.c \
+ humane.h \
+ jio.c \
+ journals.c \
+ journals.h \
+ machid.c \
+ machid.h \
+ op.h \
+ readfile.c \
+ readfile.h \
+ reclaim-tail-waste.c \
+ reclaim-tail-waste.h \
+ report-tail-waste.c \
+ report-tail-waste.h \
+ report-usage.c \
+ report-usage.h
+
+jio_CPPFLAGS = -I@top_srcdir@/thunk_h -I@top_srcdir@/libiou/src
+jio_LDADD = @top_builddir@/libiou/src/libiou.a
© All Rights Reserved