source: PSPA/madxPSPA/make/clean.rules @ 442

Last change on this file since 442 was 430, checked in by touze, 11 years ago

import madx-5.01.00

File size: 1.7 KB
Line 
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
22clean:
23        $E "** Cleaning local files"
24        $_ $(RM) core
25        $_ $(RM) *~
26
27cleandir: clean
28        $E "** Cleaning files in depth"
29        $_ $(FIND) . -name '*~' -exec $(RM) {} \;
30
31cleantest:
32        $E "** Cleaning tests files"
33        $_ $(RM) $(wildcard tests/test-*/*.out tests/$(NDSUM))
34        $_ $(RM) $(wildcard $(patsubst %.ref,%,$(wildcard tests/test-*/*.ref)))
35
36cleanc:
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
41cleancxx:
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
46cleanf90:
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
52cleandep:
53        $E "** Removing DEP generated files"
54        $_ $(RM) $(OBJDIR)$/*.d
55
56cleanbuild:
57        $E "** Removing $(PRJNAME)"
58        $_ $(RM) $(if $(LD),$(PRJNAME_LD),) $(if $(AR),$(PRJNAME_AR),)
59
60cleanall: cleandir cleantest
61        $E "** Removing" $(DESTDIR)
62        $_ $(RMDIR) $(DESTDIR)
63 
64# end of makefile
Note: See TracBrowser for help on using the repository browser.