diff --git a/Makefile b/Makefile index ed693a1..0604878 100644 --- a/Makefile +++ b/Makefile @@ -2,10 +2,11 @@ CC = gcc CFLAGS += -Wall -Wextra -O3 -march=native prefix = /usr/local -backlight_dir = /sys/class/backlight/intel_backlight/ -max_brightness = $(shell cat $(backlight_dir)max_brightness) +backlight_dir = /sys/class/backlight +vendor_backlight_dir = $(backlight_dir)/$(shell ls $(backlight_dir) | head -n1) +max_brightness = $(shell cat $(vendor_backlight_dir)/max_brightness) -DEFINES += -D BACKLIGHT_DIR=\"$(backlight_dir)\" +DEFINES += -D BACKLIGHT_DIR=\"$(vendor_backlight_dir)/\" DEFINES += -D MAX_BRIGHTNESS=$(max_brightness) all: backlight_control