mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 11:40:13 +01:00
update makefile
This commit is contained in:
@@ -53,7 +53,7 @@ source $HOME/.local/bin/env
|
|||||||
git clone https://github.com/Yonokid/PyTaiko
|
git clone https://github.com/Yonokid/PyTaiko
|
||||||
cd PyTaiko
|
cd PyTaiko
|
||||||
brew install libsndfile
|
brew install libsndfile
|
||||||
brew install libsamplerate
|
brew install speexdsp
|
||||||
cd libs/audio
|
cd libs/audio
|
||||||
make
|
make
|
||||||
mv libaudio.dylib ../../
|
mv libaudio.dylib ../../
|
||||||
@@ -118,7 +118,7 @@ Then run with Python as described in the Building from Source section.
|
|||||||
|
|
||||||
### C Libraries
|
### C Libraries
|
||||||
```bash
|
```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:
|
Some distributions may also require [patchelf](https://github.com/NixOS/patchelf) and this symbolic link:
|
||||||
|
|||||||
@@ -71,15 +71,11 @@ ifneq (,$(findstring MINGW,$(UNAME_S)))
|
|||||||
CORE_LIBS += -lsndfile
|
CORE_LIBS += -lsndfile
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Resampling libraries - prefer speexdsp, fallback to libsamplerate
|
|
||||||
ifneq (,$(wildcard /mingw64/lib/libspeexdsp.a))
|
ifneq (,$(wildcard /mingw64/lib/libspeexdsp.a))
|
||||||
CORE_LIBS += /mingw64/lib/libspeexdsp.a
|
CORE_LIBS += /mingw64/lib/libspeexdsp.a
|
||||||
CFLAGS += -DHAVE_SPEEXDSP
|
CFLAGS += -DHAVE_SPEEXDSP
|
||||||
else ifneq (,$(wildcard /mingw64/lib/libsamplerate.a))
|
|
||||||
CORE_LIBS += /mingw64/lib/libsamplerate.a
|
|
||||||
CFLAGS += -DHAVE_SAMPLERATE
|
|
||||||
else
|
else
|
||||||
CORE_LIBS += -lspeexdsp -lsamplerate
|
CORE_LIBS += -lspeexdsp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Windows system libraries (these provide the missing symbols)
|
# Windows system libraries (these provide the missing symbols)
|
||||||
@@ -109,9 +105,7 @@ else ifeq ($(UNAME_S),Darwin)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
CORE_LIBS += -lsndfile
|
CORE_LIBS += -lsndfile
|
||||||
|
CORE_LIBS += -lspeexdsp
|
||||||
# Resampling libraries - prefer speexdsp, fallback to libsamplerate
|
|
||||||
CORE_LIBS += -lspeexdsp -lsamplerate
|
|
||||||
|
|
||||||
# macOS frameworks
|
# macOS frameworks
|
||||||
LIBS = $(CORE_LIBS) -framework CoreAudio -framework AudioToolbox -framework AudioUnit
|
LIBS = $(CORE_LIBS) -framework CoreAudio -framework AudioToolbox -framework AudioUnit
|
||||||
@@ -135,15 +129,9 @@ else ifeq ($(UNAME_S),Linux)
|
|||||||
|
|
||||||
CORE_LIBS += -lsndfile
|
CORE_LIBS += -lsndfile
|
||||||
|
|
||||||
# Check for speexdsp (preferred) or libsamplerate
|
|
||||||
ifeq ($(call check_lib,speexdsp),yes)
|
ifeq ($(call check_lib,speexdsp),yes)
|
||||||
CORE_LIBS += -lspeexdsp
|
CORE_LIBS += -lspeexdsp
|
||||||
CFLAGS += -DHAVE_SPEEXDSP
|
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
|
endif
|
||||||
|
|
||||||
# Audio backend libraries (optional)
|
# Audio backend libraries (optional)
|
||||||
@@ -261,7 +249,7 @@ ifneq (,$(findstring MINGW,$(UNAME_S)))
|
|||||||
@echo "Checking for Windows-specific libportaudio:"
|
@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"
|
@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:"
|
@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:"
|
@echo "Static pthread library:"
|
||||||
@ls /mingw64/lib/libwinpthread.a 2>/dev/null && echo "✓ Found libwinpthread.a" || echo "✗ Missing libwinpthread.a"
|
@ls /mingw64/lib/libwinpthread.a 2>/dev/null && echo "✓ Found libwinpthread.a" || echo "✗ Missing libwinpthread.a"
|
||||||
@echo "Libraries to link: $(LIBS)"
|
@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 "PortAudio: "; pkg-config --exists portaudio-2.0 && echo "✓" || echo "✗"
|
||||||
@echo -n "libsndfile: "; pkg-config --exists sndfile && echo "✓" || echo "✗"
|
@echo -n "libsndfile: "; pkg-config --exists sndfile && echo "✓" || echo "✗"
|
||||||
@echo -n "speexdsp: "; pkg-config --exists speexdsp && 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 "ALSA: "; pkg-config --exists alsa && echo "✓" || echo "✗"
|
||||||
@echo -n "PulseAudio: "; pkg-config --exists libpulse && echo "✓" || echo "✗"
|
@echo -n "PulseAudio: "; pkg-config --exists libpulse && echo "✓" || echo "✗"
|
||||||
@echo -n "JACK: "; pkg-config --exists jack && echo "✓" || echo "✗"
|
@echo -n "JACK: "; pkg-config --exists jack && echo "✓" || echo "✗"
|
||||||
|
|||||||
Reference in New Issue
Block a user