df: 1e: hello world
This commit is contained in:
29
ds/25-1/1e/Makefile
Normal file
29
ds/25-1/1e/Makefile
Normal file
@ -0,0 +1,29 @@
|
||||
CC = nvcc -arch=sm_75
|
||||
DEBUG ?= false
|
||||
DIRS = dist build
|
||||
|
||||
ifeq ($(DEBUG), false)
|
||||
CC += -O3
|
||||
else
|
||||
CC += -g -G
|
||||
endif
|
||||
|
||||
.PHONY: all run
|
||||
|
||||
all: $(DIRS) dist/app
|
||||
|
||||
dist/app: build/main.o build/op.o
|
||||
$(CC) $^ -o $@ -lcuda
|
||||
|
||||
build/op.o: op.ptx
|
||||
$(CC) $^ -dc -o $@
|
||||
|
||||
build/main.o: main.cu
|
||||
$(CC) $^ -ptx -o build/main.ptx
|
||||
$(CC) $^ -rdc=true -dc -o $@
|
||||
|
||||
$(DIRS):
|
||||
mkdir -p $@
|
||||
|
||||
clean:
|
||||
rm -rf $(DIRS)
|
||||
Reference in New Issue
Block a user