blob: 50c2c7ddc241330c6a5b23f64fe36e95f76eaad9 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001diff --git a/Makefile.am b/Makefile.am
2new file mode 100644
3index 0000000..361667f
4--- /dev/null
5+++ b/Makefile.am
6@@ -0,0 +1 @@
7+SUBDIRS = libsparse/
8diff --git a/configure.ac b/configure.ac
9new file mode 100644
10index 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
26diff --git a/libsparse/Makefile.am b/libsparse/Makefile.am
27new file mode 100644
28index 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