delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/03/14/18:56:37

From: Bernd Becker <munin AT munin DOT inka DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Problems with make
Date: Thu, 15 Mar 2001 00:35:44 +0100
Organization: (Posted via) INKA e.V. http://www.inka.de/
Lines: 65
Message-ID: <1buvatsc21stmvtgsfs6uapc73p591ho9j@4ax.com>
NNTP-Posting-Host: ccxvii.yapay.inka.de
Mime-Version: 1.0
X-Trace: sapa.inka.de 984613072 31561 212.227.15.91 (14 Mar 2001 23:37:52 GMT)
X-Complaints-To: newsmaster AT inka DOT de
NNTP-Posting-Date: 14 Mar 2001 23:37:52 GMT
X-Newsreader: Forte Agent 1.8/32.548
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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.

3. My GUI
Since I changed it to a library a week ago the linking line of the
test.exe is missing the redirection (of error messages to a log file)
and the executable name has no .exe suffix.
As I still included the GUI as .hpps and therefore only needed to
compile the .exe the linking was fine.
EXE = .exe
REDIR_CXX = redir -oe -e log.txt $(CXX)
LOADLIBES = -lalleg
TARGET = test$(EXE)
$(TARGET) : $(OBJ)
	$(REDIR_CXX) $(LDFLAGS) $^ $(LOADLIBES) -lpsgui -o $@


When I refer to 'linking line' I mean the line displayed on the screen
which make uses to call gcc/gxx to link the program. The linking rule
inside the makefile was not changed. The linking rule inside CFGs
makefile was the only one I could successfully edit to make it work
somehow.

And something that interests me as well:

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 ??

I'm using DJGPP 2.03, binutils 2.10, make 3.791, CSDPMI 5, GCC/GPP
2.95.2, fileutils 3.16, grep 2.4, sed 3.02, and sh-utils 1.12 under
MSDOS 6.22 with 4096 bytes reserved for environment variables.

 
TIA,
    Bernd

- Raw text -


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