2 # Copyright 2015, Olivier MATZ <zer0@droids-corp.org>
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are met:
7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above copyright
10 # notice, this list of conditions and the following disclaimer in the
11 # documentation and/or other materials provided with the distribution.
12 # * Neither the name of the University of California, Berkeley nor the
13 # names of its contributors may be used to endorse or promote products
14 # derived from this software without specific prior written permission.
16 # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
17 # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 # DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
20 # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 # ---- variables that must be defined:
30 # ECOLI: path to ecoli root
32 # ---- variable that can be defined anywhere
34 # CROSS: prefix of the toolchain
35 # CP, LN, GAWK, GREP: coreutils tools
36 # CC, CPP, AR, LD, OBJCOPY, OBJDUMP, STRIP: compilers/binutils
38 # ---- variable that can be defined by Makefile:
49 # CPPFLAGS, CFLAGS, LDFLAGS, LDLIBS: global flags
50 # cflags-$(path), cppflags-$(path), ldflags-$(path), ldlibs-$(path): per
52 # mkflags-$(path): flags for subdirectories
54 # ---- variables that can be defined on the command line:
56 # EXTRA_CPPFLAGS, EXTRA_CFLAGS, EXTRA_LDFLAGS, EXTRA_LDLIBS: global
58 # extra-cflags-$(path), extra-cppflags-$(path): per object extra flags
61 $(error ECOLI environment variable is not defined)
64 # list of targets asked by user
66 # list of files generated
69 # usual internal variables:
70 # out-$(file) = output path of a generated file
71 # pre-$(file) = list of files needed to generate $(file)
72 # all-type = list of targets for this type
74 include $(ECOLI)/mk/ecoli-obj-vars.mk
75 include $(ECOLI)/mk/ecoli-exe-vars.mk
76 include $(ECOLI)/mk/ecoli-ar-vars.mk
77 include $(ECOLI)/mk/ecoli-shlib-vars.mk
78 include $(ECOLI)/mk/ecoli-copy-vars.mk
79 include $(ECOLI)/mk/ecoli-slink-vars.mk
80 include $(ECOLI)/mk/ecoli-objcopy-vars.mk
81 include $(ECOLI)/mk/ecoli-subdir-vars.mk
82 # must stay at the end
83 include $(ECOLI)/mk/ecoli-clean-vars.mk
85 # dump the list of targets
87 $(call disp_list,------ all-targets,$(all-targets))
90 # first rule (default)
92 _ecoli_all: $(all-targets)
94 # the includes below require second expansion
97 include $(ECOLI)/mk/ecoli-obj-rules.mk
98 include $(ECOLI)/mk/ecoli-exe-rules.mk
99 include $(ECOLI)/mk/ecoli-ar-rules.mk
100 include $(ECOLI)/mk/ecoli-shlib-rules.mk
101 include $(ECOLI)/mk/ecoli-copy-rules.mk
102 include $(ECOLI)/mk/ecoli-slink-rules.mk
103 include $(ECOLI)/mk/ecoli-objcopy-rules.mk
104 include $(ECOLI)/mk/ecoli-subdir-rules.mk
105 include $(ECOLI)/mk/ecoli-clean-rules.mk