LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-26-2008, 03:02 PM   #1
disruptive
Member
 
Registered: Dec 2005
Posts: 76

Rep: Reputation: 15
makefiles and modifications


Hi

I have some libraries that require execution with a certain make file. However I am unsure how to extend the makefile to include other .cpp files. I have listed below. I have been this archetype because I do not have an IDE simply the template makefile. I have been placing the single .ccp after all: But when I placed the second file I wish to incorporate into the compilation, it no longer works. So in a nutshell, how do I incorporate this second file....

Code:
#---------------------------------------------------------------------#
#                    include platform specific settings
#---------------------------------------------------------------------#
# Choose the right include file from the <cgalroot>/make directory.

# CGAL_MAKEFILE = ENTER_YOUR_INCLUDE_MAKEFILE_HERE
include $(CGAL_MAKEFILE)

#---------------------------------------------------------------------#
#                    compiler flags
#---------------------------------------------------------------------#

CXXFLAGS = \
           -I../../include \
           $(CGAL_CXXFLAGS) \
           $(LONG_NAME_PROBLEM_CXXFLAGS)

#---------------------------------------------------------------------#
#                    linker flags
#---------------------------------------------------------------------#

LIBPATH = \
          $(CGAL_LIBPATH)

LDFLAGS = \
          $(LONG_NAME_PROBLEM_LDFLAGS) \
          $(CGAL_LDFLAGS)

#---------------------------------------------------------------------#
#                    target entries
#---------------------------------------------------------------------#

all:



clean: 

#---------------------------------------------------------------------#
#                    suffix rules
#---------------------------------------------------------------------#

.C$(OBJ_EXT):
	$(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) $<


.cpp$(OBJ_EXT):
	$(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) $<
 
Old 04-26-2008, 08:05 PM   #2
marquardl
Member
 
Registered: Apr 2008
Posts: 100

Rep: Reputation: 15
Code:
# CGAL_MAKEFILE = ENTER_YOUR_INCLUDE_MAKEFILE_HERE
the first step would be to uncomment that line and to "enter yor makefile here", as it said. That makefile should of course contain all the needed definitions for $(LONG_NAME_PROBLEM_CXXFLAGS), $(LONG_NAME_PROBLEM_LDFLAGS) and all the other missing input.

In it's current form that Makefile from your sample will not do anything practical at all.

Why not writing a simple Makefile by hand? Without all these external references?

Linux

Last edited by marquardl; 05-01-2008 at 04:20 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
modifications in a squashfs filesystem fenix4life Linux - General 2 11-10-2009 03:26 AM
Synaptic modifications htnakirs Linux - Software 1 03-29-2008 05:07 AM
Ubuntu Livecd Modifications kd2323 Linux - General 5 01-08-2008 01:00 PM
grafburn modifications. gandhul Grafpup 6 07-03-2007 12:35 PM
Unwanted modifications to fstab erika_Dec2004 Mandriva 1 04-10-2005 12:29 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration