From e2f8fbfb166720529dd8ccab82dd0eca21cc7f61 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Sun, 17 Apr 2011 01:43:48 +0000 Subject: sbtools: update Makefile; fix whitespaces git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29734 a1c6a512-1295-4272-9138-f99709370657 --- utils/sbtools/Makefile | 11 ++++++----- utils/sbtools/sb.h | 4 +--- utils/sbtools/sbtoelf.c | 10 +++++----- 3 files changed, 12 insertions(+), 13 deletions(-) (limited to 'utils/sbtools') diff --git a/utils/sbtools/Makefile b/utils/sbtools/Makefile index 9427eaf875..e8bb68aadd 100644 --- a/utils/sbtools/Makefile +++ b/utils/sbtools/Makefile @@ -1,9 +1,10 @@ -TGT = sbinfo +all: elftosb sbtoelf -all: $(TGT) +sbtoelf: sbtoelf.c crc.c crypto.h aes128.c sha1.c elf.c sb.h + gcc -g -std=c99 -o $@ -W -Wall $^ -$(TGT): sbinfo.c crc.c crypto.h aes128.c sha1.c elf.c - $(CC) -g -std=c99 -o $(TGT) -W -Wall sbinfo.c aes128.c crc.c sha1.c elf.c +elftosb: elftosb.c crc.c crypto.h aes128.c sha1.c elf.c sb.h + gcc -g -std=c99 -o $@ -W -Wall $^ clean: - rm -fr $(TGT) + rm -fr elftosb sbtoelf diff --git a/utils/sbtools/sb.h b/utils/sbtools/sb.h index 29b7d7d894..be25b4bf88 100644 --- a/utils/sbtools/sb.h +++ b/utils/sbtools/sb.h @@ -19,9 +19,7 @@ * ****************************************************************************/ -#define _ISOC99_SOURCE /* snprintf() */ -#include -#include +#include #define BLOCK_SIZE 16 diff --git a/utils/sbtools/sbtoelf.c b/utils/sbtools/sbtoelf.c index 632c4b3eb9..3eb168ddd1 100644 --- a/utils/sbtools/sbtoelf.c +++ b/utils/sbtools/sbtoelf.c @@ -78,9 +78,9 @@ const char *key_file; void *xmalloc(size_t s) /* malloc helper, used in elf.c */ { - void * r = malloc(s); - if(!r) bugp("malloc"); - return r; + void * r = malloc(s); + if(!r) bugp("malloc"); + return r; } static void print_hex(byte *data, int len, bool newline) @@ -91,7 +91,7 @@ static void print_hex(byte *data, int len, bool newline) printf("\n"); } -int convxdigit(char digit, byte *val) +static int convxdigit(char digit, byte *val) { if(digit >= '0' && digit <= '9') { @@ -495,7 +495,7 @@ static void extract(unsigned long filesize) int encrypted = !(sec_hdr->flags & SECTION_CLEARTEXT); color(GREEN); - printf(" Chunk "); + printf(" Section "); color(YELLOW); printf("'%s'\n", name); color(GREEN); -- cgit v1.2.3