Main /
EditingTheMakefileTemplateBack to Mbed This makefile task will change all the actor .c files into .cpp files: fixcpp_: -@for file in _$(MODELNAME)/*.c; do j=`echo $$file | cut -d . -f 1`;j=$$j".cpp";mv $$file $$j; done mv _$(MODELNAME)/$(MODELNAME).cpp _$(MODELNAME)/$(MODELNAME).c Simply have this run before you compile the code, or as the first argument of an "all" definition. |