-
Notifications
You must be signed in to change notification settings - Fork 28
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
add makefile steps to build a universal binary of the library #45
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, but I can't test right now because I don't have a Mac and Travis is no longer free.
I'm hoping you tested this in your machine.
@@ -23,7 +23,9 @@ all: | |||
STEAM_LIB=sdk/redistributable_bin | |||
|
|||
osx: | |||
$(CXX) $(SRC) $(CPP_FLAGS) ${STEAM_LIB}/osx/libsteam_api.dylib ${THIRD_PARTY}/lib/libluajit-5.1.a -o $(OSX_OUT) -shared -fPIC $(OSX_FLAGS) | |||
$(CXX) $(SRC) $(CPP_FLAGS) -arch arm64 ${STEAM_LIB}/osx/libsteam_api.dylib ${THIRD_PARTY}/lib/libluajit-5.1.a -o $(OSX_OUT).arm64 -shared -fPIC $(OSX_FLAGS) | |||
$(CXX) $(SRC) $(CPP_FLAGS) -arch x86_64 ${STEAM_LIB}/osx/libsteam_api.dylib ${THIRD_PARTY}/lib/libluajit-5.1.a -o $(OSX_OUT).x86_64 -shared -fPIC $(OSX_FLAGS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, it can all run in one machine, I thought it would need two.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct intel and arm macs can cross-compile to both archs.
Yes this has been tested and well be going into a shipping game. |
Thank you! I merged this for whoever wants to build, but I can't provide the auto-built universal libraries anymore because Travis is no longer free. (#46) |
Actually I managed to get free credits in Travis and fix the build (it was broken due to old XCode...) If you have any free time, I would appreciate if you could quickly check if the CI-built universal library works: https://github.com/uspgamedev/luasteam/releases/tag/v3.2.1 |
looks good! |
Should fix #39