<commit_before># Makefile for ESRTK
#

.ifndef HAS_BUILD_SH
.error "Please run the build using build.sh"
.endif

#BUILD_ROOT := $(dir $(lastword $(MAKEFILE_LIST}}}
BUILD_ROOT := ${.CURDIR}
PLATFORM=	X86

FIND:=		find

TOOLCHAIN?=	gcc
#TOOLCHAIN=	clang

BUILD_HOST!=	uname

CROSS=		i686-elf-

AS=		${CC}
LD=		${CROSS}g++
SIZE=		${CROSS}size

QEMU=		qemu-system-i386

QEMU_ARGS=	-m 64M -M q35 -watchdog i6300esb -device rtl8139 -boot order=c -serial stdio -d cpu_reset -no-reboot

# XXX -flto
COPTS+=		-O2 -march=i686 -g \
		-Wall -Wextra \
		-nostdlib -nostdinc -fno-builtin \
		-fno-omit-frame-pointer \
		-fno-stack-protector

# XXX ACPICA
#COPTS+=		-Werror

LDFLAGS=	${COPTS}
AFLAGS+=	-g ${COPTS}<commit_msg>Fix assembler debug symbols<commit_after># Makefile for ESRTK
#

.ifndef HAS_BUILD_SH
.error "Please run the build using build.sh"
.endif

#BUILD_ROOT := $(dir $(lastword $(MAKEFILE_LIST}}}
BUILD_ROOT := ${.CURDIR}
PLATFORM=	X86

FIND:=		find

TOOLCHAIN?=	gcc
#TOOLCHAIN=	clang

BUILD_HOST!=	uname

CROSS=		i686-elf-

AS=		${CC}
LD=		${CROSS}g++
SIZE=		${CROSS}size

QEMU=		qemu-system-i386

QEMU_ARGS=	-m 64M -M q35 -watchdog i6300esb -device rtl8139 -boot order=c -serial stdio -d cpu_reset -no-reboot

# XXX -flto
COPTS+=		-O2 -march=i686 -g \
		-Wall -Wextra \
		-nostdlib -nostdinc -fno-builtin \
		-fno-omit-frame-pointer \
		-fno-stack-protector

# XXX ACPICA
#COPTS+=		-Werror

LDFLAGS=	${COPTS}
ASFLAGS+=	-g ${COPTS}
{'fraction_non_alphanumeric': 0.15191637630662022, 'fraction_numerical': 0.033449477351916376, 'mean_word_length': 3.573248407643312, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '385706', 'n_tokens_mistral': 730, 'n_tokens_neox': 663, 'n_words': 158}