roxma / easymake

A handy makefile for simple C/C++ applications
139 stars 66 forks source link

'make clean' doesn't remove files #6

Open AlbyTree opened 4 years ago

AlbyTree commented 4 years ago

I copied the easymake.mk into my working directory and created a Makefile containing

CXXFLAGS=-O2

include ./easymake.mk

After executing make and successfully building I tried make clean but it just printed

if [ -d bin ]; then find bin '(' -name "*.o" -o -name "*.d" -o -name "*.a" -o -name "*.so" -o -name "em_*" ')' -exec rm -f '{}' ';' ; fi

I modified the em_clean rule in the easymake.mk like this

em_clean:
    @if [ -d $(BUILD_ROOT) ]; then find $(BUILD_ROOT) '(' -name "*.o" -o -name "*.d" -o -name "*.a" -o -name "*.so" -o -    name "em_*" ')' -exec rm -f '{}' ';' ; fi

and the clean command worked.