Commit b7c29114 authored by Adam Wujek's avatar Adam Wujek 💬

sw:rt: add BUILDDIR to OBJDIR_BUILD

so fw-ac.c is recompiled if its dependencies are changed
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 1a27ab3c
......@@ -28,7 +28,6 @@ BUILDDIR := build
# auto dependency generation from
# http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/
DEPDIR := .d
$(shell mkdir -p $(BUILDDIR)/$(DEPDIR) >/dev/null)
DEPFLAGS = -MT $@ -MMD -MP -MF $(@D)/$(*F).Td
POSTCOMPILE = mv -f $(@D)/$(*F).Td $(@D)/$(DEPDIR)/$(*F).d && touch $@
......@@ -87,6 +86,7 @@ OBJS += $(OBJS-y)
OBJS_BUILD = $(addprefix $(BUILDDIR)/, $(OBJS))
OBJDIR_BUILD = $(addprefix $(BUILDDIR)/, $(OBJDIR))
OBJDIR_BUILD += $(BUILDDIR)
MOCKTURTLE_LDSCRIPT ?= $(TRTL)/software/rt/urv/mockturtle.ld
......@@ -98,7 +98,7 @@ WBGEN_FILES = mt_cpu_csr.wb mt_cpu_lr.wb
WBGEN_HEADERS = mockturtle_cpu_csr.h mockturtle_cpu_lr.h
# .wb files should simply be there. This is used to check against the changes
$(addprefix $(TRTL_HDL)/cpu/,$(WBGEN_FILES)):
$(addprefix $(TRTL_HDL)/cpu/,$(WBGEN_FILES)): ;
# dependencies between .h and .wb files
$(TRTL_SW)/include/hw/mockturtle_cpu_csr.h: $(TRTL_HDL)/cpu/mt_cpu_csr.wb
......@@ -156,9 +156,9 @@ include $(wildcard $(patsubst %,%/.d/*.d,$(basename $(OBJDIR_BUILD))))
# following targets from Makefile.kconfig
# this one is used to generate autoconf.h file
$(AUTOCONF) silentoldconfig: .config
$(AUTOCONF) silentoldconfig: .config | $(BUILDDIR)
export KCONFIG_CONFIG=$(CURDIR)/.config; \
$(MAKE) quiet=quiet_ KBUILD_KCONFIG=$(CURDIR)/Kconfig projtree=$(CURDIR)/build -C $(TRTL)/software/rt -f Makefile.kconfig silentoldconfig
$(MAKE) quiet=quiet_ KBUILD_KCONFIG=$(CURDIR)/Kconfig projtree=$(CURDIR)/$(BUILDDIR) -C $(TRTL)/software/rt -f Makefile.kconfig silentoldconfig
scripts_basic config:
$(MAKE) quiet=quiet_ KBUILD_KCONFIG=$(CURDIR)/Kconfig projtree=$(CURDIR) -C $(TRTL)/software/rt -f Makefile.kconfig $@
......@@ -169,6 +169,8 @@ scripts_basic config:
defconfig:
$(MAKE) quiet=quiet_ KBUILD_KCONFIG=$(CURDIR)/Kconfig projtree=$(CURDIR) -C $(TRTL)/software/rt -f Makefile.kconfig mt_defconfig
.config: ;
# Explicit rule for .config
# needed since -include XXX triggers build for XXX
.config: ;
$(CURDIR)/.config: ;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment