-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a Makefile to build libmirage-xen_bindings.a
The C code in bindings/ *must* be built using exact C flags and linked only statically. Until there is a way to do this in an OCaml + dune + Mirage environment, we need to use Makefile here.
- Loading branch information
Showing
76 changed files
with
30 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
(lang dune 2.0) | ||
(lang dune 2.6) | ||
(name mirage-xen) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
PKG_CONFIG_PATH := $(shell opam config var prefix)/lib/pkgconfig | ||
|
||
CC ?= cc | ||
FREESTANDING_CFLAGS := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --cflags ocaml-freestanding) | ||
CFLAGS := $(FREESTANDING_CFLAGS) \ | ||
-O2 -std=c99 -Wall -Werror \ | ||
-Iinclude -D__XEN_INTERFACE_VERSION__=__XEN_LATEST_INTERFACE_VERSION__ | ||
|
||
.PHONY: all clean | ||
all: libmirage-xen_bindings.a | ||
|
||
OBJS=alloc_pages_stubs.o atomic_stubs.o barrier_stubs.o bmap.o checksum_stubs.o clock_stubs.o cstruct_stubs.o evtchn.o gnttab.o main.o mm_stubs.o | ||
|
||
libmirage-xen_bindings.a: $(OBJS) | ||
$(AR) r $@ $^ | ||
|
||
clean: | ||
$(RM) $(OBJS) libmirage-xen_bindings.a |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters