# --------------------------------------------------------------------------- # # 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), and the FEATURE Project at # # Stanford, funded under the NIH grant LM05652 # # (See http://feature.stanford.edu/index.php). # # # # Portions copyright (c) 2010 Stanford University, Authors and Contributors. # # Authors: Marc Sosnick # # Contributors: Kai J. Kolhoff, William Hsu # # # # 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 by # # the Free Software Foundation, either version 3 of the License, or (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 . # # --------------------------------------------------------------------------- # # $Id$ # common.mk # Common defs for the CAMPAIGN Developer Distribution # # Configuration: # Make sure that CXXFLAGS, and LFLAGS point to the correct locations in # your system. # # Usage: # From the command line in the dev directory, type make. The system # will descend into each directory and execute the makefile in that # directory. # compiler (use Nvidia CUDA compiler) NVCC = nvcc CXX = nvcc # standard dependencies 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 # flags for link phase LFLAGS = -L/usr/local/cuda/lib -L/usr/lib -lcuda -lcudart # standard rules # make final program $(METHOD_PROGNAMES): % : %.o $(OBJS) $(OBJDEPS) $(CXX) $@Main.cc $@.o $(OBJS) $(LFLAGS) $(CXXFLAGS) -o $@ # make final program $(UTIL_PROGNAMES): % : %.o $(OBJS) $(OBJDEPS) $(CXX) $@.cpp $(OBJS) $(LFLAGS) $(CXXFLAGS) -o $@ $(OBJECTS): @echo making util stuff $(NVCC) $@ -c $(CXXFLAGS) $< -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 $(METHOD_PROGNAMES) rm -f $(UTIL_PROGNAMES) rm -f *.t rm -f test/*.t