Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Commit

Permalink
Merge pull request #44 from hannesm/fix-deps
Browse files Browse the repository at this point in the history
freestanding: describe dependencies appropriately, don't copy header files
  • Loading branch information
hannesm authored Nov 3, 2020
2 parents 21416c9 + a12e0fb commit 243751c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(lang dune 2.7)
(lang dune 2.6)
(name hacl_x25519)
(generate_opam_files true)
(source (github mirage/hacl))
Expand Down
2 changes: 1 addition & 1 deletion freestanding/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ libhacl_x25519_freestanding_stubs.a:
else
CC ?= cc
FREESTANDING_CFLAGS := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --cflags ocaml-freestanding)
CFLAGS := -O3 -I../src/kremlin/include -I../src/kremlin/kremlib/dist/minimal -DKRML_HOST_TIME $(FREESTANDING_CFLAGS)
CFLAGS := -O3 -I../src/kremlin/include -I../src/kremlin/kremlib/dist/minimal -I../src -DKRML_HOST_TIME $(FREESTANDING_CFLAGS)

OBJS=hacl_x25519_stubs.o Hacl_Hash.o Hacl_Curve25519_51.o Hacl_Ed25519.o

Expand Down
11 changes: 3 additions & 8 deletions freestanding/dune
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
(copy_files#
(alias install)
(files ../src/*.c))

(copy_files#
(alias install)
(files ../src/*.h))
(copy_files# ../src/*.c)

(rule
(deps Makefile)
(deps Makefile hacl_x25519_stubs.c Hacl_Hash.c Hacl_Curve25519_51.c
Hacl_Ed25519.c)
(targets libhacl_x25519_freestanding_stubs.a)
(action
(no-infer
Expand Down
5 changes: 2 additions & 3 deletions hacl_x25519.opam
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ homepage: "https://github.com/mirage/hacl"
doc: "https://mirage.github.io/hacl/doc"
bug-reports: "https://github.com/mirage/hacl/issues"
depends: [
"dune" {>= "2.7"}
"dune" {>= "2.6"}
"benchmark" {with-test}
"cstruct" {>= "3.5.0"}
"eqaf"
Expand All @@ -30,15 +30,14 @@ depends: [
"ppx_deriving_yojson" {with-test}
"stdlib-shims" {with-test}
"yojson" {with-test & >= "1.6.0"}
"odoc" {with-doc}
]
depopts: ["ocaml-freestanding"]
conflicts: [
"mirage-xen" {< "6.0.0"}
"ocaml-freestanding" {< "0.6.0"}
]
build: [
["dune" "subst"] {dev}
["dune" "subst"] {pinned}
[
"dune"
"build"
Expand Down

0 comments on commit 243751c

Please sign in to comment.