1 | # | |
---|
2 | # o---------------------------------------------------------------------o |
---|
3 | # | |
---|
4 | # | MAD makefile - cleaning rules |
---|
5 | # | |
---|
6 | # o---------------------------------------------------------------------o |
---|
7 | # | |
---|
8 | # | Methodical Accelerator Design |
---|
9 | # | |
---|
10 | # | Copyright (c) 2011+ CERN, mad@cern.ch |
---|
11 | # | |
---|
12 | # | For more information, see http://cern.ch/mad |
---|
13 | # | |
---|
14 | # o---------------------------------------------------------------------o |
---|
15 | # | |
---|
16 | # | $Id$ |
---|
17 | # | |
---|
18 | |
---|
19 | .PHONY: clean cleandir cleantest |
---|
20 | .PHONY: cleanc cleancxx cleanf90 cleandep cleanbuild cleanall |
---|
21 | |
---|
22 | clean: |
---|
23 | $E "** Cleaning local files" |
---|
24 | $_ $(RM) core |
---|
25 | $_ $(RM) *~ |
---|
26 | |
---|
27 | cleandir: clean |
---|
28 | $E "** Cleaning files in depth" |
---|
29 | $_ $(FIND) . -name '*~' -exec $(RM) {} \; |
---|
30 | |
---|
31 | cleantest: |
---|
32 | $E "** Cleaning tests files" |
---|
33 | $_ $(RM) $(wildcard tests/test-*/*.out tests/$(NDSUM)) |
---|
34 | $_ $(RM) $(wildcard $(patsubst %.ref,%,$(wildcard tests/test-*/*.ref))) |
---|
35 | |
---|
36 | cleanc: |
---|
37 | $E "** Cleaning C generated files" |
---|
38 | $_ $(RM) $(addprefix $(OBJDIR)$/,$(patsubst %.c,%.o,$(CC_SRC))) |
---|
39 | $_ $(RM) $(addprefix $(OBJDIR)$/,$(patsubst %.c,%.d,$(CC_SRC))) |
---|
40 | |
---|
41 | cleancxx: |
---|
42 | $E "** Cleaning C++ generated files" |
---|
43 | $_ $(RM) $(addprefix $(OBJDIR)$/,$(patsubst %.cpp,%.o,$(CXX_SRC))) |
---|
44 | $_ $(RM) $(addprefix $(OBJDIR)$/,$(patsubst %.cpp,%.d,$(CXX_SRC))) |
---|
45 | |
---|
46 | cleanf90: |
---|
47 | $E "** Cleaning F90 generated files" |
---|
48 | $_ $(RM) $(addprefix $(OBJDIR)$/,$(patsubst %.F90,%.o,$(patsubst %.f90,%.o,$(FC_SRC)))) |
---|
49 | $_ $(RM) $(addprefix $(OBJDIR)$/,$(patsubst %.F90,%.d,$(patsubst %.f90,%.d,$(FC_SRC)))) |
---|
50 | $_ $(RM) $(OBJDIR)$/*.mod |
---|
51 | |
---|
52 | cleandep: |
---|
53 | $E "** Removing DEP generated files" |
---|
54 | $_ $(RM) $(OBJDIR)$/*.d |
---|
55 | |
---|
56 | cleanbuild: |
---|
57 | $E "** Removing $(PRJNAME)" |
---|
58 | $_ $(RM) $(if $(LD),$(PRJNAME_LD),) $(if $(AR),$(PRJNAME_AR),) |
---|
59 | |
---|
60 | cleanall: cleandir cleantest |
---|
61 | $E "** Removing" $(DESTDIR) |
---|
62 | $_ $(RMDIR) $(DESTDIR) |
---|
63 | |
---|
64 | # end of makefile |
---|