1 | # | |
---|
2 | # o---------------------------------------------------------------------o |
---|
3 | # | |
---|
4 | # | MAD makefile - includes |
---|
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 | # debug |
---|
20 | ifeq ($(DEBUG_MAKE),yes) |
---|
21 | $(warning MAKEFLAGS = $(MAKEFLAGS)) |
---|
22 | $(warning MAKEOVERRIDES = $(MAKEOVERRIDES)) |
---|
23 | endif |
---|
24 | |
---|
25 | # make utilities (no rules!) |
---|
26 | include $(makedir)/make.lib |
---|
27 | |
---|
28 | # make config (no rules!) |
---|
29 | include $(makedir)/make.cfg |
---|
30 | |
---|
31 | # user's preprocessing extra stuff |
---|
32 | -include $(FILE_PRE) |
---|
33 | |
---|
34 | # actions |
---|
35 | include $(makedir)/make.act |
---|
36 | |
---|
37 | # system |
---|
38 | $(call exists, $(makedir)/system.$(OSTYPE), \ |
---|
39 | unable to include settings for system OSTYPE=$(OSTYPE) (make [options] infoinc); \ |
---|
40 | operating system not supported) |
---|
41 | include $(makedir)/system.$(OSTYPE) |
---|
42 | |
---|
43 | # C compiler |
---|
44 | ifneq ($(CCNAME),) |
---|
45 | $(call exists, $(makedir)/compiler.$(CCNAME), \ |
---|
46 | unable to include settings for compiler CC=$(CCNAME) (make [options] infoinc); \ |
---|
47 | check CC or CCNAME for correct compiler configuration file) |
---|
48 | include $(makedir)/compiler.$(CCNAME) |
---|
49 | endif |
---|
50 | |
---|
51 | # C++ compiler |
---|
52 | ifneq ($(CXXNAME),) |
---|
53 | $(call exists, $(makedir)/compiler.$(CXXNAME), \ |
---|
54 | unable to include settings for compiler CXX=$(CXXNAME) (make [options] infoinc); \ |
---|
55 | check CXX or CXXNAME for correct compiler configuration file) |
---|
56 | include $(makedir)/compiler.$(CXXNAME) |
---|
57 | endif |
---|
58 | |
---|
59 | # Fortran compiler |
---|
60 | ifneq ($(FCNAME),) |
---|
61 | $(call exists, $(makedir)/compiler.$(FCNAME), \ |
---|
62 | unable to include settings for compiler FC=$(FCNAME) (make [options] infoinc); \ |
---|
63 | check FC or FCNAME for correct compiler configuration file) |
---|
64 | include $(makedir)/compiler.$(FCNAME) |
---|
65 | endif |
---|
66 | |
---|
67 | # linker |
---|
68 | ifneq ($(LDNAME),) |
---|
69 | $(call exists, $(makedir)/linker.$(LDNAME), \ |
---|
70 | unable to include settings for linker LD=$(LDNAME) (make [options] infoinc); \ |
---|
71 | check LD or LDNAME for correct linker configuration file) |
---|
72 | include $(makedir)/linker.$(LDNAME) |
---|
73 | endif |
---|
74 | |
---|
75 | # archiver |
---|
76 | ifneq ($(ARNAME),) |
---|
77 | $(call exists, $(makedir)/linker.$(ARNAME), \ |
---|
78 | unable to include settings for archiver AR=$(ARNAME) (make [options] infoinc); \ |
---|
79 | check AR or ARNAME for correct linker configuration file) |
---|
80 | include $(makedir)/linker.$(ARNAME) |
---|
81 | endif |
---|
82 | |
---|
83 | # tester |
---|
84 | ifneq ($(NDNAME),) |
---|
85 | $(call exists, $(makedir)/tester.$(NDNAME), \ |
---|
86 | unable to include settings for tester ND=$(NDNAME) (make [options] infoinc); \ |
---|
87 | check ND or NDNAME for correct tester configuration file) |
---|
88 | include $(makedir)/tester.$(NDNAME) |
---|
89 | endif |
---|
90 | |
---|
91 | # project files |
---|
92 | -include $(FILE_VER) |
---|
93 | -include $(FILE_CPP) |
---|
94 | -include $(FILE_C) |
---|
95 | -include $(FILE_CXX) |
---|
96 | -include $(FILE_F90) |
---|
97 | -include $(FILE_LIB) |
---|
98 | -include $(FILE_SYS) |
---|
99 | -include $(FILE_TEST) |
---|
100 | |
---|
101 | # compilers, linker, depend and test rules |
---|
102 | include $(makedir)/compiler.rules |
---|
103 | include $(makedir)/linker.rules |
---|
104 | include $(makedir)/tester.rules |
---|
105 | include $(makedir)/depend.rules |
---|
106 | |
---|
107 | # cleaning & debugging |
---|
108 | include $(makedir)/clean.rules |
---|
109 | include $(makedir)/info.rules |
---|
110 | |
---|
111 | # user's postprocessing extra stuff |
---|
112 | -include $(FILE_POST) |
---|
113 | |
---|
114 | # end of makefile |
---|