X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fclean.mk;h=82dc4d8dbd67be2e11f97001de60a68055e51f4b;hb=HEAD;hp=165682d366ba333fdfa6fe3685d5a324563cc920;hpb=1e268ec9106bf4b907eff98c705e11689c9dcb64;p=fw%2Fsdcc diff --git a/src/clean.mk b/src/clean.mk index 165682d3..82dc4d8d 100644 --- a/src/clean.mk +++ b/src/clean.mk @@ -1,11 +1,17 @@ +CLEANALLPORTS = avr ds390 ds400 hc08 mcs51 pic pic16 z80 xa51 + # Deleting all files created by building the program # -------------------------------------------------- clean: rm -f *core *[%~] *.[oa] *.output rm -f .[a-z]*~ \#* - rm -f $(PRJDIR)/bin/sdcc sdcc - for port in $(ALLPORTS) ; do\ - $(MAKE) -C $$port -f clean.mk clean ;\ + rm -f version.h + rm -f SDCCy.c SDCCy.h SDCClex.c + rm -f $(top_builddir)/bin/sdcc$(EXEEXT) sdcc$(EXEEXT) + for port in $(CLEANALLPORTS) ; do\ + if [ -f $$port/Makefile ]; then\ + $(MAKE) -C $$port clean ;\ + fi;\ done @@ -13,6 +19,11 @@ clean: # ----------------------------------------------------------------- distclean: clean rm -f Makefile *.dep + for port in $(CLEANALLPORTS) ; do\ + if [ -f $$port/Makefile ]; then\ + $(MAKE) -C $$port distclean ;\ + fi;\ + done # Like clean but some files may still exist