From cd8a3dcb4ca42f22ad8f46a95e00977c92be6bbd Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Thu, 08 Feb 2018 23:22:42 +0000
Subject: [PATCH] Compile fixes
---
Makefile | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 642dd2e..2952ccf 100644
--- a/Makefile
+++ b/Makefile
@@ -5,16 +5,23 @@
OPENMP=0
LIBSO=0
-ARCH= -gencode arch=compute_20,code=[sm_20,sm_21] \
- -gencode arch=compute_30,code=sm_30 \
+ARCH= -gencode arch=compute_30,code=sm_30 \
-gencode arch=compute_35,code=sm_35 \
-gencode arch=compute_50,code=[sm_50,compute_50] \
-gencode arch=compute_52,code=[sm_52,compute_52] \
-gencode arch=compute_61,code=[sm_61,compute_61]
+
+# For Jetson Tx1 uncomment:
+# ARCH= -gencode arch=compute_51,code=[sm_51,compute_51]
+
+# For Jetson Tx2 uncomment:
+# ARCH= -gencode arch=compute_62,code=[sm_62,compute_62]
+
# This is what I use, uncomment if you know your arch and want to specify
# ARCH= -gencode arch=compute_52,code=compute_52
+
VPATH=./src/
EXEC=darknet
OBJDIR=./obj/
@@ -76,10 +83,10 @@
ifeq ($(LIBSO), 1)
CFLAGS+= -fPIC
-$(LIBNAMESO): $(OBJS)
- $(CPP) -shared -std=c++11 -fvisibility=hidden -DYOLODLL_EXPORTS $(COMMON) $(CFLAGS) $^ -o $@ src/yolo_v2_class.cpp $(LDFLAGS)
+$(LIBNAMESO): $(OBJS) src/yolo_v2_class.hpp src/yolo_v2_class.cpp
+ $(CPP) -shared -std=c++11 -fvisibility=hidden -DYOLODLL_EXPORTS $(COMMON) $(CFLAGS) $(OBJS) src/yolo_v2_class.cpp -o $@ $(LDFLAGS)
-$(APPNAMESO): $(OBJS)
+$(APPNAMESO): $(LIBNAMESO) src/yolo_v2_class.hpp src/yolo_console_dll.cpp
$(CPP) -std=c++11 $(COMMON) $(CFLAGS) -o $@ src/yolo_console_dll.cpp $(LDFLAGS) -L ./ -l:$(LIBNAMESO)
endif
--
Gitblit v1.10.0