Thanks for your reply, but that didn't seem to work. I'll tell you exactly what I'm trying to do, in case I might have left something out. I have a makefile that when make is called compiles a file main.C into an executable. I've created 2 new classes called flow_node.C and flow_edge.C both files also have header files. I want to be able to create flow_node and flow_edge objects in the main.C, so I'm going to need those source files when I call make. So I'm trying to figure out what I have to do to the makefile to include these sources so that main.C will compile into an executable.
Maybe I didn't edit the makefile correctly. Here is what I did:
Code:
#---------------------------------------------------------------------#
# target entries
#---------------------------------------------------------------------#
all: main$(EXE_EXT)
main$(EXE_EXT): main$(OBJ_EXT) flow_edge($OBJ_EXT) flow_node($OBJ_EXT)
$(CGAL_CXX) $(LIBPATH) $(EXE_OPT)main main$(OBJ_EXT) $(LDFLAGS) -lm
clean: \
main.clean \
Did I do something wrong?
Here is entire original makefile for reference:
Code:
# Created by the script create_makefile
# This is the makefile for compiling a CGAL application.
#---------------------------------------------------------------------#
# include platform specific settings
#---------------------------------------------------------------------#
# Choose the right include file from the <cgalroot>/make directory.
CGAL_MAKEFILE = /export/home/oulevon/CGAL-2.3/make/makefile_sparc_SunOS-5.7_g++-2.95.3_LEDA
include $(CGAL_MAKEFILE)
#---------------------------------------------------------------------#
# compiler flags
#---------------------------------------------------------------------#
CXXFLAGS = $(CGAL_CXXFLAGS) $(LONG_NAME_PROBLEM_CXXFLAGS) \
$(DEBUG_OPT)
#---------------------------------------------------------------------#
# linker flags
#---------------------------------------------------------------------#
LIBPATH = \
$(CGAL_LIBPATH)
LDFLAGS = \
$(LONG_NAME_PROBLEM_LDFLAGS) \
$(CGAL_LDFLAGS)
#---------------------------------------------------------------------#
# target entries
#---------------------------------------------------------------------#
all: main$(EXE_EXT)
main$(EXE_EXT): main$(OBJ_EXT)
$(CGAL_CXX) $(LIBPATH) $(EXE_OPT)main main$(OBJ_EXT) $(LDFLAGS) -lm
clean: \
main.clean \
#---------------------------------------------------------------------#
# suffix rules
#---------------------------------------------------------------------#
.C$(OBJ_EXT):
$(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) $<
Thanks for any help.