From 35a4a5a91670bf8be380c3a0e7f1d75cb397e26a Mon Sep 17 00:00:00 2001 From: gdr-ftp Date: Wed, 11 Mar 1998 01:05:04 +0000 Subject: [PATCH] startup.mk: Explicitly specify the output file in default compilation rules. This is needed specifically for the GNO builds, but is also relevent to other uses of dmake. --- build.tools/dmake.startup | 23 +++++++++++++---------- build.tools/startup.mk | 23 +++++++++++++---------- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/build.tools/dmake.startup b/build.tools/dmake.startup index 18bce01..9aae418 100644 --- a/build.tools/dmake.startup +++ b/build.tools/dmake.startup @@ -99,12 +99,12 @@ __OFLAG = -a0 # Rules for making *$O # Note that $(__OFLAG) is an 'occ' thing and that the rules for pascal # files will not really work since '.a' is generated by compile. - %$O : %.c ; $(CC) $(CFLAGS) $(__OFLAG) -c $< - %$O : %.cc ; $(CC) $(CFLAGS) $(__OFLAG) -c $< + %$O : %.c ; $(CC) -o $@ $(CFLAGS) $(__OFLAG) -c $< + %$O : %.cc ; $(CC) -o $@ $(CFLAGS) $(__OFLAG) -c $< # This is a bit of a kludge since there is no pc(1) yet. - %$O : %$P ; $(PC) $(PFLAGS) $< keep=$* ; $(MV) $*.a $*.o - %$O : %$S ; $(AS) $(ASFLAGS) $(__OFLAG) $< - %$O : %.asm ; $(AS) $(ASFLAGS) $(__OFLAG) $< + %$O : %$P ; $(PC) -o $@ $(PFLAGS) $< keep=$* ; $(MV) $*.a $*.o + %$O : %$S ; $(AS) -o $@ $(ASFLAGS) $(__OFLAG) $< + %$O : %.asm ; $(AS) -o $@ $(ASFLAGS) $(__OFLAG) $< # %$O : %.cl ; class -c $< # %$O : %.e %.r %.F %$F # $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $< @@ -113,13 +113,16 @@ __OFLAG = -a0 # is repeated for them. # Object files ending in '.a': Force '.a' with occ - %.a : %.c ; $(CC) $(CFLAGS) $(__AFLAG) -c $< - %.a : %.cc ; $(CC) $(CFLAGS) $(__AFLAG) -c $< - %.a : %$P ; $(PC) $(PFLAGS) $< keep=$* - %.a : %$S ; $(AS) $(ASFLAGS) $(__AFLAG) $< - %.a : %.asm ; $(AS) $(ASFLAGS) $(__AFLAG) $< + %.a : %.c ; $(CC) -o $@ $(CFLAGS) $(__AFLAG) -c $< + %.a : %.cc ; $(CC) -o $@ $(CFLAGS) $(__AFLAG) -c $< + %.a : %$P ; $(PC) -o $@ $(PFLAGS) $< keep=$* + %.a : %$S ; $(AS) -o $@ $(ASFLAGS) $(__AFLAG) $< + %.a : %.asm ; $(AS) -o $@ $(ASFLAGS) $(__AFLAG) $< # Object files ending in '.root': Force neither '.a' nor '.o' +# Note that since we don't specify the output file name, this set of +# rules may not work well if the object file directory is different +# from the source file hierarchy. %.root : %.c ; $(CC) $(CFLAGS) -c $< %.root : %.cc ; $(CC) $(CFLAGS) -c $< diff --git a/build.tools/startup.mk b/build.tools/startup.mk index 18bce01..9aae418 100644 --- a/build.tools/startup.mk +++ b/build.tools/startup.mk @@ -99,12 +99,12 @@ __OFLAG = -a0 # Rules for making *$O # Note that $(__OFLAG) is an 'occ' thing and that the rules for pascal # files will not really work since '.a' is generated by compile. - %$O : %.c ; $(CC) $(CFLAGS) $(__OFLAG) -c $< - %$O : %.cc ; $(CC) $(CFLAGS) $(__OFLAG) -c $< + %$O : %.c ; $(CC) -o $@ $(CFLAGS) $(__OFLAG) -c $< + %$O : %.cc ; $(CC) -o $@ $(CFLAGS) $(__OFLAG) -c $< # This is a bit of a kludge since there is no pc(1) yet. - %$O : %$P ; $(PC) $(PFLAGS) $< keep=$* ; $(MV) $*.a $*.o - %$O : %$S ; $(AS) $(ASFLAGS) $(__OFLAG) $< - %$O : %.asm ; $(AS) $(ASFLAGS) $(__OFLAG) $< + %$O : %$P ; $(PC) -o $@ $(PFLAGS) $< keep=$* ; $(MV) $*.a $*.o + %$O : %$S ; $(AS) -o $@ $(ASFLAGS) $(__OFLAG) $< + %$O : %.asm ; $(AS) -o $@ $(ASFLAGS) $(__OFLAG) $< # %$O : %.cl ; class -c $< # %$O : %.e %.r %.F %$F # $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $< @@ -113,13 +113,16 @@ __OFLAG = -a0 # is repeated for them. # Object files ending in '.a': Force '.a' with occ - %.a : %.c ; $(CC) $(CFLAGS) $(__AFLAG) -c $< - %.a : %.cc ; $(CC) $(CFLAGS) $(__AFLAG) -c $< - %.a : %$P ; $(PC) $(PFLAGS) $< keep=$* - %.a : %$S ; $(AS) $(ASFLAGS) $(__AFLAG) $< - %.a : %.asm ; $(AS) $(ASFLAGS) $(__AFLAG) $< + %.a : %.c ; $(CC) -o $@ $(CFLAGS) $(__AFLAG) -c $< + %.a : %.cc ; $(CC) -o $@ $(CFLAGS) $(__AFLAG) -c $< + %.a : %$P ; $(PC) -o $@ $(PFLAGS) $< keep=$* + %.a : %$S ; $(AS) -o $@ $(ASFLAGS) $(__AFLAG) $< + %.a : %.asm ; $(AS) -o $@ $(ASFLAGS) $(__AFLAG) $< # Object files ending in '.root': Force neither '.a' nor '.o' +# Note that since we don't specify the output file name, this set of +# rules may not work well if the object file directory is different +# from the source file hierarchy. %.root : %.c ; $(CC) $(CFLAGS) -c $< %.root : %.cc ; $(CC) $(CFLAGS) -c $<