aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 6a4bdb9ee87ba911821970cb6f61890a5b7bef9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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 = libhsrex.so libhsurex.so
all:
	make libhsrex.so
	rm -f $(OBJS)
	make "CFLAGS=$(CFLAGS) -DREGEX_UTF8" libhsurex.so
$(BINS): $(OBJS)
	$(CC) $(LDFLAGS) -o $@ $(OBJS)
clean:
	rm -f $(OBJS) $(BINS)