forked from recalbox/mk_arcade_joystick_rpi
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
26 lines (21 loc) · 746 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
obj-m := mk_arcade_joystick_rpi.o
KVER ?= $(shell uname -r)
CPUHW ?= $(shell grep Hardware /proc/cpuinfo)
ifneq (,$(findstring -v7, $(KVER)))
ifneq (,$(findstring BCM2711, $(CPUHW)))
#$(info CPUHW="$(CPUHW)")
CFLAGS_mk_arcade_joystick_rpi.o := -DRPI4
else
CFLAGS_mk_arcade_joystick_rpi.o := -DRPI2
endif
endif
all:
$(MAKE) -C /lib/modules/$(KVER)/build M=$(PWD) modules
clean:
$(MAKE) -C /lib/modules/$(KVER)/build M=$(PWD) clean
config:
gcc -o mk_joystick_config mk_joystick_config.cpp -lwiringPi -lpthread
sudo ./mk_joystick_config -maxnoise 60 -adcselect
sudo mv /opt/retropie/configs/all/emulationstation/es_input.cfg /opt/retropie/configs/all/emulationstation/es_input.cfg.bak
@echo SYSTEM SHUTTING DOWN NOW
sudo reboot