mirror of
https://github.com/augustin64/projet-tipe
synced 2025-01-23 23:26:25 +01:00
Add exception if nvcc is not installed
This commit is contained in:
parent
340e2fb5d2
commit
02ad00e09a
10
Makefile
10
Makefile
@ -4,6 +4,7 @@ CACHE_DIR := ./cache
|
|||||||
NVCC := nvcc
|
NVCC := nvcc
|
||||||
CC := gcc
|
CC := gcc
|
||||||
|
|
||||||
|
NVCC_INSTALLED := $(shell command -v nvcc 2> /dev/null)
|
||||||
|
|
||||||
MNIST_SRCDIR := $(SRCDIR)/mnist
|
MNIST_SRCDIR := $(SRCDIR)/mnist
|
||||||
CNN_SRCDIR := $(SRCDIR)/cnn
|
CNN_SRCDIR := $(SRCDIR)/cnn
|
||||||
@ -72,7 +73,11 @@ $(BUILDDIR)/cnn_%.o: $(CNN_SRCDIR)/%.c $(CNN_SRCDIR)/include/%.h
|
|||||||
$(CC) $(CFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
$(BUILDDIR)/cnn_%.o: $(CNN_SRCDIR)/%.cu $(CNN_SRCDIR)/include/%.h
|
$(BUILDDIR)/cnn_%.o: $(CNN_SRCDIR)/%.cu $(CNN_SRCDIR)/include/%.h
|
||||||
|
ifndef NVCC_INSTALLED
|
||||||
|
@echo "nvcc not found, skipping"
|
||||||
|
else
|
||||||
$(NVCC) $(NVCCFLAGS) -c $< -o $@
|
$(NVCC) $(NVCCFLAGS) -c $< -o $@
|
||||||
|
endif
|
||||||
#
|
#
|
||||||
# Build general files
|
# Build general files
|
||||||
#
|
#
|
||||||
@ -101,8 +106,11 @@ build/test-mnist_%: test/mnist_%.c $(MNIST_OBJ) $(BUILDDIR)/colors.o
|
|||||||
$(CC) $(CFLAGS) $^ -o $@
|
$(CC) $(CFLAGS) $^ -o $@
|
||||||
|
|
||||||
$(BUILDDIR)/test-cnn_matrix_multiplication: test/cnn_matrix_multiplication.cu $(BUILDDIR)/cnn_matrix_multiplication.o $(BUILDDIR)/colors.o $(BUILDDIR)/mnist.o
|
$(BUILDDIR)/test-cnn_matrix_multiplication: test/cnn_matrix_multiplication.cu $(BUILDDIR)/cnn_matrix_multiplication.o $(BUILDDIR)/colors.o $(BUILDDIR)/mnist.o
|
||||||
|
ifndef NVCC_INSTALLED
|
||||||
|
@echo "nvcc not found, skipping"
|
||||||
|
else
|
||||||
$(NVCC) $(NVCCFLAGS) $^ -o $@
|
$(NVCC) $(NVCCFLAGS) $^ -o $@
|
||||||
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# Utils
|
# Utils
|
||||||
|
Loading…
Reference in New Issue
Block a user