59d80d18681b57fb82d2df402e59b9994c50f229
[fw/sdcc] / src / clean.mk
1 CLEANALLPORTS = avr ds390 izt mcs51 pic pic16 z80 xa51
2 PRJDIR = ..
3
4 # Deleting all files created by building the program
5 # --------------------------------------------------
6 clean:
7         rm -f *core *[%~] *.[oa] *.output
8         rm -f .[a-z]*~ \#*
9         rm -f version.h
10         rm -f $(PRJDIR)/bin/sdcc$(EXEEXT) sdcc$(EXEEXT)
11         for port in $(CLEANALLPORTS) ; do\
12           $(MAKE) -C $$port -f ../port-clean.mk clean ;\
13         done
14
15
16 # Deleting all files created by configuring or building the program
17 # -----------------------------------------------------------------
18 distclean: clean
19         rm -f Makefile *.dep
20
21
22 # Like clean but some files may still exist
23 # -----------------------------------------
24 mostlyclean: clean
25         rm -f SDCCy.c
26         rm -f SDCCy.h
27         rm -f SDCClex.c
28
29
30 # Deleting everything that can reconstructed by this Makefile. It deletes
31 # everything deleted by distclean plus files created by bison, etc.
32 # -----------------------------------------------------------------------
33 realclean: distclean
34         rm -f SDCCy.c
35         rm -f SDCCy.h
36         rm -f SDCClex.c