lh-l4v/spec/Makefile

68 lines
1.7 KiB
Makefile
Raw Normal View History

2014-07-14 19:32:44 +00:00
#
# Copyright 2014, General Dynamics C4 Systems
#
# This software may be distributed and modified according to the terms of
# the GNU General Public License version 2. Note that NO WARRANTY is provided.
# See "LICENSE_GPLv2.txt" for details.
#
# @TAG(GD_GPL)
#
SHELL=bash
# default to primary verification platform
L4V_ARCH?=ARM
2014-07-14 19:32:44 +00:00
## Targets
images: ASpec CKernel
default: images test
all: images test
report-regression:
2017-05-10 04:08:18 +00:00
@echo ASpec ExecSpec DSpec TakeGrant CKernel CSpec \
2014-07-14 19:32:44 +00:00
binary-verification-input
#
# Setup heaps.
#
# Spec heaps.
HEAPS += ASpec ExecSpec DSpec CKernel CSpec TakeGrant ASepSpec
2014-07-14 19:32:44 +00:00
# Additional dependencies
CKernel CSpec: c-kernel
# NOTE: The abstract spec imports Events from Haskell hence the dependency
ExecSpec ASpec : design-spec
# NOTE: the install_C_file in Kernel_C.thy invocation generates a spurious
# umm_types.txt file in this folder. This file is never used nor
# depended on.
2014-07-14 19:32:44 +00:00
# Preprocess the kernel's source code and bitfield theory files.
c-kernel: .FORCE
cd cspec/$(L4V_ARCH)/c && L4V_REPO_PATH=$(L4V_REPO_PATH) $(MAKE) cspec
2014-07-14 19:32:44 +00:00
.PHONY: c-kernel
# Run the haskell translator
design-spec: .FORCE
cd design/ && L4V_REPO_PATH=$(L4V_REPO_PATH) $(MAKE) design
.PHONY: design-spec
2014-07-14 19:32:44 +00:00
# Produce the input data for the binary verification problem at -O1
binary-verification-input: c-kernel
$(ISABELLE_TOOL) build -d .. -v SimplExport
echo 'Built CFunDump.txt, md5sums of relevance are:'
md5sum cspec/CFunDump.txt cspec/c/kernel_all.c_pp
# Clean
clean:
rm -rf abstract/generated
cd cspec/$(L4V_ARCH)/c && $(MAKE) clean SKIP_PATH_CHECKS=1
rm -f cspec/$(L4V_ARCH)/umm_types.txt
2014-07-14 19:32:44 +00:00
rm -f umm_types.txt
.PHONY: clean
2014-07-14 19:32:44 +00:00
include ../misc/isa-common.mk