diff options
-rw-r--r-- | Makefile.am | 32 | ||||
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | src/Makefile.am | 32 | ||||
-rw-r--r-- | src/wgt-config-xml.c (renamed from wgt-config-xml.c) | 0 | ||||
-rw-r--r-- | src/wgt-locales.c (renamed from wgt-locales.c) | 0 | ||||
-rw-r--r-- | src/wgt-rootdir.c (renamed from wgt-rootdir.c) | 0 | ||||
-rw-r--r-- | src/wgt-strings.c (renamed from wgt-strings.c) | 0 | ||||
-rw-r--r-- | src/wgt.h (renamed from wgt.h) | 0 | ||||
-rw-r--r-- | src/wgtpkg-base64.c (renamed from wgtpkg-base64.c) | 0 | ||||
-rw-r--r-- | src/wgtpkg-certs.c (renamed from wgtpkg-certs.c) | 0 | ||||
-rw-r--r-- | src/wgtpkg-digsig.c (renamed from wgtpkg-digsig.c) | 0 | ||||
-rw-r--r-- | src/wgtpkg-files.c (renamed from wgtpkg-files.c) | 0 | ||||
-rw-r--r-- | src/wgtpkg-install.c (renamed from wgtpkg-install.c) | 0 | ||||
-rw-r--r-- | src/wgtpkg-pack.c (renamed from wgtpkg-pack.c) | 0 | ||||
-rw-r--r-- | src/wgtpkg-sign.c (renamed from wgtpkg-sign.c) | 0 | ||||
-rw-r--r-- | src/wgtpkg-verbose.c (renamed from wgtpkg-verbose.c) | 0 | ||||
-rw-r--r-- | src/wgtpkg-workdir.c (renamed from wgtpkg-workdir.c) | 0 | ||||
-rw-r--r-- | src/wgtpkg-xmlsec.c (renamed from wgtpkg-xmlsec.c) | 0 | ||||
-rw-r--r-- | src/wgtpkg-zip.c (renamed from wgtpkg-zip.c) | 0 | ||||
-rw-r--r-- | src/wgtpkg.h (renamed from wgtpkg.h) | 0 |
20 files changed, 38 insertions, 34 deletions
diff --git a/Makefile.am b/Makefile.am index 6c76395..f268924 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,32 +1,2 @@ -bin_PROGRAMS = wgtpkg-install wgtpkg-pack wgtpkg-sign - -COMMONSRCS = \ - wgtpkg-base64.c \ - wgtpkg-certs.c \ - wgtpkg-digsig.c \ - wgtpkg-files.c \ - wgtpkg-verbose.c \ - wgtpkg-workdir.c \ - wgtpkg-xmlsec.c \ - wgtpkg-zip.c - -WGTSRCS = \ - wgt-config-xml.c \ - wgt-locales.c \ - wgt-rootdir.c \ - wgt-strings.c - -AM_CFLAGS = -Wall -Wno-pointer-sign -AM_CFLAGS += -ffunction-sections -fdata-sections -AM_CFLAGS += ${ZIP_CFLAGS} ${XML2_CFLAGS} ${OPENSSL_CFLAGS} ${XMLSEC_CFLAGS} - -AM_LDFLAGS = -Wl,--gc-sections - -LDADD = ${ZIP_LIBS} ${XML2_LIBS} ${OPENSSL_LIBS} ${XMLSEC_LIBS} - -wgtpkg_install_SOURCES = wgtpkg-install.c ${WGTSRCS} ${COMMONSRCS} - -wgtpkg_sign_SOURCES = wgtpkg-sign.c ${COMMONSRCS} - -wgtpkg_pack_SOURCES = wgtpkg-pack.c ${COMMONSRCS} +SUBDIRS = src diff --git a/configure.ac b/configure.ac index 5cf0a62..ea099b0 100644 --- a/configure.ac +++ b/configure.ac @@ -5,8 +5,8 @@ AC_PREREQ([2.69]) AC_INIT([wgtpkg], [1.0], [wgtpkg@iot.bzh]) AM_INIT_AUTOMAKE #AM_INIT_AUTOMAKE([-Wall -Wno-pointer-sign]) -AC_CONFIG_SRCDIR([wgtpkg-files.c]) -AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_SRCDIR([src/wgtpkg-files.c]) +AC_CONFIG_HEADERS([src/config.h]) # Checks for programs. #AC_PROG_CXX @@ -37,6 +37,8 @@ AC_TYPE_SSIZE_T AC_FUNC_MALLOC AC_FUNC_REALLOC AC_CHECK_FUNCS([atexit memmove mkdir realpath rmdir stpcpy strrchr strtoul]) +AC_CHECK_FUNCS([strcasecmp strdup strndup]) -AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([Makefile + src/Makefile]) AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..6c76395 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,32 @@ +bin_PROGRAMS = wgtpkg-install wgtpkg-pack wgtpkg-sign + +COMMONSRCS = \ + wgtpkg-base64.c \ + wgtpkg-certs.c \ + wgtpkg-digsig.c \ + wgtpkg-files.c \ + wgtpkg-verbose.c \ + wgtpkg-workdir.c \ + wgtpkg-xmlsec.c \ + wgtpkg-zip.c + +WGTSRCS = \ + wgt-config-xml.c \ + wgt-locales.c \ + wgt-rootdir.c \ + wgt-strings.c + +AM_CFLAGS = -Wall -Wno-pointer-sign +AM_CFLAGS += -ffunction-sections -fdata-sections +AM_CFLAGS += ${ZIP_CFLAGS} ${XML2_CFLAGS} ${OPENSSL_CFLAGS} ${XMLSEC_CFLAGS} + +AM_LDFLAGS = -Wl,--gc-sections + +LDADD = ${ZIP_LIBS} ${XML2_LIBS} ${OPENSSL_LIBS} ${XMLSEC_LIBS} + +wgtpkg_install_SOURCES = wgtpkg-install.c ${WGTSRCS} ${COMMONSRCS} + +wgtpkg_sign_SOURCES = wgtpkg-sign.c ${COMMONSRCS} + +wgtpkg_pack_SOURCES = wgtpkg-pack.c ${COMMONSRCS} + diff --git a/wgt-config-xml.c b/src/wgt-config-xml.c index f92ae3a..f92ae3a 100644 --- a/wgt-config-xml.c +++ b/src/wgt-config-xml.c diff --git a/wgt-locales.c b/src/wgt-locales.c index 9b97cc4..9b97cc4 100644 --- a/wgt-locales.c +++ b/src/wgt-locales.c diff --git a/wgt-rootdir.c b/src/wgt-rootdir.c index 4df1705..4df1705 100644 --- a/wgt-rootdir.c +++ b/src/wgt-rootdir.c diff --git a/wgt-strings.c b/src/wgt-strings.c index a2fff39..a2fff39 100644 --- a/wgt-strings.c +++ b/src/wgt-strings.c diff --git a/wgtpkg-base64.c b/src/wgtpkg-base64.c index 5cf6f8a..5cf6f8a 100644 --- a/wgtpkg-base64.c +++ b/src/wgtpkg-base64.c diff --git a/wgtpkg-certs.c b/src/wgtpkg-certs.c index 1d8b976..1d8b976 100644 --- a/wgtpkg-certs.c +++ b/src/wgtpkg-certs.c diff --git a/wgtpkg-digsig.c b/src/wgtpkg-digsig.c index 284acd1..284acd1 100644 --- a/wgtpkg-digsig.c +++ b/src/wgtpkg-digsig.c diff --git a/wgtpkg-files.c b/src/wgtpkg-files.c index 06aac83..06aac83 100644 --- a/wgtpkg-files.c +++ b/src/wgtpkg-files.c diff --git a/wgtpkg-install.c b/src/wgtpkg-install.c index 7a88ebf..7a88ebf 100644 --- a/wgtpkg-install.c +++ b/src/wgtpkg-install.c diff --git a/wgtpkg-pack.c b/src/wgtpkg-pack.c index a8aaa05..a8aaa05 100644 --- a/wgtpkg-pack.c +++ b/src/wgtpkg-pack.c diff --git a/wgtpkg-sign.c b/src/wgtpkg-sign.c index cd506fc..cd506fc 100644 --- a/wgtpkg-sign.c +++ b/src/wgtpkg-sign.c diff --git a/wgtpkg-verbose.c b/src/wgtpkg-verbose.c index 1472a90..1472a90 100644 --- a/wgtpkg-verbose.c +++ b/src/wgtpkg-verbose.c diff --git a/wgtpkg-workdir.c b/src/wgtpkg-workdir.c index 0c184a5..0c184a5 100644 --- a/wgtpkg-workdir.c +++ b/src/wgtpkg-workdir.c diff --git a/wgtpkg-xmlsec.c b/src/wgtpkg-xmlsec.c index 843ea2b..843ea2b 100644 --- a/wgtpkg-xmlsec.c +++ b/src/wgtpkg-xmlsec.c diff --git a/wgtpkg-zip.c b/src/wgtpkg-zip.c index 9e51538..9e51538 100644 --- a/wgtpkg-zip.c +++ b/src/wgtpkg-zip.c |