summaryrefslogtreecommitdiff
path: root/zap/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'zap/Makefile')
-rw-r--r--zap/Makefile64
1 files changed, 64 insertions, 0 deletions
diff --git a/zap/Makefile b/zap/Makefile
new file mode 100644
index 0000000..b7db3dc
--- /dev/null
+++ b/zap/Makefile
@@ -0,0 +1,64 @@
+# TOOLS
+
+#CC = clang
+#CC = gcc
+
+# TOOL FLAGS
+
+CFLAGS = \
+ -Iinclude \
+ -Iinclude-priv \
+ -O3 \
+ -fPIC \
+ -g \
+ -march=native \
+ -std=c99 \
+ -Wall \
+ -Wextra \
+ -Wpedantic
+
+# ARTIFACTS
+
+OBJS = \
+ src/abs.o \
+ src/fastimpl.o \
+ src/fma.o \
+ src/fndbyte.o \
+ src/fndchr.o \
+ src/foreach.o \
+ src/memcmp.o \
+ src/memcpy.o \
+ src/memdup.o \
+ src/memeq.o \
+ src/memfill.o \
+ src/strcmp.o \
+ src/strdup.o \
+ src/streq.o \
+ src/strfill.o \
+ src/strcpy.o \
+ src/strlen.o
+
+LIB = libzap.a
+
+# OPTIONS
+
+# Uncomment to disable assembly algorithms:
+#CFLAGS += -Dzap_priv_noasm
+
+# Uncomment to enable freestanding mode (requries no runtime):
+#CFLAGS += \
+ -Dzap_priv_nostdlib \
+ -ffreestanding
+
+# TARGETS
+
+.PHONY: clean purge
+
+$(LIB): $(OBJS)
+ ar r $@ $(OBJS)
+
+clean:
+ rm -fr $(OBJS)
+
+purge: clean
+ rm -fr $(LIB)