Prepare for SDCC 4.5.0 release.
[sdcc.git] / sdcc / device / lib / clean.mk
blob7520223ac08c547774a13833b69434fda2d90c95
1 CLEANALLPORTS = ds390 ds400 sm83 hc08 s08 s08-stack-auto mos6502 mos6502-stack-auto mos65c02 huge large mcs51 medium pic14 pic16 small z80 z180 ez80_z80 z80n r2k r2ka r3ka tlcs90 r800 stm8 stm8-large pdk13 pdk14 pdk15 pdk15-stack-auto f8
2 include $(srcdir)/incl.mk
4 # Deleting all files created by building the program
5 # --------------------------------------------------
6 clean:
7 rm -f *core *[%~] *.[oa] *.rel *.lst *.sym *.asm *.ihx *.dump* *.cdb
8 rm -f .[a-z]*~
9 rm -f *.dump*
10 rm -rf build
11 for model in $(MODELS); do\
12 if [ -d $$model ]; then\
13 $(MAKE) -C $$model clean ;\
14 fi;\
15 rm -rf $${model}-xstack-auto $${model}-stack-auto ;\
16 done
17 for port in $(CLEANALLPORTS) ; do\
18 if [ -f $$port/Makefile ]; then\
19 $(MAKE) -C $$port clean ;\
20 fi;\
21 done
24 # Deleting all files created by configuring or building the program
25 # -----------------------------------------------------------------
26 distclean: clean
27 rm -f Makefile *.dep
28 for port in $(CLEANALLPORTS) ; do\
29 if [ -f $$port/Makefile ]; then\
30 $(MAKE) -C $$port distclean ;\
31 fi;\
32 done
34 # Like clean but some files may still exist
35 # -----------------------------------------
36 mostlyclean: clean
39 # Deleting everything that can reconstructed by this Makefile. It deletes
40 # everything deleted by distclean plus files created by bison, etc.
41 # -----------------------------------------------------------------------
42 realclean: distclean