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 libteurex.so
all:
	make libterex.so
	rm -f $(OBJS)
	make "CFLAGS=$(CFLAGS) -DREGEX_UTF8" libteurex.so
$(BINS): $(OBJS)
	$(CC) $(LDFLAGS) -o $@ $(OBJS)
clean:
	rm -f $(OBJS) $(BINS)
