aboutsummaryrefslogtreecommitdiff
path: root/tools/apultra_src/Makefile
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-11-05 11:22:55 +0000
committerJuan J. Martinez <jjm@usebox.net>2023-11-05 11:31:28 +0000
commit2fbdf974338bde8576efdae40a819a76b2391033 (patch)
tree64d41a37470143f142344f9a439d96de3e7918c2 /tools/apultra_src/Makefile
downloadkitsunes-curse-2fbdf974338bde8576efdae40a819a76b2391033.tar.gz
kitsunes-curse-2fbdf974338bde8576efdae40a819a76b2391033.zip
Initial import of the open source release
Diffstat (limited to 'tools/apultra_src/Makefile')
-rw-r--r--tools/apultra_src/Makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/apultra_src/Makefile b/tools/apultra_src/Makefile
new file mode 100644
index 0000000..0ed5dea
--- /dev/null
+++ b/tools/apultra_src/Makefile
@@ -0,0 +1,29 @@
+CC=gcc
+CFLAGS=-O3 -s -fomit-frame-pointer -Isrc/libdivsufsort/include -Isrc
+OBJDIR=obj
+LDFLAGS=
+
+$(OBJDIR)/%.o: src/../%.c
+ @mkdir -p '$(@D)'
+ $(CC) $(CFLAGS) -c $< -o $@
+
+APP := apultra
+
+OBJS += $(OBJDIR)/src/apultra.o
+OBJS += $(OBJDIR)/src/expand.o
+OBJS += $(OBJDIR)/src/matchfinder.o
+OBJS += $(OBJDIR)/src/shrink.o
+OBJS += $(OBJDIR)/src/libdivsufsort/lib/divsufsort.o
+OBJS += $(OBJDIR)/src/libdivsufsort/lib/divsufsort_utils.o
+OBJS += $(OBJDIR)/src/libdivsufsort/lib/sssort.o
+OBJS += $(OBJDIR)/src/libdivsufsort/lib/trsort.o
+
+all: $(APP)
+
+$(APP): $(OBJS)
+ @mkdir -p ../../bin/posix
+ $(CC) $^ $(LDFLAGS) -o $(APP)
+
+clean:
+ @rm -rf $(APP) $(OBJDIR)
+