# -------------------------------------------------------------------------- # CAMPAIGN # -------------------------------------------------------------------------- # This is part of the CAMPAIGN data clustering library originating from # Simbios, the NIH National Center for Physics-Based Simulation of # Biological Structures at Stanford, funded under the NIH Roadmap for # Medical Research, grant U54 GM072970. See https://simtk.org. # # Portions copyright (c) 2010 Stanford University and the Authors. # Authors: Kai J. Kohlhoff, Marc Sosnick, William Hsu # Contributors: # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . # -------------------------------------------------------------------------- # file: Makefile # # Makefile for kcentersCPU # # Description: makefile for kcentersCPU. # # Author: Marc Sosnick # Date: January 5, 2010 # compiler (use Nvidia CUDA compiler) NVCC = nvcc CXX = g++ # standard dependencies for projects OBJS = ../util/timing.o ../util/dataio.o ../util/tokens.o ../util/defaults.o ../util/gpudevices.o OBJDEPS = $(OBJS:.o=.h) ../util/metricsGPU.h ../util/metricsCPU.h/ # flags for compile phase CXXFLAGS = -I/usr/local/cuda/include -I/Developer/GPU\ Computing/C/common/inc -I/Developer/GPU\ Computing/shared/inc # CXXFLAGS = -I/usr/local/cuda/include -I/home/kohlhoff/projects/clustering/inc -I. # flags for link phase LFLAGS = -L/usr/local/cuda/lib -L/usr/lib64 -L/usr/lib -lcuda -lcudart # LFLAGS = -L/usr/local/cuda/lib64 -L/usr/lib64 -L/usr/lib -L/usr/lib64 -lcuda -lcudart # LFLAGS = -L/usr/local/cuda/lib64 -L/usr/lib64 -lcuda -lcudart # standard rules # make final program $(PROGNAMES): % : %.o $(OBJS) $(OBJDEPS) $(CXX) $(OBJS) $(LFLAGS) $(CXXFLAGS) $@.o -o $@ # making an object file from a cu source %.o: %.cu $(CUDEPS) $(NVCC) -c $(CXXFLAGS) $< -o $@ # making an object file from a cpp source %.o: %.cpp $(CXXDEPS) $(CXX) -c $(CXXFLAGS) $< -o $@ .PHONY: clean clean: rm -f *.o rm -f $(PROGNAMES) rm -f *.t