ffmpeg support on linux, and check compiled vs. runtime versions of ffmpeg

This commit is contained in:
2026-04-28 15:03:03 +02:00
parent 569ba05514
commit d81a4b7417
9 changed files with 289 additions and 35 deletions
+9 -10
View File
@@ -1,28 +1,27 @@
SUBDIR := $(shell racket -e "(display (format \"~a-~a\" (system-type 'os*) (system-type 'arch)))")
all:
mkdir -p build
cmake -S ao-play-async -B build
(cd build; make)
cmake -S ffmpeg-audio -B build-ffmpeg
(cd build-ffmpeg; make)
install: all
SUBDIR=`racket -e "(display (format \"~a-~a\" (system-type 'os*) (system-type 'arch)))"`; \
mkdir -p lib/$$SUBDIR
SUBDIR=`racket -e "(display (format \"~a-~a\" (system-type 'os*) (system-type 'arch)))"`; \
FILES=`ls build/*.so` 2>/dev/null; if [ "$$FILES" != "" ]; then cp $$FILES lib/$$SUBDIR; fi
SUBDIR=`racket -e "(display (format \"~a-~a\" (system-type 'os*) (system-type 'arch)))"`; \
FILES=`ls build/*.dll` 2>/dev/null; if [ "$$FILES" != "" ]; then cp $$FILES lib/$$SUBDIR; fi
mkdir -p lib/$(SUBDIR)
FILES=`ls build/*.so build-ffmpeg/*.so` 2>/dev/null; if [ "$$FILES" != "" ]; then cp $$FILES lib/$(SUBDIR); fi
FILES=`ls build/*.dll build-ffmpeg/*.dll` 2>/dev/null; if [ "$$FILES" != "" ]; then cp $$FILES lib/$(SUBDIR); fi
test: install
cp lib/linux-x86_64/*.so ~/.local/share/racket/racket-sound-lib/linux-x86_64
zip: install
SUBDIR=`racket -e "(display (format \"~a-~a\" (system-type 'os*) (system-type 'arch)))"`; \
(cd lib; zip -y -r -9 $$SUBDIR.zip $$SUBDIR)
SUBDIR=`racket -e "(display (format \"~a-~a\" (system-type 'os*) (system-type 'arch)))"`; \
(cd lib; rm -rf $$SUBDIR)
(cd lib; zip -y -r -9 $(SUBDIR).zip $(SUBDIR))
(cd lib; rm -rf $(SUBDIR))
clean:
rm -rf build
rm -rf build-ffmpeg