www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/03/15/04:01:24

Date: Thu, 15 Mar 2001 10:57:55 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Bernd Becker <munin AT munin DOT inka DOT de>
cc: djgpp AT delorie DOT com
Subject: Re: Problems with make
In-Reply-To: <1buvatsc21stmvtgsfs6uapc73p591ho9j@4ax.com>
Message-ID: <Pine.SUN.3.91.1010315105738.6041M-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Thu, 15 Mar 2001, Bernd Becker wrote:

> Since the start of february makefiles which worked perfectly cause
> make to behave quite strangely. The makefiles were not attached for
> size reasons.
> (I tried all the versions of make and binutils available on simtel,
> always with the same result.)
> 
> 1. Allegro 3.9.34
> The linking line of the first .exe is missing the -lalleg switch;
> which results in the interruption of the making process because of
> 'undefined references' errors.
> The makefile of Allegro 3.9.32 works perfectly.
> 
> 2. CFG
> The linking line of the test.exe is missing the -lcfg switch and the
> executable name is .exe-less.
> Before february only an .exe was created and the -lcfg switch was
> there.
> Original linking rule:
> LDFLAGS = -L. -s
> test$(SUFIX) : test.o lib
> 	$(CC) $(CFLAGS) test.o -o test$(SUFIX) -lcfg $(LDFLAGS)
> I was able to get the -lcfg switch back by changing the linking rule
> to:
> LDLIBS = -lcfg
> TARGET = test.exe
> $(TARGET): $(OBJ) lib
> 	$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
> The .exe suffix is still missing on the linking line.

This sounds like truncation of long command lines.  Are you sure you
are running the DJGPP version of Make?  Is it possible that some other
make.exe is lurking on your PATH and is picked up before the one in
the DJGPP's `bin' directory?

> Neither the rule '$(GUIOBJS) : $(GUISRC)' nor '$(GUIOBJS) : $(patsubst
> %.o,%.cpp,$(GUIOBJS))' - with GUIOBJS being the object files and
> GUISRC the source files  - worked. The target (.o) was changed as
> expected but the source (.cpp) was always the first file in the list,
> resulting in nine .o files containing the same data.
> Is this normal behaviour or should it have worked ??

It's hard to tell: your description is not clear enough, at least for
me.  Please post a short Makefile which uses these constructs, and
what do you get as the result.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019