diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..cb864dc --- /dev/null +++ b/AUTHORS @@ -0,0 +1 @@ +Andreas Färber diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..994bee7 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,4 @@ +Version 0.2, 2017-xx-yy + Use autotools as build system +Version 0.1, 2017-05-01 + Initial release diff --git a/Makefile b/Makefile deleted file mode 100644 index 260c596..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -all: amlbootsig unamlbootsig amlinfo - -CFLAGS = -g -LDFLAGS = -lcrypto - -amlbootsig.o unamlbootsig.o amlinfo.o: meson.h fip.h - -%.o: %.c - $(CC) $(CFLAGS) -o $@ -c $< - -amlbootsig: amlbootsig.o - $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) - -unamlbootsig: unamlbootsig.o - $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) - -amlinfo: amlinfo.o - $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) - -clean: - -rm -f amlbootsig unamlbootsig amlinfo test *.o diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..26226b0 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = src + +ACLOCAL_AMFLAGS = -I m4 diff --git a/NEWS b/NEWS new file mode 120000 index 0000000..b0936e8 --- /dev/null +++ b/NEWS @@ -0,0 +1 @@ +ChangeLog \ No newline at end of file diff --git a/README b/README new file mode 120000 index 0000000..42061c0 --- /dev/null +++ b/README @@ -0,0 +1 @@ +README.md \ No newline at end of file diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..b79afb6 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +test -f configure.ac || { + echo "Please, run this script in the top level project directory." + exit +} + +libtoolize --force --copy +aclocal -I m4 +autoconf +automake --add-missing --copy + diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..082dd29 --- /dev/null +++ b/configure.ac @@ -0,0 +1,26 @@ +dnl meson-tools + +dnl Initialization +AC_INIT([meson-tools], [0.2], [Andreas Färber ]) +AM_INIT_AUTOMAKE +LT_INIT + +dnl Configure macros +AC_CONFIG_MACRO_DIR([m4]) + +LDFLAGS+=" -lcrypto" + +AC_CHECK_HEADER([openssl/sha.h], + [], + [AC_MSG_ERROR([openssl/sha.h not found. Please, install libssl-dev.])] + ) + +dnl Makefiles +AC_CONFIG_FILES([ + Makefile + src/Makefile + ]) + +dnl Generate files +AC_OUTPUT + diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..92ca600 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,5 @@ +bin_PROGRAMS = amlbootsig unamlbootsig amlinfo + +amlbootsig_SOURCES = amlbootsig.c aml.h fip.h meson.h +unamlbootsig_SOURCES = unamlbootsig.c aml.h fip.h meson.h +amlinfo_SOURCES = amlinfo.c aml.h fip.h meson.h diff --git a/aml.h b/src/aml.h similarity index 100% rename from aml.h rename to src/aml.h diff --git a/amlbootsig.c b/src/amlbootsig.c similarity index 100% rename from amlbootsig.c rename to src/amlbootsig.c diff --git a/amlinfo.c b/src/amlinfo.c similarity index 100% rename from amlinfo.c rename to src/amlinfo.c diff --git a/fip.h b/src/fip.h similarity index 100% rename from fip.h rename to src/fip.h diff --git a/meson.h b/src/meson.h similarity index 100% rename from meson.h rename to src/meson.h diff --git a/unamlbootsig.c b/src/unamlbootsig.c similarity index 100% rename from unamlbootsig.c rename to src/unamlbootsig.c