summaryrefslogtreecommitdiff
path: root/target/tools/trx
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2011-01-24 14:04:43 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2011-01-24 14:04:43 +0100
commit573b06af740b3f1966aa2ea190494d9c87270786 (patch)
treed2f5dd29803ad5bbca171bfff9b1ece4ef3d5b3c /target/tools/trx
parent42ed8eb00eba8691994588b7fca5dbd04d92a59c (diff)
parent3953de124e87ce3b594fd861b6f111b2df706753 (diff)
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'target/tools/trx')
-rw-r--r--target/tools/trx/Makefile4
-rw-r--r--target/tools/trx/trx.c10
2 files changed, 7 insertions, 7 deletions
diff --git a/target/tools/trx/Makefile b/target/tools/trx/Makefile
index 2def53424..d1832ee8c 100644
--- a/target/tools/trx/Makefile
+++ b/target/tools/trx/Makefile
@@ -1,4 +1,4 @@
include $(TOPDIR)/rules.mk
-all:
- $(HOSTCC) ${HOSTCFLAGS} -o ${STAGING_HOST_DIR}/bin/trx trx.c
+all: trx.c
+ $(CC_FOR_BUILD) $(FLAGS_FOR_BUILD) -o ${STAGING_HOST_DIR}/bin/trx trx.c
diff --git a/target/tools/trx/trx.c b/target/tools/trx/trx.c
index 1c3a8701e..9e4d521ca 100644
--- a/target/tools/trx/trx.c
+++ b/target/tools/trx/trx.c
@@ -2,7 +2,7 @@
* Copyright (C) 2004 Manuel Novoa III <mjn3@codepoet.org>
* Copyright (C) 2005 Konstantin A. Klubnichkin and Oleg I. Vdovikin
* Copyright (C) 2006 OpenWrt developers <openwrt-developers@openwrt.org>
- * Copyright (C) 2006 Waldemar Brodkorb <wbx@freewrt.org>
+ * Copyright (C) 2011 Waldemar Brodkorb <wbx@openadk.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -52,7 +52,7 @@ void usage(void) __attribute__ (( __noreturn__ ));
void usage(void)
{
- fprintf(stderr, "Usage: trx [-p product_id] [-v version] [-o outfile] [-m maxlen] [-a align] [-b offset] file [file [file]]\n");
+ fprintf(stderr, "Usage: trx [-p product_id] [-v version] [-o outfile] [-m maxlen] [-a align] [-b offset] -f file [-f file [-f file]]\n");
exit(EXIT_FAILURE);
}
@@ -94,9 +94,9 @@ int main(int argc, char **argv)
in = NULL;
i = 0;
- while ((c = getopt(argc, argv, "-:o:p:v:m:a:b:")) != -1) {
+ while ((c = getopt(argc, argv, "-:o:p:v:m:a:b:f:")) != -1) {
switch (c) {
- case 1:
+ case 'f':
p->offsets[i++] = cur_len;
if (!(in = fopen(optarg, "r"))) {
@@ -209,7 +209,7 @@ int main(int argc, char **argv)
}
if (!in) {
- fprintf(stderr, "we require atleast one filename\n");
+ fprintf(stderr, "we require at least one filename\n");
usage();
}