aboutsummaryrefslogtreecommitdiff
path: root/Makefile.linux
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.linux')
-rw-r--r--Makefile.linux17
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)