# This is a sample makefile for compiling a CGAL application. # #---------------------------------------------------------------------# # include platform specific settings #---------------------------------------------------------------------# # The variable CGAL_MAKEFILE is an include file with platform dependent # makefile settings. This is done to make this makefile suitable for # more than one compiler. # # The include files with platform dependent makefile settings are located # in the /make directory. They are automatically generated by the # install_cgal script. You should choose one from this directory. It is # recommended to use the full pathname! Another possibility is to define # an environment variable CGAL_MAKEFILE. include $(CGAL_MAKEFILE) #---------------------------------------------------------------------# # compiler flags #---------------------------------------------------------------------# CXXFLAGS = \ $(CGAL_CXXFLAGS) -DCYGWIN_GCC_BUG -DREPLACE_AUTO_REF_BOOST \ $(LONG_NAME_PROBLEM_CXXFLAGS) -O3 -pg \ -I$(BOOSTDIR) -DADSIMP_CGAL # remove or # the -DADSIMP_CGAL above for compiling an edge-only version # (i.e. ADedgeCGAL). # add in $(DEBUG_OPTS) or -g if you want to debug. Try changing your # CGAL_MAKEFILE to compile with -O3 (add it to CGAL_CXXFLAGS defined # there) to get maximum preformance optimization. #---------------------------------------------------------------------# # linker flags #---------------------------------------------------------------------# LIBPATH = \ $(CGAL_LIBPATH) # -static below is to ensure that an executable made on one Linux machine does not # have problems finding the appropriate shared library on another. It increases # the binary size, so you could remove it if you don't need it. LDFLAGS = \ -static $(LONG_NAME_PROBLEM_LDFLAGS) \ $(CGAL_LDFLAGS) -lpthread -pg #---------------------------------------------------------------------# # target entries #---------------------------------------------------------------------# all: \ # tester$(EXE_EXT) \ ADCGAL$(EXE_EXT) \ # ADedgeCGAL$(EXE_EXT) # toy$(EXE_EXT) \ # this is the AD edge calculation; if you compile this after compiling ADCGAL, # make sure you remove ADmainCGAL*.o files (run "make ADswitch") and comment out # -DADSIMP_CGAL in the CXX_FLAGS definition above. ADedgeCGAL$(EXE_EXT): ADmainCGAL$(OBJ_EXT) ADedgeCGAL$(OBJ_EXT) ADfunc$(OBJ_EXT)\ ADconvex$(OBJ_EXT) ADPointNeighbors$(OBJ_EXT) ADCGAL.h ADconvex.h \ ADPointNeighbors.h ADcommon.h ADdefs.h ADutil.h MyDelaunay.h SortedTuples.h \ MySTLextensions.h $(CGAL_CXX) -O3 $(LIBPATH) $(EXE_OPT)ADedgeCGAL ADmainCGAL$(OBJ_EXT) ADedgeCGAL$(OBJ_EXT) ADfunc$(OBJ_EXT)\ ADconvex$(OBJ_EXT) ADPointNeighbors$(OBJ_EXT) $(LDFLAGS) # this is the AD simplex calculation, the standard version of the program that is "made" by # running "make". If you are compiling this version after first compiling the edge-only # version, be sure to remove ADmainCGAL.o (run "make ADswitch"), add -DADSIMP_CGAL to the # CXX_FLAGS defined, and then rebuild. If you fail to follow any of these steps, you may # end up with the edge-only version (the time spent for stage "6", AD tri/tet calculation # will be 0). ADCGAL$(EXE_EXT): ADmainCGAL$(OBJ_EXT) ADedgeCGAL$(OBJ_EXT) ADsimpCGAL$(OBJ_EXT) ADconvex$(OBJ_EXT) \ ADfunc$(OBJ_EXT) ADPointNeighbors$(OBJ_EXT) ADCGAL.h \ ADconvex.h ADPointNeighbors.h ADcommon.h ADdefs.h ADutil.h MyDelaunay.h \ SortedTuples.h MySTLextensions.h $(CGAL_CXX) -O3 -DADSIMP_CGAL $(LIBPATH) $(EXE_OPT)ADCGAL ADmainCGAL$(OBJ_EXT) ADedgeCGAL$(OBJ_EXT) \ ADsimpCGAL$(OBJ_EXT) ADconvex$(OBJ_EXT) ADfunc$(OBJ_EXT) ADPointNeighbors$(OBJ_EXT) $(LDFLAGS) # beyond this are configurations used for testing components of AD.. these are not # relevant to the end user, are not documented here, and not intended to be used # unless you know what you are doing. tester$(EXE_EXT): tester$(OBJ_EXT) ADPointNeighbors$(OBJ_EXT) \ ADPointNeighbors.h ADcommon.h ADdefs.h ADutil.h MyDelaunay.h \ SortedTuples.h MySTLextensions.h $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)tester tester$(OBJ_EXT) ADPointNeighbors$(OBJ_EXT) $(LDFLAGS) quickhullbug$(EXE_EXT): quickhullbug$(OBJ_EXT) common.h $(CGAL_CXX) -O3 $(LIBPATH) $(EXE_OPT)quickhullbug quickhullbug$(OBJ_EXT) $(LDFLAGS) clean: \ ADCGAL.clean \ ADedgeCGAL.clean #\ # tester.clean \ # qhbug.clean ADCGAL.clean: \ ADmainCGAL.clean \ ADedgeCGAL.clean \ ADsimpCGAL.clean \ ADconvex.clean \ ADPointNeighbors.clean \ ADfunc.clean ADedgeCGAL.clean: \ ADmainCGAL.clean \ ADedgeCGAL.clean \ ADconvex.clean \ ADPointNeighbors.clean \ ADfunc.clean # run this before switching from making ADCGAL to ADedgeCGAL and vice versa ADswitch: \ ADmainCGAL.clean #---------------------------------------------------------------------# # suffix rules #---------------------------------------------------------------------# .C$(OBJ_EXT): $(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) $< .cpp$(OBJ_EXT): $(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) $< .cpp.clean: rm -f $* $*.o