mirror of
https://github.com/pengutronix/genimage.git
synced 2024-11-26 19:23:55 +08:00
build with autotools
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
This commit is contained in:
parent
fc8f69c8bb
commit
c850c8b404
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,4 @@
|
||||
/*.o
|
||||
/genimage
|
||||
/Makefile.in
|
||||
/Makefile
|
||||
|
14
Makefile
14
Makefile
@ -1,14 +0,0 @@
|
||||
|
||||
CFLAGS=-Wall
|
||||
LDFLAGS=-lconfuse
|
||||
all: genimage
|
||||
DEPS = genimage.h list.h
|
||||
|
||||
%.o: %.c $(DEPS)
|
||||
$(CC) -c -o $@ $< $(CFLAGS)
|
||||
|
||||
genimage: genimage.o image-jffs2.o image-ext2.o image-ubi.o image-ubifs.o \
|
||||
image-flash.o image-file.o image-tar.o image-hd.o util.o config.o
|
||||
|
||||
clean:
|
||||
rm -f *.o genimage
|
47
Makefile.am
Normal file
47
Makefile.am
Normal file
@ -0,0 +1,47 @@
|
||||
EXTRA_DIST = \
|
||||
test.config \
|
||||
flash.conf
|
||||
|
||||
CLEANFILES =
|
||||
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
||||
AM_MAKEFLAGS = --no-print-directory
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-include $(top_builddir)/config.h \
|
||||
-DSYSCONFDIR=\""$(sysconfdir)"\" \
|
||||
-DLIBEXECDIR=\""$(libexecdir)"\"
|
||||
|
||||
AM_CFLAGS = ${my_CFLAGS} \
|
||||
-fvisibility=hidden \
|
||||
-ffunction-sections \
|
||||
-fdata-sections
|
||||
|
||||
AM_LDFLAGS = \
|
||||
-Wl,--gc-sections \
|
||||
-Wl,--as-needed
|
||||
|
||||
bin_PROGRAMS = genimage
|
||||
genimage_SOURCES = \
|
||||
genimage.c \
|
||||
config.c \
|
||||
util.c \
|
||||
image-ext2.c \
|
||||
image-file.c \
|
||||
image-flash.c \
|
||||
image-hd.c \
|
||||
image-jffs2.c \
|
||||
image-tar.c \
|
||||
image-ubi.c \
|
||||
image-ubifs.c
|
||||
|
||||
genimage_CFLAGS = \
|
||||
$(AM_CFLAGS) \
|
||||
$(CONFUSE_CFLAGS)
|
||||
|
||||
genimage_LDADD = \
|
||||
$(CONFUSE_LIBS)
|
||||
|
||||
noinst_HEADERS = \
|
||||
genimage.h \
|
||||
list.h
|
||||
|
19
autogen.sh
Executable file
19
autogen.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
|
||||
cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \
|
||||
chmod +x .git/hooks/pre-commit && \
|
||||
echo "Activated pre-commit hook."
|
||||
fi
|
||||
|
||||
autoreconf --install --symlink
|
||||
|
||||
args="--prefix=/usr"
|
||||
|
||||
echo
|
||||
echo "----------------------------------------------------------------"
|
||||
echo "Initialized build system. For a common configuration please run:"
|
||||
echo "----------------------------------------------------------------"
|
||||
echo
|
||||
echo "./configure CFLAGS='-g -O0' $args"
|
||||
echo
|
1
config.c
1
config.c
@ -15,7 +15,6 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <confuse.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
54
configure.ac
Normal file
54
configure.ac
Normal file
@ -0,0 +1,54 @@
|
||||
AC_PREREQ(2.60)
|
||||
AC_INIT([genimage],
|
||||
[1],
|
||||
[s.hauer@pengutronix.de],
|
||||
[genimage],
|
||||
[http://www.pengutronix.de/genimage/])
|
||||
AC_CONFIG_SRCDIR([genimage.c])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects])
|
||||
AC_PROG_CC_STDC
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
AC_SYS_LARGEFILE
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AM_SILENT_RULES([yes])
|
||||
LT_INIT([disable-static pic-only])
|
||||
AC_PREFIX_DEFAULT([/usr])
|
||||
|
||||
AC_PROG_MKDIR_P
|
||||
|
||||
AC_ARG_ENABLE([debug],
|
||||
AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
|
||||
[], [enable_debug=no])
|
||||
AS_IF([test "x$enable_debug" = "xyes"], [
|
||||
AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
|
||||
])
|
||||
|
||||
my_CFLAGS="-Wall \
|
||||
-Wmissing-declarations -Wmissing-prototypes \
|
||||
-Wnested-externs -Wpointer-arith \
|
||||
-Wpointer-arith -Wsign-compare -Wchar-subscripts \
|
||||
-Wstrict-prototypes -Wshadow \
|
||||
-Wformat-security -Wtype-limits"
|
||||
AC_SUBST([my_CFLAGS])
|
||||
|
||||
PKG_CHECK_MODULES(CONFUSE, libconfuse)
|
||||
|
||||
AC_CONFIG_HEADERS(config.h)
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
])
|
||||
|
||||
AC_OUTPUT
|
||||
AC_MSG_RESULT([
|
||||
$PACKAGE $VERSION
|
||||
=====
|
||||
|
||||
prefix: ${prefix}
|
||||
|
||||
compiler: ${CC}
|
||||
cflags: ${CFLAGS}
|
||||
ldflags: ${LDFLAGS}
|
||||
|
||||
debug: ${enable_debug}
|
||||
])
|
@ -15,7 +15,6 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <confuse.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -1,4 +1,3 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <confuse.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@ -15,7 +15,6 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <confuse.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@ -1,4 +1,3 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <confuse.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@ -15,7 +15,6 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <confuse.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@ -15,7 +15,6 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <confuse.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@ -15,7 +15,6 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <confuse.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@ -15,7 +15,6 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <confuse.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@ -15,7 +15,6 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <confuse.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
6
m4/.gitignore
vendored
Normal file
6
m4/.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
libtool.m4
|
||||
ltoptions.m4
|
||||
ltsugar.m4
|
||||
ltversion.m4
|
||||
lt~obsolete.m4
|
||||
|
Loading…
Reference in New Issue
Block a user