In Makefile, change the OpenCV part as:
ifeq ($(OPENCV), 1)
COMMON+= -DOPENCV
CFLAGS+= -DOPENCV
LDFLAGS+= `pkg-config --libs opencv4` -lstdc++
COMMON+= `pkg-config --cflags opencv4`
endif
and GPU part as:
ifeq ($(GPU), 1)
COMMON+= -DGPU -I/usr/local/cuda/include/ -I/usr/local/cuda/targets/aarch64-linux/include/
CFLAGS+= -DGPU
LDFLAGS+= -L/usr/lib/aarch64-linux-gnu -lcuda -lcudart -lcublas -lcurand
endif
Hope it helps.