Skip to content

Commit

Permalink
macOS: Create .pc file and copy .h files (#40)
Browse files Browse the repository at this point in the history
* Create libwooting-rgb-sdk.pc

* Update Makefile

Copy pkgconfig file
Copy header files

* Update Makefile

Remove useless filename
  • Loading branch information
ShayBox authored May 31, 2021
1 parent 64e86e6 commit 00c725c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mac/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,17 @@ install: libwooting-rgb-sdk.dylib
mkdir -p $(prefix)/lib
cp libwooting-rgb-sdk.dylib $(prefix)/lib
chmod 755 $(prefix)/lib/libwooting-rgb-sdk.dylib
cp libwooting-rgb-sdk.pc $(prefix)/lib/pkgconfig
chmod 644 $(prefix)/lib/pkgconfig/libwooting-rgb-sdk.pc
cp ../src/wooting-rgb-sdk.h $(prefix)/include
chmod 644 $(prefix)/include/wooting-rgb-sdk.h
cp ../src/wooting-usb.h $(prefix)/include
chmod 644 $(prefix)/include/wooting-usb.h

uninstall:
rm -f $(prefix)/lib/libwooting-rgb-sdk.dylib
rm -f $(prefix)/lib/pkgconfig/libwooting-rgb-sdk.pc
rm -f $(prefix)/include/wooting-rgb-sdk.h
rm -f $(prefix)/include/wooting-usb.h

.PHONY: clean libs uninstall
10 changes: 10 additions & 0 deletions mac/libwooting-rgb-sdk.pc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prefix=/usr/local
includedir=${prefix}/include
libdir=${prefix}/lib

Name: libwooting-rgb-sdk
Description: Wooting Keyboard RGB SDK
Version: VERSION
Requires: hidapi
Cflags: -I${includedir}
Libs: -L${libdir} -lwooting-rgb-sdk

0 comments on commit 00c725c

Please sign in to comment.