Yes, able to build the sample application code for camera. Given below is the entire make file. I have taken portions of JETSON_NANO flag from the sample makefile.
EI_SDK?=edge-impulse-sdk
PYTHON_CROSS_PATH?=
print-% : ; @echo $* = $($*)
UNAME_S := $(shell uname -s)
CFLAGS += -Wall -g -Wno-strict-aliasing
CFLAGS += -I.
CFLAGS += -Isource
CFLAGS += -Imodel-parameters
CFLAGS += -Itflite-model
CFLAGS += -Ithird_party/
CFLAGS += -Os
CFLAGS += -DNDEBUG
CFLAGS += -DEI_CLASSIFIER_ENABLE_DETECTION_POSTPROCESS_OP=1
CFLAGS += -g
CFLAGS += -Wno-asm-operand-widths
CXXFLAGS += -std=c++14
LDFLAGS += -lm -lstdc++
CFLAGS += -I/usr/local/include/opencv4/ -Iopencv/opencv/include -Iopencv/opencv/3rdparty/include -Iopencv/opencv/3rdparty/quirc/include -Iopencv/opencv/3rdparty/carotene/include -Iopencv/opencv/3rdparty/ittnotify/include -Iopencv/opencv/3rdparty/openvx/include -Iopencv/opencv/modules/video/include -Iopencv/opencv/modules/flann/include -Iopencv/opencv/modules/core/include -Iopencv/opencv/modules/stitching/include -Iopencv/opencv/modules/imgproc/include -Iopencv/opencv/modules/objdetect/include -Iopencv/opencv/modules/gapi/include -Iopencv/opencv/modules/world/include -Iopencv/opencv/modules/ml/include -Iopencv/opencv/modules/imgcodecs/include -Iopencv/opencv/modules/dnn/include -Iopencv/opencv/modules/dnn/src/vkcom/include -Iopencv/opencv/modules/dnn/src/ocl4dnn/include -Iopencv/opencv/modules/dnn/src/tengine4dnn/include -Iopencv/opencv/modules/videoio/include -Iopencv/opencv/modules/highgui/include -Iopencv/opencv/modules/features2d/include -Iopencv/opencv/modules/ts/include -Iopencv/opencv/modules/photo/include -Iopencv/opencv/modules/calib3d/include
ifeq ($(UNAME_S),Linux) # on Linux set the library paths as well
LDFLAGS += -Lopencv/lib -L/usr/local/lib -Wl,-R/usr/local/lib
endif
LDFLAGS += -lopencv_ml -lopencv_objdetect -lopencv_stitching -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_imgproc -lopencv_flann -lopencv_core
CSOURCES = $(wildcard edge-impulse-sdk/CMSIS/DSP/Source/TransformFunctions/.c) $(wildcard edge-impulse-sdk/CMSIS/DSP/Source/CommonTables/.c) $(wildcard edge-impulse-sdk/CMSIS/DSP/Source/BasicMathFunctions/.c) $(wildcard edge-impulse-sdk/CMSIS/DSP/Source/ComplexMathFunctions/.c) $(wildcard edge-impulse-sdk/CMSIS/DSP/Source/FastMathFunctions/.c) $(wildcard edge-impulse-sdk/CMSIS/DSP/Source/SupportFunctions/.c) $(wildcard edge-impulse-sdk/CMSIS/DSP/Source/MatrixFunctions/.c) $(wildcard edge-impulse-sdk/CMSIS/DSP/Source/StatisticsFunctions/.c)
CXXSOURCES = $(wildcard tflite-model/.cpp) $(wildcard edge-impulse-sdk/dsp/kissfft/.cpp) $(wildcard edge-impulse-sdk/dsp/dct/.cpp) $(wildcard ./edge-impulse-sdk/dsp/memory.cpp) $(wildcard edge-impulse-sdk/porting/posix/.c*) $(wildcard edge-impulse-sdk/porting/mingw32/.c)
CCSOURCES =
CFLAGS += -DTF_LITE_DISABLE_X86_NEON=1
CSOURCES += edge-impulse-sdk/tensorflow/lite/c/common.c
CCSOURCES += $(wildcard edge-impulse-sdk/tensorflow/lite/kernels/.cc) $(wildcard edge-impulse-sdk/tensorflow/lite/kernels/internal/.cc) $(wildcard edge-impulse-sdk/tensorflow/lite/micro/kernels/.cc) $(wildcard edge-impulse-sdk/tensorflow/lite/micro/.cc) $(wildcard edge-impulse-sdk/tensorflow/lite/micro/memory_planner/.cc) $(wildcard edge-impulse-sdk/tensorflow/lite/core/api/.cc)
LDFLAGS += tflite/linux-jetson-nano/libei_debug.a -L/usr/local/cuda-10.2/targets/aarch64-linux/lib/ -lcudart -lnvinfer -lnvonnxparser -Wl,–warn-unresolved-symbols,–unresolved-symbols=ignore-in-shared-libs
LDFLAGS += -L/usr/local/lib -Wl,-R/usr/local/lib
COBJECTS := $(patsubst %.c,%.o,$(CSOURCES))
CXXOBJECTS := $(patsubst %.cpp,%.o,$(CXXSOURCES))
CCOBJECTS := $(patsubst %.cc,%.o,$(CCSOURCES))
WITH_OPENCV?=0
USE_OPTIMIZED_DSEXAMPLE?=0
CUDA_VER=10.2
ifeq ($(CUDA_VER),)
$(error “CUDA_VER is not set”)
endif
TARGET_DEVICE = $(shell gcc -dumpmachine | cut -f1 -d -)
CXX:= g++
ifeq ($(USE_OPTIMIZED_DSEXAMPLE),1)
SRCS:= gstdsexample_optimized.cpp
else
SRCS:= gstdsexample.cpp
endif
INCS:= $(wildcard *.h)
LIB:=libnvdsgst_dsexample.so
NVDS_VERSION:=6.0
DEP:=dsexample_lib/libdsexample.a
DEP_FILES:=$(wildcard dsexample_lib/dsexample_lib.* )
DEP_FILES-=$(DEP)
CFLAGS+= -fPIC -DDS_VERSION=“6.0.0” \
-I /usr/local/cuda-$(CUDA_VER)/include \
-I …/…/includes -I /opt/nvidia/deepstream/deepstream-6.0/sources/gst-plugins/gst-dsexample
GST_INSTALL_DIR?=/opt/nvidia/deepstream/deepstream-$(NVDS_VERSION)/lib/gst-plugins/
LIB_INSTALL_DIR?=/opt/nvidia/deepstream/deepstream-$(NVDS_VERSION)/lib/
LIBS := -shared -Wl,-no-undefined \
-L dsexample_lib -ldsexample \
-L/usr/local/cuda-$(CUDA_VER)/lib64/ -lcudart -ldl \
-lnppc -lnppig -lnpps -lnppicc -lnppidei \
-L$(LIB_INSTALL_DIR) -lnvdsgst_helper -lnvdsgst_meta -lnvds_meta -lnvbufsurface -lnvbufsurftransform\
-Wl,-rpath,$(LIB_INSTALL_DIR)
OBJS:= $(SRCS:.cpp=.o)
PKGS:= gstreamer-1.0 gstreamer-base-1.0 gstreamer-video-1.0
ifeq ($(WITH_OPENCV),1)
CFLAGS+= -DWITH_OPENCV
ifeq ($(TARGET_DEVICE),aarch64)
PKGS+= opencv4
else
PKGS+= opencv
endif
endif
CFLAGS+=$(shell pkg-config --cflags $(PKGS))
LIBS+=$(shell pkg-config --libs $(PKGS))
all: $(LIB)
#all: runner
#.PHONY: runner clean
#$(LIB)
#new
$(COBJECTS) : %.o : %.c
$(CXXOBJECTS) : %.o : %.cpp
$(CCOBJECTS) : %.o : %.cc
%.o: %.c
$(CC) $(CFLAGS) -c $^ -o $@
%.o: %.cc
$(CXX) $(CFLAGS) $(CXXFLAGS) -c $^ -o $@
%.o: %.cpp
$(CXX) $(CFLAGS) $(CXXFLAGS) -c $^ -o $@
#new
%.o: %.cpp $(INCS) Makefile
@echo $(CFLAGS)
$(CXX) -c -o $@ $(CFLAGS) $<
$(LIB): $(OBJS) $(DEP) $(COBJECTS) $(CXXOBJECTS) $(CCOBJECTS) Makefile
@echo $(CFLAGS)
$(CXX) $(COBJECTS) $(CXXOBJECTS) $(CCOBJECTS) $(OBJS) -o $@ $(LIBS) $(LDFLAGS)
#$(LDFLAGS)
#$(CCOBJECTS)?? Gives error
$(DEP): $(DEP_FILES)
$(MAKE) -C dsexample_lib/
install: $(LIB)
cp -rv $(LIB) $(GST_INSTALL_DIR)
clean:
rm -rf $(OBJS) $(LIB)