Allow optimization flags on make command line; all user to force no listing of tar files

pull/2/head
Dave Vasilevsky 14 years ago
parent 0357c6413c
commit 7d1cdfa7f4

@ -9,7 +9,8 @@ ifeq ($(CC),gcc)
LDFLAGS += -search_paths_first
endif
endif
CFLAGS = $(patsubst %,-I%/include,$(LIBPREFIX)) -g -O0 -std=c99 \
OPT = -g -O0
CFLAGS = $(patsubst %,-I%/include,$(LIBPREFIX)) $(OPT) -std=c99 \
-Wall -Wno-unknown-pragmas
CC = gcc

@ -8,13 +8,27 @@
int main(int argc, char **argv) {
char *progname = argv[0];
bool tar = true;
int ch;
while ((ch = getopt(argc, argv, "t")) != -1) {
switch (ch) {
case 't':
tar = false;
break;
default:
die("Unknown option");
}
}
argc -= optind - 1;
argv += optind - 1;
if (argc == 1) {
gInFile = stdin;
} else if (argc == 2) {
if (!(gInFile = fopen(argv[1], "r")))
die("Can't open input file");
} else {
die("Usage: %s [FILE]", progname);
die("Usage: %s -f [FILE]", progname);
}
decode_index();
@ -26,7 +40,7 @@ int main(int argc, char **argv) {
(uintmax_t)iter.block.uncompressed_size);
}
if (read_file_index()) {
if (tar && read_file_index()) {
printf("\n");
dump_file_index(stdout);
free_file_index();

Loading…
Cancel
Save