Skip to content

Commit

Permalink
Upadate Makefile for usb-gadget
Browse files Browse the repository at this point in the history
  • Loading branch information
nazya committed Apr 22, 2024
1 parent 85dc69b commit 13e4a91
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ all:
-mkdir bin
cp scripts/keyd-application-mapper bin/
sed -e 's#@PREFIX@#$(PREFIX)#' keyd.service.in > keyd.service
sed -e 's#@PREFIX@#$(PREFIX)#' src/vkbd/usb-gadget.service.in > src/vkbd/usb-gadget.service
$(CC) $(CFLAGS) -O3 $(COMPAT_FILES) src/*.c src/vkbd/$(VKBD).c -lpthread -o bin/keyd $(LDFLAGS)
debug:
CFLAGS="-g -Wunused" $(MAKE)
Expand Down Expand Up @@ -89,7 +90,7 @@ uninstall:
$(DESTDIR)$(PREFIX)/bin/keyd-usb-gadget.sh \
$(DESTDIR)$(PREFIX)/lib/systemd/system/keyd.service
clean:
-rm -rf bin keyd.service
-rm -rf bin keyd.service src/vkbd/usb-gadget.service
test:
@cd t; \
for f in *.sh; do \
Expand Down
2 changes: 1 addition & 1 deletion src/vkbd/usb-gadget.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ HID reports.
git clone https://github.com/rvaiya/keyd
cd keyd
make VKBD=usb-gadget && sudo make install VKBD=usb-gadget
sudo systemctl enable usb-gadget && sudo systemctl start usb-gadget
sudo systemctl enable keyd-usb-gadget && sudo systemctl start keyd-usb-gadget
sudo systemctl enable keyd && sudo systemctl start keyd

The device should show up as` 1d6b:0104 Linux Foundation Multifunction Composite Gadget`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ After=systemd-modules-load.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/bash /usr/bin/keyd-usb-gadget.sh
ExecStart=/bin/bash @PREFIX@/bin/keyd-usb-gadget.sh

[Install]
WantedBy=keyd.service

0 comments on commit 13e4a91

Please sign in to comment.