<commit_before># Copyright (c) 2015, IBM
# Author(s): <NAME> <<EMAIL>>
#
# Permission to use, copy, modify, and/or distribute this software for
# any purpose with or without fee is hereby granted, provided that the
# above copyright notice and this permission notice appear in all
# copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
# WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
# AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
# DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
# OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.

export TOP=$(abspath .)
$(TOP)/Makeconf:
	./configure.sh
include Makefile.common

.PHONY: all
all: ukvm virtio
.DEFAULT_GOAL := all

.PHONY: virtio
virtio:
ifeq ($(BUILD_VIRTIO), yes)
	$(MAKE) -C kernel virtio
	$(MAKE) -C tests virtio
endif

.PHONY: ukvm
ukvm:
ifeq ($(BUILD_UKVM), yes)
	$(MAKE) -C kernel ukvm
	$(MAKE) -C tests ukvm
endif

.PHONY: clean
clean:
	$(MAKE) -C kernel clean
	$(MAKE) -C tests clean
	$(RM) solo5-kernel-virtio.pc
	$(RM) solo5-kernel-ukvm.pc
	$(RM) -r include-host/
	$(RM) Makeconf

PREFIX?=/nonexistent # Fail if not run from OPAM
OPAM_BINDIR=$(PREFIX)/bin
OPAM_UKVM_LIBDIR=$(PREFIX)/lib/solo5-kernel-ukvm
OPAM_UKVM_INCDIR=$(PREFIX)/include/solo5-kernel-ukvm/include
OPAM_VIRTIO_LIBDIR=$(PREFIX)/lib/solo5-kernel-virtio
OPAM_VIRTIO_INCDIR=$(PREFIX)/include/solo5-kernel-virtio/include

# We want the MD CFLAGS and LDFLAGS in the .pc file, where they can be
# picked up by the Mirage tool / other downstream consumers.
%.pc: %.pc.in
	sed <$< > $@ \
	    -e 's#!CFLAGS!#$(MD_CFLAGS)#g;' \
	    -e 's#!LD!#$(LD)#g;'
	    -e 's#!LDFLAGS!#$(LDFLAGS)#g;'

.PHONY: opam-virtio-install
opam-virtio-install: solo5-kernel-virtio.pc virtio
	mkdir -p $(OPAM_VIRTIO_INCDIR) $(OPAM_VIRTIO_LIBDIR)
	cp kernel/solo5.h $(OPAM_VIRTIO_INCDIR)/solo5.h
	mkdir -p $(OPAM_VIRTIO_INCDIR)/host
	cp -R include-host/ $(OPAM_VIRTIO_INCDIR)/host
	cp iso/boot/grub/menu.lst $(OPAM_VIRTIO_LIBDIR)
	cp iso/boot/grub/stage2_eltorito $(OPAM_VIRTIO_LIBDIR)
	cp kernel/virtio/solo5.o kernel/virtio/solo5.lds $(OPAM_VIRTIO_LIBDIR)
	mkdir -p $(OPAM_BINDIR)
	mkdir -p $(PREFIX)/lib/pkgconfig
	cp solo5-kernel-virtio.pc $(PREFIX)/lib/pkgconfig
	cp solo5-build-iso.bash $(OPAM_BINDIR)
<commit_msg>Makefile: Fix typo<commit_after># Copyright (c) 2015, IBM
# Author(s): <NAME> <<EMAIL>>
#
# Permission to use, copy, modify, and/or distribute this software for
# any purpose with or without fee is hereby granted, provided that the
# above copyright notice and this permission notice appear in all
# copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
# WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
# AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
# DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
# OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.

export TOP=$(abspath .)
$(TOP)/Makeconf:
	./configure.sh
include Makefile.common

.PHONY: all
all: ukvm virtio
.DEFAULT_GOAL := all

.PHONY: virtio
virtio:
ifeq ($(BUILD_VIRTIO), yes)
	$(MAKE) -C kernel virtio
	$(MAKE) -C tests virtio
endif

.PHONY: ukvm
ukvm:
ifeq ($(BUILD_UKVM), yes)
	$(MAKE) -C kernel ukvm
	$(MAKE) -C tests ukvm
endif

.PHONY: clean
clean:
	$(MAKE) -C kernel clean
	$(MAKE) -C tests clean
	$(RM) solo5-kernel-virtio.pc
	$(RM) solo5-kernel-ukvm.pc
	$(RM) -r include-host/
	$(RM) Makeconf

PREFIX?=/nonexistent # Fail if not run from OPAM
OPAM_BINDIR=$(PREFIX)/bin
OPAM_UKVM_LIBDIR=$(PREFIX)/lib/solo5-kernel-ukvm
OPAM_UKVM_INCDIR=$(PREFIX)/include/solo5-kernel-ukvm/include
OPAM_VIRTIO_LIBDIR=$(PREFIX)/lib/solo5-kernel-virtio
OPAM_VIRTIO_INCDIR=$(PREFIX)/include/solo5-kernel-virtio/include

# We want the MD CFLAGS and LDFLAGS in the .pc file, where they can be
# picked up by the Mirage tool / other downstream consumers.
%.pc: %.pc.in
	sed <$< > $@ \
	    -e 's#!CFLAGS!#$(MD_CFLAGS)#g;' \
	    -e 's#!LD!#$(LD)#g;' \
	    -e 's#!LDFLAGS!#$(LDFLAGS)#g;'

.PHONY: opam-virtio-install
opam-virtio-install: solo5-kernel-virtio.pc virtio
	mkdir -p $(OPAM_VIRTIO_INCDIR) $(OPAM_VIRTIO_LIBDIR)
	cp kernel/solo5.h $(OPAM_VIRTIO_INCDIR)/solo5.h
	mkdir -p $(OPAM_VIRTIO_INCDIR)/host
	cp -R include-host/ $(OPAM_VIRTIO_INCDIR)/host
	cp iso/boot/grub/menu.lst $(OPAM_VIRTIO_LIBDIR)
	cp iso/boot/grub/stage2_eltorito $(OPAM_VIRTIO_LIBDIR)
	cp kernel/virtio/solo5.o kernel/virtio/solo5.lds $(OPAM_VIRTIO_LIBDIR)
	mkdir -p $(OPAM_BINDIR)
	mkdir -p $(PREFIX)/lib/pkgconfig
	cp solo5-kernel-virtio.pc $(PREFIX)/lib/pkgconfig
	cp solo5-build-iso.bash $(OPAM_BINDIR)

{'fraction_non_alphanumeric': 0.12723978256492852, 'fraction_numerical': 0.007247835715723777, 'mean_word_length': 4.550837988826816, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6103002', 'n_tokens_mistral': 1987, 'n_tokens_neox': 1876, 'n_words': 538}