aboutsummaryrefslogtreecommitdiff
path: root/tools/apultra/Makefile
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2021-01-09 09:01:05 +0000
committerJuan J. Martinez <jjm@usebox.net>2021-01-09 09:01:05 +0000
commit9bcf1e97960c0da7322a868efdbc07e2650716fe (patch)
treede6d32ad5b0e567991bd3eb262902c15a77074d9 /tools/apultra/Makefile
parent3b31adf01305e522f7e28c1435fb47418ce43267 (diff)
downloadubox-msx-lib-9bcf1e97960c0da7322a868efdbc07e2650716fe.tar.gz
ubox-msx-lib-9bcf1e97960c0da7322a868efdbc07e2650716fe.zip
Extra libs: ap.lib
aPLib support with apultra.
Diffstat (limited to 'tools/apultra/Makefile')
-rw-r--r--tools/apultra/Makefile31
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/apultra/Makefile b/tools/apultra/Makefile
new file mode 100644
index 0000000..308c9aa
--- /dev/null
+++ b/tools/apultra/Makefile
@@ -0,0 +1,31 @@
+#CC=clang
+CC=gcc
+CFLAGS=-O3 -g -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)
+ $(CC) $^ $(LDFLAGS) -o $(APP)
+ cp $(APP) ../../bin
+ @rm -rf $(APP) $(OBJDIR)
+
+clean:
+ @rm -rf $(APP) $(OBJDIR)
+