Files
csapp2025/perflab/matrix/Makefile
2025-04-12 11:37:07 +08:00

35 lines
614 B
Makefile

CC = gcc
CFLAGS = -Wall -O1 -g
#LDFLAGS = -lm -lcudart -lcuda
# Source files
SRCS = rowcol_test.c clock.c cpe.c fcyc.c lsquare.c rowcol_202302723005.c
#CUDA_SRCS = rowcol.cu
OBJS = $(SRCS:.c=.o)
#rowcol.o
# Target executable
TARGET = matrix_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
#rowcol.o: rowcol.cu
# $(NVCC) $(CUDA_FLAGS) -c $< -o $@
# Clean rule
clean:
rm -f $(OBJS) $(TARGET)
# Phony targets
.PHONY: all clean