update makefile

This commit is contained in:
Anthony Samms
2025-11-21 16:54:28 -05:00
parent f62f6e5859
commit adb3f8759e
2 changed files with 5 additions and 18 deletions

View File

@@ -53,7 +53,7 @@ source $HOME/.local/bin/env
git clone https://github.com/Yonokid/PyTaiko
cd PyTaiko
brew install libsndfile
brew install libsamplerate
brew install speexdsp
cd libs/audio
make
mv libaudio.dylib ../../
@@ -118,7 +118,7 @@ Then run with Python as described in the Building from Source section.
### C Libraries
```bash
sudo apt install libsamplerate libsndfile
sudo apt install speexdsp libsndfile
```
Some distributions may also require [patchelf](https://github.com/NixOS/patchelf) and this symbolic link:

View File

@@ -71,15 +71,11 @@ ifneq (,$(findstring MINGW,$(UNAME_S)))
CORE_LIBS += -lsndfile
endif
# Resampling libraries - prefer speexdsp, fallback to libsamplerate
ifneq (,$(wildcard /mingw64/lib/libspeexdsp.a))
CORE_LIBS += /mingw64/lib/libspeexdsp.a
CFLAGS += -DHAVE_SPEEXDSP
else ifneq (,$(wildcard /mingw64/lib/libsamplerate.a))
CORE_LIBS += /mingw64/lib/libsamplerate.a
CFLAGS += -DHAVE_SAMPLERATE
else
CORE_LIBS += -lspeexdsp -lsamplerate
CORE_LIBS += -lspeexdsp
endif
# Windows system libraries (these provide the missing symbols)
@@ -109,9 +105,7 @@ else ifeq ($(UNAME_S),Darwin)
endif
CORE_LIBS += -lsndfile
# Resampling libraries - prefer speexdsp, fallback to libsamplerate
CORE_LIBS += -lspeexdsp -lsamplerate
CORE_LIBS += -lspeexdsp
# macOS frameworks
LIBS = $(CORE_LIBS) -framework CoreAudio -framework AudioToolbox -framework AudioUnit
@@ -135,15 +129,9 @@ else ifeq ($(UNAME_S),Linux)
CORE_LIBS += -lsndfile
# Check for speexdsp (preferred) or libsamplerate
ifeq ($(call check_lib,speexdsp),yes)
CORE_LIBS += -lspeexdsp
CFLAGS += -DHAVE_SPEEXDSP
else ifeq ($(call check_lib,samplerate),yes)
CORE_LIBS += -lsamplerate
CFLAGS += -DHAVE_SAMPLERATE
else
$(warning Neither speexdsp nor libsamplerate found - building without sample rate conversion)
endif
# Audio backend libraries (optional)
@@ -261,7 +249,7 @@ ifneq (,$(findstring MINGW,$(UNAME_S)))
@echo "Checking for Windows-specific libportaudio:"
@ls -la ./libportaudio-win.a 2>/dev/null && echo "✓ Found local libportaudio-win.a" || echo "✗ No local libportaudio-win.a"
@echo "Available system static libraries:"
@ls /mingw64/lib/lib{portaudio,sndfile,speexdsp,samplerate,FLAC,vorbis*,ogg}.a 2>/dev/null || echo "None found"
@ls /mingw64/lib/lib{portaudio,sndfile,speexdsp,FLAC,vorbis*,ogg}.a 2>/dev/null || echo "None found"
@echo "Static pthread library:"
@ls /mingw64/lib/libwinpthread.a 2>/dev/null && echo "✓ Found libwinpthread.a" || echo "✗ Missing libwinpthread.a"
@echo "Libraries to link: $(LIBS)"
@@ -274,7 +262,6 @@ ifdef PKG_CONFIG
@echo -n "PortAudio: "; pkg-config --exists portaudio-2.0 && echo "✓" || echo "✗"
@echo -n "libsndfile: "; pkg-config --exists sndfile && echo "✓" || echo "✗"
@echo -n "speexdsp: "; pkg-config --exists speexdsp && echo "✓" || echo "✗"
@echo -n "libsamplerate: "; pkg-config --exists samplerate && echo "✓" || echo "✗"
@echo -n "ALSA: "; pkg-config --exists alsa && echo "✓" || echo "✗"
@echo -n "PulseAudio: "; pkg-config --exists libpulse && echo "✓" || echo "✗"
@echo -n "JACK: "; pkg-config --exists jack && echo "✓" || echo "✗"