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