summaryrefslogtreecommitdiff
path: root/zap/GNUmakefile
diff options
context:
space:
mode:
Diffstat (limited to 'zap/GNUmakefile')
-rw-r--r--zap/GNUmakefile71
1 files changed, 71 insertions, 0 deletions
diff --git a/zap/GNUmakefile b/zap/GNUmakefile
new file mode 100644
index 0000000..58a85ce
--- /dev/null
+++ b/zap/GNUmakefile
@@ -0,0 +1,71 @@
+# Copyright 2022 Gabriel Jensen.
+# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+# If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
+
+# TOOLS
+
+#CC = clang
+#CC = gcc
+
+# TOOL FLAGS
+
+ASFLAGS += \
+ -g \
+ -march=native
+
+CFLAGS += \
+ -Ofast \
+ -fPIC \
+ -ffreestanding \
+ -g \
+ -march=native \
+ -std=c90 \
+ -Wall \
+ -Wextra \
+ -Wpedantic
+
+CPPFLAGS += \
+ -Iinclude \
+ -Iinclude-private
+
+# ARTEFACTS
+
+OBJS = \
+ src/mem/fndbyte.o \
+ src/mem/fndchr.o \
+ src/mem/foreach.o \
+ src/mem/memcat.o \
+ src/mem/memcmp.o \
+ src/mem/memcp.o \
+ src/mem/memeq.o \
+ src/mem/memfill.o \
+ src/mem/memgen.o \
+ src/mem/strcat.o \
+ src/mem/strcmp.o \
+ src/mem/streq.o \
+ src/mem/strfill.o \
+ src/mem/strcp.o \
+ src/mem/strlen.o \
+ src/mem/utf8dec.o \
+ src/mem/utf8declen.o \
+ src/mem/utf8enc.o \
+ src/mem/utf8enclen.o \
+ src/mem/win1252dec.o \
+ src/mem/win1252enc.o
+
+LIB = libzap.a
+
+# OPTIONS
+
+# TARGETS
+
+.PHONY: clean purge
+
+$(LIB): $(OBJS)
+ $(AR) r $@ $^
+
+clean:
+ $(RM) $(OBJS)
+
+purge: clean
+ $(RM) $(LIB)