From eb1fcdf5d1058f4fbdf3a2661573dd7e4d3976f3 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 26 Jun 2026 23:14:44 +0200 Subject: allow raw (ASCII) matching via REG_RAW flag, so we no longer need a compile-time flag You no longer need to build two libraries just for supporting raw/ASCII and UTF-8 patterns. This makes using the library a lot easier and reduces the total binary size. Since strings are always `unsigned char *` now internally and the raw vs. UTF-8 decision is important only in a few select places, it would make no sense to use meta-programming techniques. The test suite has been extended and is now fixed for cases with embedded non-printable characters. --- Makefile.linux | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Makefile.linux (limited to 'Makefile.linux') diff --git a/Makefile.linux b/Makefile.linux new file mode 100644 index 0000000..e1dac8f --- /dev/null +++ b/Makefile.linux @@ -0,0 +1,17 @@ +CC = gcc +# Either this one +CFLAGS = -Wall -DREGEX_STANDALONE -fPIC -DREG_DEBUG -g +# Or this one +#CFLAGS = -Wall -DREGEX_STANDALONE -fPIC -D_NDEBUG -O3 +LDFLAGS = -shared +SRCS = regcomp.c regexec.c regerror.c regfree.c +OBJS = $(SRCS:.c=.o) +BINS = libterex.so + +all: libterex.so + +$(BINS): $(OBJS) + $(CC) $(LDFLAGS) -o $@ $(OBJS) + +clean: + rm -f $(OBJS) $(BINS) -- cgit v1.2.3