2014-05-23 11:37:21 +00:00
|
|
|
LICENSE := BSD
|
|
|
|
VERSION := git
|
|
|
|
DOWNLOADS := pistachio.git
|
|
|
|
URL(pistachio) := https://github.com/l4ka/pistachio.git
|
|
|
|
REV(pistachio) := 76bac3d926dc707c6a3243b38c1505d2b5b6537b
|
|
|
|
DIR(pistachio) := src/kernel/pistachio
|
2017-09-05 10:39:17 +00:00
|
|
|
PATCHES := $(sort $(wildcard $(REP_DIR)/patches/*.patch))
|
2014-05-23 11:37:21 +00:00
|
|
|
PATCH_OPT := -p1 -d src/kernel/pistachio
|
|
|
|
|
|
|
|
$(call check_tool,git)
|
|
|
|
$(call check_tool,patch)
|
|
|
|
$(call check_tool,sed)
|
|
|
|
$(call check_tool,autoheader)
|
|
|
|
$(call check_tool,autoconf)
|
2019-12-04 10:40:38 +00:00
|
|
|
$(call check_tool,ed)
|
2014-05-23 11:37:21 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Determine python version to use for CML2
|
|
|
|
#
|
|
|
|
PYTHON2 := $(notdir $(lastword $(shell which python2 $(addprefix python2.,4 5 6 7 8))))
|
|
|
|
ifeq ($(PYTHON2),)
|
|
|
|
default: python_not_installed
|
|
|
|
python_not_installed:
|
|
|
|
$(error CML2 Configuration System needs Python 2 to be installed)
|
|
|
|
endif
|
|
|
|
|
|
|
|
default : additional_steps
|
|
|
|
additional_steps : $(DOWNLOADS)
|
|
|
|
@# use GCC front end for as linker for the pistachio user land
|
|
|
|
$(VERBOSE)sed -i "/LD=/s/^.*$$/LD=\$$(CC)/" src/kernel/pistachio/user/config.mk.in
|
|
|
|
@# add '-Wl,' prefix to '-melf_*' linker options
|
|
|
|
$(VERBOSE)sed -i "s/-melf_/-Wl,-melf_/" `grep -rl melf_ src/kernel/pistachio/user`
|
|
|
|
$(VERBOSE)for i in cmlcompile.py cmlconfigure.py configtrans.py; do \
|
|
|
|
sed -i "s/env python/env $(PYTHON2)/" src/kernel/pistachio/contrib/cml2/$$i; done
|
2017-09-05 10:39:17 +00:00
|
|
|
$(VERBOSE)cd src/kernel/pistachio/user; autoheader; autoconf; rm -rf autom4te.cache
|