cxx_pi := gccarm cxx_sim := g++sim file_cpp := $(wildcard *.cpp) file_o_pi := maze.x file_o_sim := maze.x $(file_o_pi) : $(file_cpp) @$(cxx_pi) $^ -O $@ $(file_o_sim) : $(file_cpp) @$(cxx_sim) $^ -O $@ mazepi : $(file_o_pi) mazesim : $(file_o_sim) clean : @rm -rf $(file_o_pi) debug : @echo $(cxx_pi) @echo $(cxx_sim) @echo $(file_cpp) @echo $(file_o_pi) @echo $(file_o_sim) .PHONY : mazepi mazesim clean debug