diff options
| author | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2026-06-26 23:14:44 +0200 |
|---|---|---|
| committer | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2026-06-26 23:14:44 +0200 |
| commit | eb1fcdf5d1058f4fbdf3a2661573dd7e4d3976f3 (patch) | |
| tree | cdb7caf92fd29cb3d2ab3d28f2cd5c9604c0d1c4 /Makefile.linux | |
| parent | 16cf84d794bfe9fdb245d38760256286384d8380 (diff) | |
| download | terex-eb1fcdf5d1058f4fbdf3a2661573dd7e4d3976f3.tar.gz | |
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.
Diffstat (limited to 'Makefile.linux')
| -rw-r--r-- | Makefile.linux | 17 |
1 files changed, 17 insertions, 0 deletions
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) |
