From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23648 invoked by alias); 13 Dec 2007 07:02:36 -0000 Received: (qmail 23637 invoked by uid 22791); 13 Dec 2007 07:02:34 -0000 X-Spam-Check-By: sourceware.org Received: from kuber.nabble.com (HELO kuber.nabble.com) (216.139.236.158) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 13 Dec 2007 07:02:28 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1J2i5Q-0005e0-IF for gcc-help@gcc.gnu.org; Wed, 12 Dec 2007 23:02:24 -0800 Message-ID: <14310938.post@talk.nabble.com> Date: Thu, 13 Dec 2007 07:02:00 -0000 From: mahmoodn To: gcc-help@gcc.gnu.org Subject: Re: need help for editing a makefile In-Reply-To: <475FE963.3000100@computer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: nt_mahmood@yahoo.com References: <14269485.post@talk.nabble.com> <14290372.post@talk.nabble.com> <475FE963.3000100@computer.org> X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2007-12/txt/msg00254.txt.bz2 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.