--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,9 @@
CC = gcc -g -ggdb $(PROF)
CPP = g++ -g -ggdb $(PROF)
CFLAGS = -Wall -O2 -Iinclude -ansi
+ RM = rm -f
+ FIND = find
+
ifeq ("$(PROFILING)", "linux")
PROF = -fprofile-arcs -ftest-coverage -pg
endif
@@ -301,16 +304,20 @@
.PHONY: beauty clean uninstall
clean:
- find -name '*~' -exec rm -f {} \;
- find -name '*.[oa]' -exec rm -f {} \;
- find -name '*.gcov' -exec rm -f {} \;
- find -name '*.gcda' -exec rm -f {} \;
- find -name '*.gcno' -exec rm -f {} \;
- find -name 'gmon.out' -exec rm -f {} \;
- rm -f $(TARGET)
+ifdef FIND
+ $(FIND) -name '*~' -exec $(RM) {} \;
+ $(FIND) -name '*.[oa]' -exec $(RM) {} \;
+ $(FIND) -name '*.gcov' -exec $(RM) {} \;
+ $(FIND) -name '*.gcda' -exec $(RM) {} \;
+ $(FIND) -name '*.gcno' -exec $(RM) {} \;
+ $(FIND) -name 'gmon.out' -exec $(RM) {} \;
+endif
+ $(RM) $(TARGET)
beauty:
- find -name '*.[ch]' -exec indent {} \;
- find -name '*.[ch]' -exec eraser {} \;
- find -name 'Makefile*' -exec eraser {} \;
+ifdef FIND
+ $(FIND) -name '*.[ch]' -exec indent {} \;
+ $(FIND) -name '*.[ch]' -exec eraser {} \;
+ $(FIND) -name 'Makefile*' -exec eraser {} \;
+endif
@make clean