* need help for editing a makefile
@ 2007-12-11 8:11 mahmoodn
2007-12-11 12:21 ` John Love-Jensen
0 siblings, 1 reply; 5+ messages in thread
From: mahmoodn @ 2007-12-11 8:11 UTC (permalink / raw)
To: gcc-help
Hi,
I have these lines in makefile:
VVc_demo.moc: VVc_demo.cpp
$(QT_MOC) -o VVc_demo.moc VVc_demo.cpp
VVc_demo$(OBJ_EXT): VVc_demo.moc
VVc_demo$(EXE_EXT): VVc_demo$(OBJ_EXT)
$(CGAL_CXX) $(LIBPATH) $(EXE_OPT)VVc_demo VVc_demo$(OBJ_EXT) $(LDFLAGS)
I want to tell make that compile VVc_demo.cpp whenever "a.cpp" or "b.cpp" or
"c.cpp" or ... changed.
How can I do that?
--
View this message in context: http://www.nabble.com/need-help-for-editing-a-makefile-tp14269485p14269485.html
Sent from the gcc - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: need help for editing a makefile
2007-12-11 8:11 need help for editing a makefile mahmoodn
@ 2007-12-11 12:21 ` John Love-Jensen
2007-12-12 7:49 ` mahmoodn
0 siblings, 1 reply; 5+ messages in thread
From: John Love-Jensen @ 2007-12-11 12:21 UTC (permalink / raw)
To: mahmoodn, MSX to GCC
Hi Mahmoodn,
> I want to tell make that compile VVc_demo.cpp whenever "a.cpp" or "b.cpp" or
> "c.cpp" or ... changed.
> How can I do that?
VVc_demo$(OBJ_EXT) : a.cpp b.cpp c.cpp
g++ -o $@ -c VVc_demo.cpp
(Usually you'd add VVc_demo.cpp itself to the dependency list as well.)
HTH,
--Eljay
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: need help for editing a makefile
2007-12-11 12:21 ` John Love-Jensen
@ 2007-12-12 7:49 ` mahmoodn
2007-12-12 14:09 ` Tim Prince
0 siblings, 1 reply; 5+ messages in thread
From: mahmoodn @ 2007-12-12 7:49 UTC (permalink / raw)
To: gcc-help
Hello,
>VVc_demo$(OBJ_EXT) : a.cpp b.cpp c.cpp
> g++ -o $@ -c VVc_demo.cpp
>(Usually you'd add VVc_demo.cpp itself to the dependency list as well.)
Thanks but I forgot to say that there are some .h files too (it was my
fault). I add some thing like this:
VVc_demo.moc: VVc_demo.cpp
$(QT_MOC) -o VVc_demo.moc VVc_demo.cpp
VVc_demo$(OBJ_EXT): VVc_demo.moc VVc_diagram_2.h Polygon_Voronoi_diagram_2.h
g++ -o $@ -c VVc_demo.cpp
VVc_demo$(EXE_EXT): VVc_demo$(OBJ_EXT)
$(CGAL_CXX) $(LIBPATH) $(EXE_OPT)VVc_demo VVc_demo$(OBJ_EXT) $(LDFLAGS)
but it says:
[mahmood@Milky-way VVc_diagram_2]$ make
make: *** No rule to make target `VVc_diagram_2.h', needed by `VVc_demo.o'.
Stop.
What should I do now?
John (Eljay) Love-Jensen wrote:
>
> Hi Mahmoodn,
>
>> I want to tell make that compile VVc_demo.cpp whenever "a.cpp" or "b.cpp"
>> or
>> "c.cpp" or ... changed.
>> How can I do that?
>
> VVc_demo$(OBJ_EXT) : a.cpp b.cpp c.cpp
> g++ -o $@ -c VVc_demo.cpp
>
> (Usually you'd add VVc_demo.cpp itself to the dependency list as well.)
>
> HTH,
> --Eljay
>
>
>
>
--
View this message in context: http://www.nabble.com/need-help-for-editing-a-makefile-tp14269485p14290372.html
Sent from the gcc - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: need help for editing a makefile
2007-12-12 7:49 ` mahmoodn
@ 2007-12-12 14:09 ` Tim Prince
2007-12-13 7:02 ` mahmoodn
0 siblings, 1 reply; 5+ messages in thread
From: Tim Prince @ 2007-12-12 14:09 UTC (permalink / raw)
To: mahmoodn; +Cc: gcc-help
mahmoodn wrote:
>> VVc_demo$(OBJ_EXT) : a.cpp b.cpp c.cpp
>> g++ -o $@ -c VVc_demo.cpp
>
>> (Usually you'd add VVc_demo.cpp itself to the dependency list as well.)
>
> Thanks but I forgot to say that there are some .h files too (it was my
> fault). I add some thing like this:
>
> VVc_demo.moc: VVc_demo.cpp
>
> $(QT_MOC) -o VVc_demo.moc VVc_demo.cpp
>
>
>
> VVc_demo$(OBJ_EXT): VVc_demo.moc VVc_diagram_2.h Polygon_Voronoi_diagram_2.h
>
> g++ -o $@ -c VVc_demo.cpp
>
>
> VVc_demo$(EXE_EXT): VVc_demo$(OBJ_EXT)
>
> $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)VVc_demo VVc_demo$(OBJ_EXT) $(LDFLAGS)
>
>
> but it says:
> [mahmood@Milky-way VVc_diagram_2]$ make
> make: *** No rule to make target `VVc_diagram_2.h', needed by `VVc_demo.o'.
>
Add the include file path -Iyourpath to that step,, just as you would
do when compiling outside make. -I./ normally is there by default.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: need help for editing a makefile
2007-12-12 14:09 ` Tim Prince
@ 2007-12-13 7:02 ` mahmoodn
0 siblings, 0 replies; 5+ messages in thread
From: mahmoodn @ 2007-12-13 7:02 UTC (permalink / raw)
To: gcc-help
Hi,
>Add the include file path -Iyourpath to that step,, just as you would
>do when compiling outside make. -I./ normally is there by default.
you mean this (?):
VVc_demo.moc: VVc_demo.cpp
$(QT_MOC) -o VVc_demo.moc VVc_demo.cpp
VVc_demo$(OBJ_EXT): VVc_demo.moc
-I../../include \
-I../../../Arrangement_2/include \
VVc_demo$(EXE_EXT): VVc_demo$(OBJ_EXT)
$(CGAL_CXX) $(LIBPATH) $(EXE_OPT)VVc_demo VVc_demo$(OBJ_EXT) $(LDFLAGS)
and compiler and linker flags are:
CXXFLAGS = \
-I../../include \
-I../../../Arrangement_2/include \
-DNDEBUG \
$(CGAL_CXXFLAGS) \
$(LONG_NAME_PROBLEM_CXXFLAGS)
#---------------------------------------------------------------------#
# linker flags
#---------------------------------------------------------------------#
LIBPATH = \
$(CGAL_LIBPATH)
LDFLAGS = \
$(LONG_NAME_PROBLEM_LDFLAGS) \
$(CGAL_QT_LDFLAGS)
Thanks,
Tim Prince wrote:
>
> mahmoodn wrote:
>
>>> VVc_demo$(OBJ_EXT) : a.cpp b.cpp c.cpp
>>> g++ -o $@ -c VVc_demo.cpp
>>
>>> (Usually you'd add VVc_demo.cpp itself to the dependency list as well.)
>>
>> Thanks but I forgot to say that there are some .h files too (it was my
>> fault). I add some thing like this:
>>
>> VVc_demo.moc: VVc_demo.cpp
>>
>> $(QT_MOC) -o VVc_demo.moc VVc_demo.cpp
>>
>>
>>
>> VVc_demo$(OBJ_EXT): VVc_demo.moc VVc_diagram_2.h
>> Polygon_Voronoi_diagram_2.h
>>
>> g++ -o $@ -c VVc_demo.cpp
>>
>>
>> VVc_demo$(EXE_EXT): VVc_demo$(OBJ_EXT)
>>
>> $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)VVc_demo VVc_demo$(OBJ_EXT) $(LDFLAGS)
>>
>>
>> but it says:
>> [mahmood@Milky-way VVc_diagram_2]$ make
>> make: *** No rule to make target `VVc_diagram_2.h', needed by
>> `VVc_demo.o'.
>>
>
> Add the include file path -Iyourpath to that step,, just as you would
> do when compiling outside make. -I./ normally is there by default.
>
>
--
View this message in context: http://www.nabble.com/need-help-for-editing-a-makefile-tp14269485p14310938.html
Sent from the gcc - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-12-13 7:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-11 8:11 need help for editing a makefile mahmoodn
2007-12-11 12:21 ` John Love-Jensen
2007-12-12 7:49 ` mahmoodn
2007-12-12 14:09 ` Tim Prince
2007-12-13 7:02 ` mahmoodn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).