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

OSX Makefile changes #218

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

OSX Makefile changes #218

wants to merge 2 commits into from

Conversation

Digicrat
Copy link

See #174

@Digicrat Digicrat mentioned this pull request Mar 16, 2020
@MatMoul
Copy link
Owner

MatMoul commented Apr 28, 2020

Duplicate with #193
Some diff but is g810-led working for OSX?

@aprovera
Copy link

aprovera commented May 6, 2020

With the prerequisite dependency (brew install hidapi) installed, and after applying the makefile changes made by @Digicrat I can successfully compile it on OS X (v10.13).

sudo make install however does not work correctly because OS X doesn't allow users to mess with /usr/bin. /usr/local/bin would be the right install path in this case.

The software itself only appears to work correctly when run with sudo, however. When run without root privileges it returns a Matching or compatible device not found ! error.

Also worthy of note, OS X uses launchd instead of systemd. The way of having the utility start automatically on boot on OS X is making a Launch Daemon.

debug: CXXFLAGS += -g -Wextra -pedantic
debug: bin/$(PROGN)

lib/lib$(PROGN).so: $(LIBSRCS)
@mkdir -p lib
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -fPIC -shared -Wl,-soname,lib$(PROGN).so -o lib/lib$(PROGN).so.$(MAJOR).$(MINOR).$(MICRO) $^ $(LIBS)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -fPIC -shared $(LINKFLAGS) -o lib/lib$(PROGN).so.$(MAJOR).$(MINOR).$(MICRO) $^ $(LIBS)
Copy link

Choose a reason for hiding this comment

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

Shouldn't this be $(LINK_FLAGS) instead of $(LINKFLAGS)?

@FelikZ
Copy link

FelikZ commented Oct 29, 2024

brew install hidapi

this^ and the following:

-LINKFLAGS
+LINK_FLAGS

and

LDFLAGS="-L/opt/homebrew/Cellar/hidapi/0.14.0/lib" CXXFLAGS="-I/opt/homebrew/Cellar/hidapi/0.14.0/include" make all

Compiles on Sonoma 14.7 with a latest version of g810-led (0.4.3)

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

Successfully merging this pull request may close these issues.

4 participants