brep -> gg

This commit is contained in:
Luxferre
2026-08-21 11:50:24 +03:00
parent 3136fe45fd
commit e89bfb86d3
4 changed files with 512 additions and 289 deletions
+7 -6
View File
@@ -1,20 +1,21 @@
# brep - minimal grep-like utility built on POSIX mmap() + SIMD + threads
# gg - Grokkin' Grep: a minimal, fast, portable grep-like file finder.
#
# Build: make
# Clean: make clean
# Install: make install PREFIX=/usr/local
CC ?= gcc
CFLAGS ?= -O2 -std=c11 -Wall -Wextra
CFLAGS ?= -O2 -s -std=c11 -Wall -Wextra
CPPFLAGS += -D_POSIX_C_SOURCE=200809L -D_DEFAULT_SOURCE
LDFLAGS ?=
LDLIBS += -lpthread
# Enable AVX2 for the SIMD matcher (needs a 2008+ Intel/AMD CPU).
# Drop -mavx2 if targeting older hardware; the matcher still compiles.
# The matcher uses POSIX memmem(), which glibc accelerates with SIMD on
# whatever CPU you run on. -mavx2 is harmless but unnecessary; drop it for
# maximum portability (e.g. make MARCH="").
MARCH ?= -mavx2
BINARY := brep
SRC := brep.c
BINARY := gg
SRC := gg.c
PREFIX ?= /usr/local
BINDIR := $(PREFIX)/bin