LICENSE   := GPLv2
VERSION   := git
DOWNLOADS := seoul.git

URL(seoul) := https://github.com/alex-ab/seoul.git
REV(seoul) := genode_26_04
DIR(seoul) := src

PATCHES := $(addprefix patches/,noxhci.patch mouse_shape.patch)

PATCH_OPT := -p1

#
# We need to execute some python scripts for preparing the i82576vf
# device model.
#
PYTHON3 := $(notdir $(lastword $(shell which python3)))
ifeq ($(PYTHON3),)
default : missing_tool
missing_tool:
	$(ECHO) "Error: Seoul needs Python 3 to be installed"
	@false;
endif

I82576VF_DIR = src/model/intel82576vf
EXECUTOR_DIR = src/executor

# XXX overwrite as used by goa install.mk
_dirs: additional_steps

additional_steps : $(DOWNLOADS)
	echo "call code generators ... takes a while ..." && \
	rm -f $(EXECUTOR_DIR)/build_instructions.cache && \
	cd $(EXECUTOR_DIR) && \
	          CROSS_DEV_PREFIX=$(CROSS_DEV_PREFIX) \
	          ./build_instructions.py > instructions.inc && \
	cd $(CURDIR)/$(I82576VF_DIR) && \
	          ./genreg.py reg_pci.py ../../include/model/intel82576vfpci.inc && \
	cd $(CURDIR)/$(I82576VF_DIR) && \
	          ./genreg.py reg_mmio.py ../../include/model/intel82576vfmmio.inc
