2015-08-29 02:23:30 +08:00
|
|
|
# vim: filetype=make
|
|
|
|
|
2016-09-03 04:04:29 +08:00
|
|
|
ifeq (${CONFIG_NUM_COMMAND_PACKETS},)
|
|
|
|
CONFIG_NUM_COMMAND_PACKETS=0
|
|
|
|
endif
|
|
|
|
ifeq (${CONFIG_NUM_TIMER_PACKETS},)
|
|
|
|
CONFIG_NUM_TIMER_PACKETS=0
|
|
|
|
endif
|
|
|
|
ifeq (${CONFIG_NUM_TASK_PRIORITIES},)
|
|
|
|
CONFIG_NUM_TASK_PRIORITIES=$(CONFIG_NUM_PREEMPT_PRIORITIES)
|
|
|
|
endif
|
|
|
|
|
2016-06-10 06:27:12 +08:00
|
|
|
ifeq ($(ARCH),x86)
|
|
|
|
TASKGROUP_SSE=" TASKGROUP SSE"
|
|
|
|
endif
|
|
|
|
|
2015-08-29 02:23:30 +08:00
|
|
|
define filechk_configs.c
|
|
|
|
(echo "/* file is auto-generated, do not modify ! */"; \
|
|
|
|
echo; \
|
|
|
|
echo "#include <toolchain.h>"; \
|
|
|
|
echo; \
|
|
|
|
echo "GEN_ABS_SYM_BEGIN (_ConfigAbsSyms)"; \
|
|
|
|
echo; \
|
|
|
|
cat $(CURDIR)/include/generated/autoconf.h | sed \
|
|
|
|
's/".*"/1/' | awk \
|
|
|
|
'/#define/{printf "GEN_ABSOLUTE_SYM(%s, %s);\n", $$2, $$3}'; \
|
|
|
|
echo; \
|
|
|
|
echo "GEN_ABS_SYM_END";)
|
|
|
|
endef
|
|
|
|
|
|
|
|
misc/generated/configs.c: include/config/auto.conf FORCE
|
|
|
|
$(call filechk,configs.c)
|
|
|
|
|
|
|
|
targets := misc/generated/configs.c
|
|
|
|
targets += include/generated/offsets.h
|
|
|
|
|
|
|
|
|
|
|
|
always := misc/generated/configs.c
|
|
|
|
always += include/generated/offsets.h
|
|
|
|
|
|
|
|
define rule_cc_o_c_1
|
|
|
|
$(call echo-cmd,cc_o_c_1) $(cmd_cc_o_c_1);
|
|
|
|
endef
|
|
|
|
|
2017-01-27 05:59:01 +08:00
|
|
|
cmd_cc_o_c_1 = $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(ZEPHYRINCLUDE) -c -o $@ $<
|
2015-08-29 02:23:30 +08:00
|
|
|
|
2017-01-30 13:53:17 +08:00
|
|
|
arch/$(ARCH)/core/offsets/offsets.o: arch/$(ARCH)/core/offsets/offsets.c $(KCONFIG_CONFIG) \
|
|
|
|
include/generated/generated_dts_board.h
|
2015-08-29 02:23:30 +08:00
|
|
|
$(Q)mkdir -p $(dir $@)
|
2015-08-29 03:04:39 +08:00
|
|
|
$(call if_changed,cc_o_c_1)
|
|
|
|
|
|
|
|
|
|
|
|
define offsetchk
|
|
|
|
$(Q)set -e; \
|
|
|
|
$(kecho) ' CHK $@'; \
|
|
|
|
mkdir -p $(dir $@); \
|
|
|
|
$(GENOFFSET_H) -i $(1) -o $@.tmp; \
|
|
|
|
if [ -r $@ ] && cmp -s $@ $@.tmp; then \
|
|
|
|
rm -f $@.tmp; \
|
|
|
|
else \
|
|
|
|
$(kecho) ' UPD $@'; \
|
|
|
|
mv -f $@.tmp $@; \
|
|
|
|
fi
|
|
|
|
endef
|
2015-08-29 02:23:30 +08:00
|
|
|
|
2015-12-16 06:34:41 +08:00
|
|
|
include/generated/offsets.h: arch/$(ARCH)/core/offsets/offsets.o \
|
2017-01-30 13:53:17 +08:00
|
|
|
include/config/auto.conf FORCE
|
2015-11-03 09:42:35 +08:00
|
|
|
$(call offsetchk,arch/$(ARCH)/core/offsets/offsets.o)
|
2015-08-23 02:40:43 +08:00
|
|
|
|
2017-01-30 13:53:17 +08:00
|
|
|
|