Skip to content

Commit f1003ef

Browse files
committed
Add compilation options for including OpenCV
1 parent 9dff8ec commit f1003ef

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

modules/Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
ifndef USER_DEF_SYSTEMC_DIR
12
SYSTEMC?=$(HOME)/systemc-2.3.3
3+
endif # USER_DEF_SYSTEMC_DIR
24
TARGET?=test
35

46
# Compiler
@@ -17,6 +19,15 @@ BINDIR=./
1719
INCDIR=-I. -I./include -I$(SYSTEMC)/include -Ibasic_protocol -I$(SYSTEMC)/include/tlm_core/tlm_2
1820
LIBDIR=-L. -L$(SYSTEMC)/lib-linux64
1921

22+
ifdef INCLUDE_OPENCV
23+
# Target
24+
LIBS+=-lopencv_imgcodecs -lopencv_core -lopencv_highgui -lopencv_imgproc
25+
26+
# Source directories
27+
INCDIR+=-I/usr/local/include/opencv4
28+
LIBDIR+=-L/usr/local/lib
29+
endif # INCLUDE_OPENCV
30+
2031
SOURCES := $(wildcard $(SRCDIR)/*.cpp)
2132
INCLUDES := $(wildcard $(INCDIR)/*.hpp)
2233
OBJECTS := $(SOURCES:$(SRCDIR)/%.cpp=$(OBJDIR)/%.o)

0 commit comments

Comments
 (0)