...
Code Block |
---|
BIN=sampleApp
NN_SDK_DIR=Path to NN SDK directory
TOOLCHAIN=Path to toolchain directory
NN_SDK_INC=$(NN_SDK_DIR)/include
NN_SDK_LIB=$(NN_SDK_DIR)/lib
CROSS_COMPILE=$(TOOLCHAIN)/aarch64-none-linux-gnu-
CC=$(CROSS_COMPILE)gcc
CXX=$(CROSS_COMPILE)g++
CFLAGS=-Wall -O3
INCLUDE += -I$(NN_SDK_INC) -I$(NN_SDK_INC)/HAL -I$(NN_SDK_INC)/ovxlib -I$(NN_SDK_INC)/jpeg
LIBS += -L$(NN_SDK_LIB) -L./ -L$(STD_LOG_INC)
LIBS += -lOpenVX -lOpenVXU -lOpenVX -lCLC -lVSC -lGAL -ljpeg -lovxlib -lm
LIBS += -lNNArchPerf -lArchModelSw
LIBS += -lstdc++ -ldl -lpthread -lgcc_s
CFLAGS += $(INCLUDE) -fPIC
SRCS=${wildcard *.c}
SRCS+=${wildcard *.cpp}
OBJS=$(addsuffix .o, $(basename $(SRCS)))
.SUFFIXES: .hpp .cpp .c
.cpp.o:
$(CXX) $(CFLAGS) -std=c++11 -c $<
.c.o:
$(CC) $(CFLAGS) -c $<
all: $(BIN)
$(BIN): $(OBJS)
$(CC) $(CFLAGS) $(LFLAGS) $(OBJS) -o $@ $(LIBS)
rm -rf *.o
clean:
rm -rf *.o
rm -rf $(BIN) $(LIB)
rm -rf *~
|
...