Makefile compile cpp source code


I wanna port tensorflow lite into Hifive-revB01, but the tensorflow lite was written by C++ , how can I update the makefile to surpport the c++ ?
Is there anyone that can give me a help ?

(Carsten Gosvig) #2

What environment are you using - Freedom Studio v2019.08?


I am not using the IDE , I just use the command lines to compile the code .
Could you kindly tell me how to update the Makefile to compile c++ source file ?

(Carsten Gosvig) #4

You can update the makefile with the following to make it pick up the .cpp C++ source files:
$(PROGRAM): $(wildcard *.c) $(wildcard *.h) $(wildcard *.S) $(wildcard *.cpp)

But do keep in mind CPP is not a supported feature for freedom-e-sdk/metal environment, so you might see other problems in the linking and runtime phase.