From: Alan Cox Date: Sat, 27 Dec 2014 00:45:09 +0000 (+0000) Subject: Oops: revert Will's bits I didn't mean to merge X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=d1328ed6e0e4fa8ad63dde99b4d79b23ef7bb21a;p=FUZIX.git Oops: revert Will's bits I didn't mean to merge --- diff --git a/Applications/util/Makefile b/Applications/util/Makefile index 3615c33d..f96f5a96 100644 --- a/Applications/util/Makefile +++ b/Applications/util/Makefile @@ -76,8 +76,6 @@ OBJS = $(SRCS:.c=.rel) LIBS = ../../Library/libs/syslib.lib -FCC = ../../Library/tools/fcc - APPS = $(OBJS:.rel=) all: $(APPS) @@ -85,10 +83,13 @@ all: $(APPS) $(OBJS): $(SRCS) .c.rel: - $(FCC) -c $< + $(CC) $(CC_OPT) $(@:.rel=.c) %: %.rel - $(FCC) $< -o $@ + $(LINKER) $(LINKER_OPT) ../../Library/libs/crt0.rel $< $(LIBS) -o $@.ihx + makebin -s 65536 $@.ihx $@.tmp + $(BINMAN) $(PROGLOAD) $@.tmp $@.map $@ + chmod +x $@ clean: rm -f $(OBJS) $(APPS) $(SRCS:.c=) core *~ *.asm *.lst *.sym *.map *.noi *.lk *.ihx *.tmp diff --git a/Library/libs/c.lib b/Library/libs/c.lib deleted file mode 120000 index b602f7ef..00000000 --- a/Library/libs/c.lib +++ /dev/null @@ -1 +0,0 @@ -syslib.lib \ No newline at end of file diff --git a/Library/tools/binman.c b/Library/tools/binman.c index c2cb69fa..adf2061a 100644 --- a/Library/tools/binman.c +++ b/Library/tools/binman.c @@ -79,9 +79,9 @@ int main(int argc, char *argv[]) ProcessMap(map); fclose(map); - bin = fopen(argv[argp++], "w"); + bin = fopen(argv[argp], "w"); if (bin == NULL) { - perror(argv[argp - 1]); + perror(argv[argp]); exit(1); } memcpy(buf + s__INITIALIZED, buf + s__INITIALIZER, l__INITIALIZER); @@ -92,5 +92,6 @@ int main(int argc, char *argv[]) exit(1); } fclose(bin); + printf("%s: %d bytes from %d\n", argv[argp], s__DATA - progload, progload); exit(0); } diff --git a/Library/tools/fcc.c b/Library/tools/fcc.c index 884a513c..966d5351 100644 --- a/Library/tools/fcc.c +++ b/Library/tools/fcc.c @@ -256,7 +256,7 @@ static int do_command(void) { pid_t pid, w; int status; - + if (verbose) printf("\n\n"); argvec[argp] = NULL; @@ -334,7 +334,7 @@ static void build_command(void) autotarget(); add_option("-o", target); if (mode == MODE_LINK) { - add_argument("/home/btg/projects/fuzix/Library/libs/crt0.rel"); + add_argument("/opt/fcc/lib/crt0.rel"); } if (srchead) add_argument_list(srchead); @@ -430,8 +430,8 @@ int main(int argc, const char *argv[]) { } } } - add_include_path("/home/btg/projects/fuzix/Library/include/"); - add_library_path("/home/btg/projects/fuzix/Library/libs/"); + add_include_path("/opt/fcc/include/"); + add_library_path("/opt/fcc/lib/"); add_library("c"); build_command(); @@ -449,7 +449,7 @@ int main(int argc, const char *argv[]) { if (ret) exit(ret); argp = 0; - add_argument("/home/btg/projects/fuzix/Library/tools/binman"); + add_argument("/opt/fcc/bin/binman"); add_argument(t); add_argument(rebuildname("", target, "map")); add_argument(chopname(target)); diff --git a/Library/tools/libclean b/Library/tools/libclean index 632fbff4..12df92c0 100755 --- a/Library/tools/libclean +++ b/Library/tools/libclean @@ -3,22 +3,8 @@ # Clean the supplied SDCC library of stuff we don't want. This # IMHO beats forking the library or building a private copy. # - -# Look for the sdcc library in one of the common locations -for f in /opt/sdcc/share/sdcc/lib/z80/z80.lib \ - /usr/local/share/sdcc/lib/z80/z80.lib \ - /usr/share/sdcc/lib/z80/z80.lib; do - if [ -e $f ]; then - cp $f tmp.lib - break - fi; -done - -if [ ! -e tmp.lib ]; then - echo "Cannot find sdcc z80.lib" - exit 1 -fi - +# +cp /opt/sdcc/share/sdcc/lib/z80/z80.lib tmp.lib # # Scrub the functions we don't want to inherit # Need to review setjmp and maybe a couple of others