diff options
| author | Amaury Pouly <pamaury@rockbox.org> | 2011-04-17 01:43:48 +0000 |
|---|---|---|
| committer | Amaury Pouly <pamaury@rockbox.org> | 2011-04-17 01:43:48 +0000 |
| commit | e2f8fbfb166720529dd8ccab82dd0eca21cc7f61 (patch) | |
| tree | e43f8b4745e8b4efbd43d38a984bcb16de892700 | |
| parent | f6208bde4630571ae75a43ea39a25a746f08bcfb (diff) | |
| download | rockbox-e2f8fbfb166720529dd8ccab82dd0eca21cc7f61.zip rockbox-e2f8fbfb166720529dd8ccab82dd0eca21cc7f61.tar.gz rockbox-e2f8fbfb166720529dd8ccab82dd0eca21cc7f61.tar.bz2 rockbox-e2f8fbfb166720529dd8ccab82dd0eca21cc7f61.tar.xz | |
sbtools: update Makefile; fix whitespaces
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29734 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | utils/sbtools/Makefile | 11 | ||||
| -rw-r--r-- | utils/sbtools/sb.h | 4 | ||||
| -rw-r--r-- | utils/sbtools/sbtoelf.c | 10 |
3 files changed, 12 insertions, 13 deletions
diff --git a/utils/sbtools/Makefile b/utils/sbtools/Makefile index 9427eaf..e8bb68a 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 29b7d7d..be25b4b 100644 --- a/utils/sbtools/sb.h +++ b/utils/sbtools/sb.h @@ -19,9 +19,7 @@ * ****************************************************************************/ -#define _ISOC99_SOURCE /* snprintf() */ -#include <sys/types.h> -#include <sys/stat.h> +#include <stdint.h> #define BLOCK_SIZE 16 diff --git a/utils/sbtools/sbtoelf.c b/utils/sbtools/sbtoelf.c index 632c4b3..3eb168d 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); |