-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(audio): disabled PulseAudio to prioritise audio capture to u…
…se ALSA on Linux
- Loading branch information
Showing
1 changed file
with
11 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
BINARY_DIR=bin | ||
BINARY_NAME=birdnet-go | ||
BINARY_DIR := bin | ||
BINARY_NAME := birdnet-go | ||
|
||
# Common flags | ||
CGO_FLAGS := CGO_ENABLED=1 CGO_CFLAGS="-I$(HOME)/src/tensorflow -DMA_NO_PULSEAUDIO" | ||
LDFLAGS := -ldflags "-s -w" | ||
|
||
build: | ||
CGO_ENABLED=1 CGO_CFLAGS="-I$(HOME)/src/tensorflow" go build -ldflags "-s -w" -o ${BINARY_DIR}/${BINARY_NAME} | ||
$(CGO_FLAGS) go build $(LDFLAGS) -o $(BINARY_DIR)/$(BINARY_NAME) | ||
|
||
windows: | ||
GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CGO_CFLAGS="-I$(HOME)/src/tensorflow" go build -ldflags "-s -w" -o $(BINARY_DIR)/$(BINARY_NAME).exe | ||
GOOS=windows GOARCH=amd64 $(CGO_FLAGS) CC=x86_64-w64-mingw32-gcc go build $(LDFLAGS) -o $(BINARY_DIR)/$(BINARY_NAME).exe | ||
|
||
macos_intel: | ||
GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 CGO_CFLAGS="-I$(HOME)/src/tensorflow" go build -ldflags "-s -w" -o $(BINARY_DIR)/$(BINARY_NAME) | ||
GOOS=darwin GOARCH=amd64 $(CGO_FLAGS) go build $(LDFLAGS) -o $(BINARY_DIR)/$(BINARY_NAME) | ||
|
||
macos_arm: | ||
GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 CGO_CFLAGS="-I$(HOME)/src/tensorflow" go build -ldflags "-s -w" -o $(BINARY_DIR)/$(BINARY_NAME) | ||
GOOS=darwin GOARCH=arm64 $(CGO_FLAGS) go build $(LDFLAGS) -o $(BINARY_DIR)/$(BINARY_NAME) | ||
|
||
clean: | ||
go clean | ||
rm -f ${BINARY_DIR}/${BINARY_NAME} | ||
rm -rf $(BINARY_DIR)/$(BINARY_NAME) $(BINARY_DIR)/$(BINARY_NAME).exe |