Situation
Attempting to cleanup after a Makefile compilation.
Errors
These are the error(s) that I'm routinely receiving while attempting to conduct, one would believe to be, a simple cleanup operation.
Errors:
Command:
make linux
g++ Main.o CHARACTER.o ATTRIBUTES.o -o bin/release/Player.sh find *.o -type f -delete
g++: error: find: No such file or directory
g++: error: f: No such file or directory
g++: error: unrecognized command line option ‘-type’; did you mean ‘-pipe’?
Command:
make linux
g++ Main.o CHARACTER.o ATTRIBUTES.o -o bin/release/Player.sh rm -f *.o
g++: error: rm: No such file or directory
g++: error: unrecognized command line option ‘-f’
Command:
make linux
g++ Main.o CHARACTER.o ATTRIBUTES.o -o bin/release/Player.sh clean
g++: error: clean: No such file or directory
Makefile:2: recipe for target 'linux' failed
Makefile
linux: Main.o CHARACTER.o ATTRIBUTES.o
g++ Main.o CHARACTER.o ATTRIBUTES.o -o bin/release/Player.sh clean
(alternate command attempt)
g++ Main.o CHARACTER.o ATTRIBUTES.o -o bin/release/Player.sh -rm -f *.o
(alternate command attempt)
g++ Main.o CHARACTER.o ATTRIBUTES.o -o bin/release/Player.sh find *.o -type f -delete
win32: Main.o CHARACTER.o ATTRIBUTES.o
g++ Main.o CHARACTER.o ATTRIBUTES.o -o bin/release/Player.exe cleanWin
main.o: Main.cpp
g++ -c Main.cpp
CHARACTER.o: src/CHARACTER.cpp include/CHARACTER.h
g++ -c src/CHARACTER.cpp
ATTRIBUTES.o: src/ATTRIBUTES.cpp include/ATTRIBUTES.h
g++ -c src/ATTRIBUTES.cpp
clean:
rm -f *.o
cleanWin:
del *.o
Summary
Everything except the cleanup routine works apparently fine, however, once cleanup is attempted, I errors for functions that are definitely accessible throughout my OS, whether Win32 or Linux. Can't quite understand why these simple commands are routinely having issues.
Similar Posts
Albeit, my issue is similar to the following post(s), their solution(s) apparently have no effect.
- How to avoid “No such file or directory” Error for
make clean
Makefile target Makefile No such file or directory
- Cheers and thanks in advance for any feedback.