matrix fixed
This commit is contained in:
35
perflab/poly/Makefile
Normal file
35
perflab/poly/Makefile
Normal file
@@ -0,0 +1,35 @@
|
||||
CC = gcc
|
||||
NVCC = nvcc
|
||||
CFLAGS = -Wall -O2 -g
|
||||
CUDA_FLAGS = -O2 -g
|
||||
LDFLAGS = -lm -lcudart
|
||||
|
||||
# Source files
|
||||
SRCS = poly_test.c clock.c cpe.c fcyc.c lsquare.c
|
||||
CUDA_SRCS = poly.cu
|
||||
OBJS = $(SRCS:.c=.o) poly.o
|
||||
|
||||
# Target executable
|
||||
TARGET = poly_test
|
||||
|
||||
# Default target
|
||||
all: $(TARGET)
|
||||
|
||||
# Rule to build the executable
|
||||
$(TARGET): $(OBJS)
|
||||
$(CC) $(OBJS) -o $(TARGET) $(LDFLAGS)
|
||||
|
||||
# Rule to build object files
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
# Rule to build CUDA object files
|
||||
poly.o: poly.cu
|
||||
$(NVCC) $(CUDA_FLAGS) -c $< -o $@
|
||||
|
||||
# Clean rule
|
||||
clean:
|
||||
rm -f $(OBJS) $(TARGET)
|
||||
|
||||
# Phony targets
|
||||
.PHONY: all clean
|
||||
Reference in New Issue
Block a user