From 22950ba3df3a0b739786243679d69cd4094e8b20 Mon Sep 17 00:00:00 2001 From: Robert de Bath Date: Sat, 20 Sep 2003 19:44:36 +0200 Subject: Import Dev86src-0.16.13.tar.gz --- bcc/Makefile | 10 +++++----- bcc/bcc.c | 30 ++++++++++++++++++++++++------ 2 files changed, 29 insertions(+), 11 deletions(-) (limited to 'bcc') diff --git a/bcc/Makefile b/bcc/Makefile index 93b122c..8c2c19b 100644 --- a/bcc/Makefile +++ b/bcc/Makefile @@ -12,7 +12,7 @@ BINDIR =$(PREFIX)/bin LIBDIR =$(LIBPRE)/lib/bcc BCCDEFS =-DLOCALPREFIX=$(LIBPRE) -DBINDIR=$(BINDIR) -DDEFARCH=0 -BCFLAGS=$(ANSI) $(CFLAGS) $(LDFLAGS) -DVERSION='"$(VERSION)"' +BCFLAGS=$(ANSI) $(CFLAGS) $(LDFLAGS) OBJS = bcc-cc1.o codefrag.o debug.o declare.o express.o exptree.o floatop.o \ function.o gencode.o genloads.o glogcode.o hardop.o input.o label.o \ @@ -28,16 +28,16 @@ install: all install -m 755 bcc-cc1 $(LIBDIR)/bcc-cc1 bcc: bcc.c - $(CC) $(BCFLAGS) $(BCCDEFS) $^ -o $@ + $(CC) $(BCFLAGS) $(BCCDEFS) bcc.c -o $@ ncc: bcc.c - $(CC) $(BCFLAGS) -DL_TREE -DDEFARCH=0 $^ -o $@ + $(CC) $(BCFLAGS) -DL_TREE -DDEFARCH=0 bcc.c -o $@ bcc09: bcc.c - $(CC) $(BCFLAGS) -DMC6809 $(BCCDEFS) $^ -o $@ + $(CC) $(BCFLAGS) -DMC6809 $(BCCDEFS) bcc.c -o $@ ccc: bcc.c - $(CC) $(BCFLAGS) -DCCC $(BCCDEFS) $^ -o $@ + $(CC) $(BCFLAGS) -DCCC $(BCCDEFS) bcc.c -o $@ bcc-cc1: $(OBJS) $(CC) $(BCCARCH) $(LDFLAGS) $(OBJS) -o bcc-cc1 diff --git a/bcc/bcc.c b/bcc/bcc.c index 81adda2..9b053e5 100644 --- a/bcc/bcc.c +++ b/bcc/bcc.c @@ -32,6 +32,7 @@ #include #include #endif +#include "version.h" #ifdef MSDOS #define LOCALPREFIX /linux86 @@ -307,8 +308,8 @@ struct file_list * file; !do_unproto && do_compile); - if (combined_cpp && !do_optim && !do_as ) last_stage =1; - if (!combined_cpp && !do_unproto && !do_compile ) last_stage =1; + if (combined_cpp && !do_optim && !do_as ) last_stage =1; + if (!combined_cpp && !do_compile ) last_stage =1; newfilename(file, last_stage, (combined_cpp?'s':'i'), (opt_arch<5)); @@ -455,10 +456,10 @@ run_link() default: command.cmd = LD; break; } command_reset(); - if (executable_name == 0) executable_name = "a.out"; - - command_opt("-o"); - command_opt(executable_name); + if (executable_name) { + command_opt("-o"); + command_opt(executable_name); + } if (opt_arch < 2) command_opt("-y"); @@ -742,6 +743,20 @@ char ** argv; for(ar=1; ar