1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright 2015, Olivier MATZ <zer0@droids-corp.org>
4 # ---- variables that must be defined:
6 # ECOLI: path to ecoli root
8 # ---- variable that can be defined anywhere
10 # CROSS: prefix of the toolchain
11 # CP, LN, GAWK, GREP: coreutils tools
12 # CC, CPP, AR, LD, OBJCOPY, OBJDUMP, STRIP: compilers/binutils
14 # ---- variable that can be defined by Makefile:
25 # CPPFLAGS, CFLAGS, LDFLAGS, LDLIBS: global flags
26 # cflags-$(path), cppflags-$(path), ldflags-$(path), ldlibs-$(path): per
28 # mkflags-$(path): flags for subdirectories
30 # ---- variables that can be defined on the command line:
32 # EXTRA_CPPFLAGS, EXTRA_CFLAGS, EXTRA_LDFLAGS, EXTRA_LDLIBS: global
34 # extra-cflags-$(path), extra-cppflags-$(path): per object extra flags
37 $(error ECOLI environment variable is not defined)
40 # list of targets asked by user
42 # list of files generated
45 # usual internal variables:
46 # out-$(file) = output path of a generated file
47 # pre-$(file) = list of files needed to generate $(file)
48 # all-type = list of targets for this type
50 include $(ECOLI)/mk/ecoli-obj-vars.mk
51 include $(ECOLI)/mk/ecoli-exe-vars.mk
52 include $(ECOLI)/mk/ecoli-ar-vars.mk
53 include $(ECOLI)/mk/ecoli-shlib-vars.mk
54 include $(ECOLI)/mk/ecoli-copy-vars.mk
55 include $(ECOLI)/mk/ecoli-slink-vars.mk
56 include $(ECOLI)/mk/ecoli-objcopy-vars.mk
57 include $(ECOLI)/mk/ecoli-subdir-vars.mk
58 # must stay at the end
59 include $(ECOLI)/mk/ecoli-clean-vars.mk
61 # dump the list of targets
63 $(call disp_list,------ all-targets,$(all-targets))
66 # first rule (default)
68 _ecoli_all: $(all-targets)
70 # the includes below require second expansion
73 include $(ECOLI)/mk/ecoli-obj-rules.mk
74 include $(ECOLI)/mk/ecoli-exe-rules.mk
75 include $(ECOLI)/mk/ecoli-ar-rules.mk
76 include $(ECOLI)/mk/ecoli-shlib-rules.mk
77 include $(ECOLI)/mk/ecoli-copy-rules.mk
78 include $(ECOLI)/mk/ecoli-slink-rules.mk
79 include $(ECOLI)/mk/ecoli-objcopy-rules.mk
80 include $(ECOLI)/mk/ecoli-subdir-rules.mk
81 include $(ECOLI)/mk/ecoli-clean-rules.mk