Reputation: 147
I have made a Makefile. To use it, I open my Terminal, go to the containing folder and run it with:
make flash
My question is, how can I do this in C/C++? That is, how can I invoke make inside my program (programmably)?
Upvotes: 1
Views: 163
Reputation: 2619
You can use the system
function, like this:
#include <stdlib.h>
system("make flash");
Upvotes: 0
Reputation: 36059
The system
function is your friend:
system("make -C /Users/MyNAME/Desktop/Folder flash");
Upvotes: 5