rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | diff --git a/Makefile.am b/Makefile.am |
| 2 | new file mode 100644 |
| 3 | index 0000000..361667f |
| 4 | --- /dev/null |
| 5 | +++ b/Makefile.am |
| 6 | @@ -0,0 +1 @@ |
| 7 | +SUBDIRS = libsparse/ |
| 8 | diff --git a/configure.ac b/configure.ac |
| 9 | new file mode 100644 |
| 10 | index 0000000..cc354e3 |
| 11 | --- /dev/null |
| 12 | +++ b/configure.ac |
| 13 | @@ -0,0 +1,12 @@ |
| 14 | +AC_INIT([img2simg], [1.0]) |
| 15 | +AM_INIT_AUTOMAKE([foreign]) |
| 16 | +AC_PROG_CC |
| 17 | +AC_PROG_RANLIB |
| 18 | +AC_DISABLE_SHARED |
| 19 | +AC_ENABLE_STATIC |
| 20 | +LT_INIT |
| 21 | +AC_CONFIG_FILES([ |
| 22 | + Makefile |
| 23 | + libsparse/Makefile |
| 24 | +]) |
| 25 | +AC_OUTPUT |
| 26 | diff --git a/libsparse/Makefile.am b/libsparse/Makefile.am |
| 27 | new file mode 100644 |
| 28 | index 0000000..02bea1a |
| 29 | --- /dev/null |
| 30 | +++ b/libsparse/Makefile.am |
| 31 | @@ -0,0 +1,18 @@ |
| 32 | +lib_LIBRARIES = libsparse.a |
| 33 | +libsparse_a_CPPFLAGS = -I$(top_srcdir)/libsparse/include |
| 34 | +libsparse_a_CFLAGS = -Werror |
| 35 | +libsparse_a_SOURCES = \ |
| 36 | + backed_block.c \ |
| 37 | + output_file.c \ |
| 38 | + sparse.c \ |
| 39 | + sparse_crc32.c \ |
| 40 | + sparse_err.c \ |
| 41 | + sparse_read.c |
| 42 | + |
| 43 | +bin_PROGRAMS = img2simg simg2img |
| 44 | +img2simg_SOURCES = img2simg.c |
| 45 | +img2simg_CPPFLAGS = -I$(top_srcdir)/libsparse/include |
| 46 | +img2simg_LDADD = libsparse.a -lz |
| 47 | +simg2img_SOURCES = simg2img.c |
| 48 | +simg2img_CPPFLAGS = -I$(top_srcdir)/libsparse/include |
| 49 | +simg2img_LDADD = libsparse.a -lz |