I would like to clean my dir by passing the binary to delete. In my directory are those files:
foo.c foo.o foo
I would like to remove foo.o and foo. Now in my makefile, I have this:
clean:
rm *.o
rm [...] #the [...] should be the argument
So I would like to run make clean foo, and the foo here would be the argument passed to the clean target. I have read somewhere that the proper way should be to simply make vairable $(BINARIES) inside the makefile, and use that variable in rm command, but then I would have to edit the variable every time I would like to compile another binary. So instead, I want to pass that binary as argument to the clean target. How to do that? (And Also, I do not want to issue the make like make ARGS=foo clean, this is too long, I want exactly 3 words. 1) make, 2) target, 3)) argument.