help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to make "gmake" recompile the files based on their dependencies'


From: Gautam Shejwalkar
Subject: Re: how to make "gmake" recompile the files based on their dependencies' modified time
Date: Fri, 3 Oct 2008 12:12:58 +0530

Hi

I think the way in which you are referring the dependencies it's not right. You can try this and check

******************************************
PROGRAM = Astar
DEPENDENCIES = Maze.o Maze.h

all: $(PROGRAM)

%.o : %.cc %.h
    g++ -c $<
$(PROGRAM): $(DEPENDENCIES)
    g++ Maze.o Astar.cc -o $(PROGRAM)
clean:
    rm *.o $(PROGRAM)
********************************************

-SG


On Fri, Oct 3, 2008 at 11:30 AM, parth <address@hidden> wrote:

Hello guys,

I have create a simple makefile as below.

But Whenever i execute make command, it doesn't check if any of the files
have modified time greater that the object file's creation time and just
recompiles the all target.
I have to do make clean everytime I want the Maze.cc to recompile

******************************************
PROGRAM = Astar
DEPENDENCIES = Maze.o Maze.h

all: $(DEPENDENCIES) $(PROGRAM).cc
       g++ Maze.o Astar.cc -o $(PROGRAM)

%.o : %.cc %.h
       g++ -c $<

clean:
       rm *.o $(PROGRAM)
********************************************

Can anyone tell me where am I making a mistake?

regards,
parth



--
View this message in context: http://www.nabble.com/how-to-make-%22gmake%22-recompile-the-files-based-on-their-dependencies%27-modified-time-tp19792569p19792569.html
Sent from the Gnu - Make - Help mailing list archive at Nabble.com.



_______________________________________________
Help-make mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-make


reply via email to

[Prev in Thread] Current Thread [Next in Thread]