Skip to content

Commit 5786352

Browse files
committed
Test core audio
1 parent a80a47a commit 5786352

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

Makefile

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,33 @@ endif
4646

4747
# virtio-snd
4848
ENABLE_VIRTIOSND ?= 1
49-
ifneq ($(UNAME_S),Linux)
49+
ifneq ($(UNAME_S),$(filter $(UNAME_S),Linux Darwin))
5050
ENABLE_VIRTIOSND := 0
5151
endif
5252

53-
ifeq (0, $(call check-alsa))
54-
$(warning No libasound installed. Check libasound in advance.)
55-
ENABLE_VIRTIOSND := 0
53+
# Check ALSA installation
54+
ifeq ($(UNAME_S),Linux)
55+
ifeq (0, $(call check-alsa))
56+
$(warning No libasound installed. Check libasound in advance.)
57+
ENABLE_VIRTIOSND := 0
58+
endif
59+
endif
60+
# Check core audio installation
61+
ifeq ($(UNAME_S),Darwin)
62+
ifeq (0, $(call check-coreaudio))
63+
$(warning No CoreAudio framework installed.)
64+
ENABLE_VIRTIOSND := 0
5665
endif
57-
#ifeq (0, $(call check-coreaudio))
58-
#$(warning No CoreAudio framework installed.)
59-
# ENABLE_VIRTIOSND := 0
60-
#endif
6166
$(call set-feature, VIRTIOSND)
6267
ifeq ($(call has, VIRTIOSND), 1)
6368
OBJS_EXTRA += virtio-snd.o
64-
LDFLAGS += -lasound -lpthread
69+
70+
ifeq ($(UNAME_S),Linux)
71+
LDFLAGS += -lasound -lpthread
72+
else ifeq($(UNAME_S),Darwin)
73+
LDFLAGS += lpthread
74+
CFLAGS += -framework CoreAudio
75+
endif
6576
CFLAGS += -Icnfa
6677

6778
cnfa/Makefile:

0 commit comments

Comments
 (0)