Skip to content
Snippets Groups Projects
Commit 0564954a authored by Allan Blanchard's avatar Allan Blanchard
Browse files

[e-acsl] build e-acsl malloc lib

parent 44a0d9ad
No related branches found
No related tags found
No related merge requests found
##########################################################################
# #
# This file is part of the Frama-C's E-ACSL plug-in. #
# #
# Copyright (C) 2012-2021 #
# CEA (Commissariat à l'énergie atomique et aux énergies #
# alternatives) #
# #
# you can redistribute it and/or modify it under the terms of the GNU #
# Lesser General Public License as published by the Free Software #
# Foundation, version 2.1. #
# #
# It is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU Lesser General Public License for more details. #
# #
# See the GNU Lesser General Public License version 2.1 #
# for more details (enclosed in the file licenses/LGPLv2.1). #
# #
##########################################################################
EACSL_DLMALLOC_LIB = libeacsl-dlmalloc.a
EACSL_DLMALLOC_SRC = dlmalloc.c
EACSL_DLMALLOC_OBJ = dlmalloc.o
# Don't forget to update "e-acsl-gcc.sh" if the flags are updated
EACSL_DLMALLOC_FLAGS = \
-DHAVE_MORECORE=0 \
-DHAVE_MMAP=1 \
-DNO_MALLINFO=1 \
-DNO_MALLOC_STATS=1 \
-DMSPACES=1 \
-DONLY_MSPACES \
-DMALLOC_ALIGNMENT=32 \
-DMSPACE_PREFIX="__e_acsl_" \
-DUSE_LOCKS=1 \
-DUSE_SPIN_LOCKS=1
$(EACSL_DLMALLOC_LIB): $(EACSL_DLMALLOC_SRC)
@echo 'CC $<'
@$(CC) $< -c -O2 -g3 -o$(EACSL_DLMALLOC_OBJ) $(EACSL_DLMALLOC_FLAGS)
@echo 'AR $@'
@$(AR) crus $@ $(EACSL_DLMALLOC_OBJ)
@echo 'RANLIB $@'
@ranlib $@
( library
(name E_ACSL)
(public_name frama-c-e-acsl.core)
(flags -open Frama_c_kernel :standard -w -9)
(libraries frama-c.kernel)
)
(library
(name E_ACSL)
(public_name frama-c-e-acsl.core)
(flags -open Frama_c_kernel :standard -w -9)
(libraries frama-c.kernel))
(plugin (optional) (name e-acsl) (libraries frama-c-e-acsl.core) (site (frama-c plugins)))
......@@ -13,16 +12,48 @@
(copy_files# src/libraries/*.ml*)
(copy_files# src/project_initializer/*.ml*)
; BUILD LIBDLMALLOC
(data_only_dirs contrib)
(rule
(deps (source_tree contrib))
(targets libeacsl-dlmalloc.a)
(action
(no-infer
(progn
(chdir contrib/libdlmalloc (run make))
(copy contrib/libdlmalloc/libeacsl-dlmalloc.a libeacsl-dlmalloc.a)))))
; CONTRIB FILE
(install
(package frama-c-e-acsl)
(section
(site
(frama-c-e-acsl contrib)))
(files
(contrib/libdlmalloc/dlmalloc.c as libdlmalloc/dlmalloc.c)))
; LIB DLMALLOC
(install
(package frama-c-e-acsl)
(section lib)
(files
(libeacsl-dlmalloc.a as libeacsl-dlmalloc.a)))
; SCRIPT
(install
(package frama-c-e-acsl)
(section bin)
(files
(scripts/e-acsl-gcc.sh as e-acsl-gcc.sh)))
(scripts/e-acsl-gcc.sh as e-acsl-gcc.sh)))
; SHARE
(install
(package frama-c-e-acsl)
(section (site (frama-c share)))
(files
; main header
(share/e-acsl/e_acsl.h as e-acsl/e_acsl.h)
; (numerical_model)
(share/e-acsl/numerical_model/e_acsl_floating_point.h as e-acsl/numerical_model/e_acsl_floating_point.h)
......
(lang dune 2.8)
(name frama-c-e-acsl)
(using dune_site 0.1)
(package (name frama-c-e-acsl) (sites (share contrib)))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment