forked from solettaproject/soletta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (55 loc) · 1.83 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
top_srcdir = ./
MAKEFLAGS += -r --no-print-directory
# So we can get correct defaults on Kconfig
export PREFIX ?= "/usr"
export CFLAGS ?=
export LDFLAGS ?=
# kconfig settings
KCONFIG_CONFIG ?= $(top_srcdir).config
KCONFIG_INCLUDE := $(top_srcdir)include/
KCONFIG_AUTOHEADER := $(KCONFIG_INCLUDE)generated/sol_config.h
HAVE_KCONFIG_CONFIG := $(if $(wildcard $(KCONFIG_CONFIG)),y,)
export KCONFIG_AUTOHEADER
-include $(KCONFIG_CONFIG)
# dependency-resolver generated, deps resolution
ifneq ($(HAVE_KCONFIG_CONFIG),)
-include Makefile.gen
endif
# basic variable definitions
include $(top_srcdir)tools/build/Makefile.vars
include $(top_srcdir)tools/build/Makefile.common
# kconfig interface rules
ifeq (help, $(filter help,$(MAKECMDGOALS)))
help: soletta_help
include $(top_srcdir)tools/build/Makefile.kconfig-proxy
else
include $(top_srcdir)tools/build/Makefile.kconfig
endif
ifneq (,$(NOT_FOUND))
warning:
$(Q)echo "The following (required) dependencies were not met:\n"
$(Q)echo "$(NOT_FOUND)"
$(Q)echo "If you've just installed it, run: make reconf"
$(Q)echo "For more information/options, run: make help"
$(warning-targets)
else
ifeq ($(HAVE_KCONFIG_CONFIG),)
warning:
$(Q)echo "You need a config file first. Please run a config target, e.g.: make menuconfig"
$(Q)echo "For a quick default config run: make alldefconfig"
$(Q)echo "For more information/options run: make help"
$(warning-targets)
else
# soletta rules themselves
include $(top_srcdir)tools/build/Makefile.rules
include $(top_srcdir)tools/build/Makefile.targets
default_target: $(PRE_GEN) $(SOL_LIB_OUTPUT) $(bins-out) $(modules-out) gen-aliases
all: default_target
endif # HAVE_KCONFIG_CONFIG
endif # NOT_FOUND
$(KCONFIG_CONFIG): $(KCONFIG_GEN)
ifeq (,$(filter $(dep-avoid-targets),$(MAKECMDGOALS)))
-include ${all-objs:.o=.o.dep}
endif
.DEFAULT_GOAL = all
.PHONY = $(PHONY) default_target