From 2bfd935f4a06a8172a81e6f175792e46288f7d5c Mon Sep 17 00:00:00 2001 From: Dave Murphy Date: Thu, 21 Dec 2017 12:57:03 +0000 Subject: [PATCH] autoconfiscate --- .gitignore | 18 ++++++++++++++++-- AUTHORS | 0 COPYING | 5 +++++ ChangeLog | 0 Makefile | 18 ------------------ Makefile.am | 10 ++++++++++ NEWS | 0 README | 0 autogen.sh | 3 +++ configure.ac | 26 ++++++++++++++++++++++++++ build_pfs0.c => src/build_pfs0.c | 0 elf2nro.c => src/elf2nro.c | 0 elf2nso.c => src/elf2nso.c | 0 elf64.h => src/elf64.h | 0 elf_common.h => src/elf_common.h | 0 sha256.c => src/sha256.c | 0 sha256.h => src/sha256.h | 0 types.h => src/types.h | 0 18 files changed, 60 insertions(+), 20 deletions(-) create mode 100644 AUTHORS create mode 100644 COPYING create mode 100644 ChangeLog delete mode 100644 Makefile create mode 100644 Makefile.am create mode 100644 NEWS create mode 100644 README create mode 100755 autogen.sh create mode 100644 configure.ac rename build_pfs0.c => src/build_pfs0.c (100%) rename elf2nro.c => src/elf2nro.c (100%) rename elf2nso.c => src/elf2nso.c (100%) rename elf64.h => src/elf64.h (100%) rename elf_common.h => src/elf_common.h (100%) rename sha256.c => src/sha256.c (100%) rename sha256.h => src/sha256.h (100%) rename types.h => src/types.h (100%) diff --git a/.gitignore b/.gitignore index 0437957..ceb5085 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,16 @@ -build_pfs0* -elf2nso* +build* +INSTALL +Makefile.in +aclocal.m4 +autom4te.cache +config.guess +config.sub +configure +depcomp +install-sh +missing +compile +.deps +Makefile +config.status +config.log \ No newline at end of file diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..e69de29 diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..b4249b0 --- /dev/null +++ b/COPYING @@ -0,0 +1,5 @@ +Copyright 2017 libnx Authors + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..e69de29 diff --git a/Makefile b/Makefile deleted file mode 100644 index 86cb0aa..0000000 --- a/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -all: elf2nso elf2nro build_pfs0 - -build_pfs0: build_pfs0.c - gcc $(CFLAGS) -o $@ $^ - -elf2nso: elf2nso.c sha256.c - gcc $(CFLAGS) -o $@ $^ -llz4 - -elf2nro: elf2nro.c - gcc $(CFLAGS) -o $@ $^ - -install: all - cp build_pfs0 $(DEVKITA64)/bin/ - cp elf2nso $(DEVKITA64)/bin/ - cp elf2nro $(DEVKITA64)/bin/ - -clean: - rm -f elf2nso elf2nro build_pfs0 diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..053f26a --- /dev/null +++ b/Makefile.am @@ -0,0 +1,10 @@ +# Makefile.am -- Process this file with automake to produce Makefile.in +bin_PROGRAMS = elf2nso elf2nro build_pfs0 + +build_pfs0_SOURCES = src/build_pfs0.c src/types.h +elf2nro_SOURCES = src/elf2nro.c src/elf64.h src/elf_common.h +elf2nso_SOURCES = src/elf2nso.c src/sha256.c src/sha256.h src/elf64.h src/elf_common.h + +elf2nso_LDADD = @LZ4_LIBS@ + +EXTRA_DIST = autogen.sh diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/README b/README new file mode 100644 index 0000000..e69de29 diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..9d9bcc6 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,3 @@ +aclocal +autoconf +automake --add-missing -c diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..c229183 --- /dev/null +++ b/configure.ac @@ -0,0 +1,26 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.61) +AC_INIT([switch-tools],[1.0.0],[https://github.com/switchbrew/switch-tools/issues]) +AC_CONFIG_SRCDIR([src/build_pfs0.c]) + +AM_INIT_AUTOMAKE([subdir-objects]) + +AC_CANONICAL_BUILD +AC_CANONICAL_HOST + +AC_PROG_CC + + +PKG_CHECK_MODULES([LZ4], + [liblz4 >= 1.7.1 liblz4 < 100], + [have_lz4="yes"], + [LZ4_LIBS="-llz4"] # If this fails, we will do another test next. + # We also add set LZ4_LIBS otherwise the + # linker will not know about the lz4 library +) + +AC_SUBST(LZ4_LIBS) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/build_pfs0.c b/src/build_pfs0.c similarity index 100% rename from build_pfs0.c rename to src/build_pfs0.c diff --git a/elf2nro.c b/src/elf2nro.c similarity index 100% rename from elf2nro.c rename to src/elf2nro.c diff --git a/elf2nso.c b/src/elf2nso.c similarity index 100% rename from elf2nso.c rename to src/elf2nso.c diff --git a/elf64.h b/src/elf64.h similarity index 100% rename from elf64.h rename to src/elf64.h diff --git a/elf_common.h b/src/elf_common.h similarity index 100% rename from elf_common.h rename to src/elf_common.h diff --git a/sha256.c b/src/sha256.c similarity index 100% rename from sha256.c rename to src/sha256.c diff --git a/sha256.h b/src/sha256.h similarity index 100% rename from sha256.h rename to src/sha256.h diff --git a/types.h b/src/types.h similarity index 100% rename from types.h rename to src/types.h