Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile changes to get macOS/clang builds working. #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mmontag
Copy link

@mmontag mmontag commented Aug 9, 2021

Hello, I don't know if this will break other platforms, but here's what I did to get the build working on macOS (10.15.6 Catalina).

I think I also installed glfw and libao with Homebrew:

brew install glfw
brew install libao

@@ -7,6 +7,6 @@ CFLAGS += -DAUDDRV_WINMM -DAUDDRV_DSOUND -DAUDDRV_XAUD2
LDFLAGS_LIBVGM += -Wl,-Bstatic -lvgm-audio -lvgm-emu -lvgm-utils -Wl,-Bdynamic
LDFLAGS_LIBVGM += -ldsound -luuid -lwinmm -lole32
else
CFLAGS += `pkg-config --with-path=/usr/local/lib/pkgconfig --cflags vgm-audio`
LDFLAGS_LIBVGM += -Wl,-rpath,/usr/local/lib `pkg-config --with-path=/usr/local/lib/pkgconfig --libs vgm-audio vgm-emu`
CFLAGS += `pkg-config --cflags vgm-audio`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "--with-path" is a parameter which is only supported in "pkgconf", an alternate implementation of pkg-config that is used by Arch Linux. Ideally we'd be able autodetect which version/implementation of pkg-config that is used to decide whether this should be specified or not.

CFLAGS += `pkg-config --with-path=/usr/local/lib/pkgconfig --cflags vgm-audio`
LDFLAGS_LIBVGM += -Wl,-rpath,/usr/local/lib `pkg-config --with-path=/usr/local/lib/pkgconfig --libs vgm-audio vgm-emu`
CFLAGS += `pkg-config --cflags vgm-audio`
LDFLAGS_LIBVGM += -Wl,-rpath,/usr/local/lib `pkg-config --libs vgm-audio vgm-emu ao` -framework AudioToolbox
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break other platforms since AudioToolBox is a Mac exclusive API.

@@ -7,6 +7,6 @@ CFLAGS += -DAUDDRV_WINMM -DAUDDRV_DSOUND -DAUDDRV_XAUD2
LDFLAGS_LIBVGM += -Wl,-Bstatic -lvgm-audio -lvgm-emu -lvgm-utils -Wl,-Bdynamic
LDFLAGS_LIBVGM += -ldsound -luuid -lwinmm -lole32
else
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should add an if case for Mac builds here. See imgui.mak

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants