aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi92@disroot.org>2025-10-08 22:54:47 +0200
committerXavier Del Campo Romero <xavi92@disroot.org>2025-10-08 22:57:00 +0200
commit8d8179d3b412cdd2c1af60539b9aec89631f3fe6 (patch)
tree21cfc4b49d68226ee1c00e826aedf99152dc18c5 /configure
parent10e42591ac72285736d5cc4ee5e7c2f68dbf1e4b (diff)
Allow building thumbnail from the top-level build
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure21
1 files changed, 21 insertions, 0 deletions
diff --git a/configure b/configure
index cc9e0dc..1efa5cf 100755
--- a/configure
+++ b/configure
@@ -14,12 +14,15 @@ CFLAGS=${CFLAGS:-"$default_CFLAGS $default_NPCFLAGS"}
LDFLAGS=${LDFLAGS:-$default_LDFLAGS}
USERGEN_LDFLAGS=${LDFLAGS}
+build_thumbnail=0
+
help()
{
cat <<-EOF
$0 [OPTION ...]
--prefix Set installation directory [$default_prefix]
+--thumbnail Build thumbnail generator
Some influential environment variables:
CC C compiler [$default_CC]
@@ -43,6 +46,7 @@ while true; do
case "$key" in
--prefix ) prefix="$value"; shift; test $split_arg -eq 0 && shift ;;
+ --thumbnail ) build_thumbnail=1; shift ;;
-h | --help ) help; exit 0 ;;
* ) test "$1" != "" && help && exit 1 || break ;;
esac
@@ -180,6 +184,16 @@ $(FDZIPSTREAM): FORCE $(DYNSTR)
EOF
fi
+if [ $build_thumbnail -ne 0 ]
+then
+cat <<"EOF" >> $F
+THUMBNAIL = thumbnail/thumbnail
+thumbnail $(PROJECT): $(THUMBNAIL)
+$(THUMBNAIL): FORCE
+ +cd thumbnail && $(MAKE) CC=$(CC)
+EOF
+fi
+
cat <<"EOF" >> $F
clean:
rm -f $(OBJECTS) $(DEPS)
@@ -228,6 +242,13 @@ cat <<"EOF" >> $F
EOF
fi
+if [ $build_thumbnail -ne 0 ]
+then
+cat <<"EOF" >> $F
+ +cd thumbnail && $(MAKE) distclean
+EOF
+fi
+
cat <<"EOF" >> $F
-include $(DEPS)
EOF