🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #50416

help with gmake

#50416
From: Brett Kerbel
Date: Tue, 28 Sep 1993 14:34
36 lines
1931 bytes
Hello all,
   My current application has a src directory with an obj sub-directory.
The idea is to keep all the .c files in the src directory and the 
.o files in the obj sub-directory.  I have cluged my makefile to
simply mv the .o files to the desired directory after the compile
has finished.  This works fine, when the application needs to be
completely re-compiled, however, I can't seem to be able to get
gmake to look in the obj directory for the dependancies which results
in the entire application being re-compiled every time I run gmake.
Any help would be greatly appreciated.  The rule I am using to
do the compilation is as follows:

all: libsearch_tbl.a
        mv *.o OBJ

libsearch_tbl.a: $(SRC:.c=.o)
        rm $@
        $(AR) $@ $(SRC:.c=.o)
        $(RANLIB) $@
        @-chmod 664 $@ $(SRC:.c=.o)

Yes this is a library that I'm compiling, not an entire application,
however I will have the same problem in the application that uses this
library.

       	       Thank You,
       	       	       Brett Kerbel

Please respond to kerbel@killians.gsfc.nasa.gov



-- 
Brett Kerbel <kerbel@killians.gsfc.nasa.gov>		VOICE:(301) 513-1710
Hughes STX/NASA, 7701 Greenbelt Rd. Suite 400		FAX:(301) 513-1608
Greenbelt, MD 20770
Technical Details
Message-ID: <289i2a$n5j@skates.gsfc.nasa.gov>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!agate!ames!skates.gsfc.nasa.gov!killians.gsfc.nasa.gov!kerbel

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,6dae66007600e6f5,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-09-28 07:53:01 PST
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!agate!ames!skates.gsfc.nasa.gov!killians.gsfc.nasa.gov!kerbel
From: kerbel@killians.gsfc.nasa.gov (Brett Kerbel)
Newsgroups: gnu.gcc.help
Subject: help with gmake
Date: 28 Sep 1993 14:34:50 GMT
Organization: Hughes STX
Lines: 36
Message-ID: <289i2a$n5j@skates.gsfc.nasa.gov>
NNTP-Posting-Host: killians.gsfc.nasa.gov
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit