aboutsummaryrefslogtreecommitdiff
path: root/thumbnail/Makefile
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-07-23 00:31:17 +0200
committerXavier Del Campo Romero <xavi92@disroot.org>2025-09-24 11:03:39 +0200
commitb9537b1d1164b9f3fbe704512b1e324c2e37beb5 (patch)
treea2538bd8698b208431fa85a3f65cd8bafbf0bbeb /thumbnail/Makefile
parent7407ddf0162cc32fee03a309186588047a65f42a (diff)
downloadslcl-b9537b1d1164b9f3fbe704512b1e324c2e37beb5.tar.gz
Add thumbnail generation tool
This new application runs separately from slcl and communicates with it via a named pipe. When files are added/removed to/from the user directory, slcl shall write to the named pipe. Then, this new tool shall process incoming entries and generate or remove thumbnails accordingly. Such thumbnails are stored into a new directory inside the database directory, namely thumbnails/, which replicates the same structure as user/.
Diffstat (limited to 'thumbnail/Makefile')
-rw-r--r--thumbnail/Makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/thumbnail/Makefile b/thumbnail/Makefile
new file mode 100644
index 0000000..d921e85
--- /dev/null
+++ b/thumbnail/Makefile
@@ -0,0 +1,29 @@
+.POSIX:
+
+PROJECT = thumbnail
+O = -Og
+CDEFS = -D_FILE_OFFSET_BITS=64 # Required for large file support on 32-bit.
+CFLAGS = $(O) $(CDEFS) -g -Wall -I../libweb/dynstr/include -I. \
+ $$(pkg-config --cflags ImageMagick) -MD -MF $(@:.o=.d)
+LDFLAGS = $(LIBS)
+DEPS = $(OBJECTS:.o=.d)
+DYNSTR = ../libweb/dynstr/libdynstr.a
+DYNSTR_LIBS = -L../libweb/dynstr -ldynstr
+LIBS = $$(pkg-config --libs ImageMagick) $(DYNSTR_LIBS)
+OBJECTS = \
+ crealpath.o \
+ main.o \
+ cftw.o
+
+all: $(PROJECT)
+
+clean:
+ rm -f $(OBJECTS) $(DEPS)
+
+$(PROJECT): $(OBJECTS) $(DYNSTR)
+ $(CC) $(OBJECTS) $(LDFLAGS) $(LIBS) -o $@
+
+$(DYNSTR):
+ +cd ../dynstr && $(MAKE)
+
+-include $(DEPS)