Article View: gnu.gcc.help
Article #49560Basic MAKE question
From: M. Thomas
Date: Wed, 05 Jan 1994 22:12
Date: Wed, 05 Jan 1994 22:12
31 lines
1899 bytes
1899 bytes
I'm fairly, er, gnu to DJGPP and would appreciate it if someone would
tell me what's wrong with the following makefile (whose purpose is to
build the executable file 'whoopie' from source 'whoopie.c' by compiling
and linking). This makefile works fine when 'whoopie' or 'whoopie.o'
doesn't exist. But if I modify 'whoopie.c', then remake, I get the
message 'whoopie is up to date' even though I can plainly see that
'whoopie.c' is newer than 'whoopie.o' and 'whoopie'. Silly me -- I
thought that 'make' was supposed to search the entire tree of
dependencies for updated files, then act accordingly. I've RTFM, but if
the answer's in the FM, tell me where. Thanks for helping me grok the
almost-as-good-as-JCL syntax of makefiles! :-}
...... TEAR ALONG PERFORATIONS ......
OBJDIR = d:/
vpath %.o $(OBJDIR)
EXEFILE = whoopie
OBJFILES = whoopie.o
$(EXEFILE) : $(OBJFILES)
gcc -o $(EXEFILE) $(addprefix $(OBJDIR), $(OBJFILES)) -lm
%.o : %.c
gcc -c -o $(OBJDIR)$@ $<
...... TEAR ALONG PERFORATIONS ......
P.S. I'm using the latest version of DJGPP (2.5.7). My actual
makefile has tab characters before each shell command (of course, else
it wouldn't work at all). Email responses are acceptable.
--
Mark A. Thomas
thommark@access.digex.net
Technical Details
Message-ID:
<2gfe18$2i2@access3.digex.net>Path:
arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!cs.utexas.edu!uunet!digex.net!digex.net!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,ee8ee1b4a612df74,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1994-01-05 14:40:49 PST Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!cs.utexas.edu!uunet!digex.net!digex.net!not-for-mail From: thommark@access3.digex.net (M. Thomas) Newsgroups: gnu.gcc.help Subject: Basic MAKE question Date: 5 Jan 1994 17:12:56 -0500 Organization: Express Access Online Communications, Greenbelt, MD USA Lines: 31 Message-ID: <2gfe18$2i2@access3.digex.net> NNTP-Posting-Host: access3.digex.net Keywords: make