LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   makefiles and modifications (https://www.linuxquestions.org/questions/programming-9/makefiles-and-modifications-638039/)

disruptive 04-26-2008 03:02 PM

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) $<


marquardl 04-26-2008 08:05 PM

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


All times are GMT -5. The time now is 03:13 AM.