2013-01-24 01:00:00 +01:00
|
|
|
include VERSION
|
|
|
|
|
|
|
|
BINDIR:=/usr/bin
|
|
|
|
SBIN:=/sbin
|
|
|
|
SBINDIR:=/usr/sbin
|
|
|
|
SYSCONFDIR:=/etc
|
|
|
|
DESTDIR:=
|
|
|
|
DATADIR:=/usr/share
|
|
|
|
INITDIR:=/etc/rc.d/init.d
|
|
|
|
RPMSOURCEDIR:=/usr/src/RPM/SOURCES
|
|
|
|
|
|
|
|
all: applesmc backlight
|
|
|
|
|
|
|
|
applesmc: applesmc.c Makefile
|
|
|
|
gcc -DVERSION=\"$(VERSION)\" -Wall applesmc.c -o applesmc
|
|
|
|
backlight: backlight.c Makefile
|
|
|
|
gcc -DVERSION=\"$(VERSION)\" -Wall backlight.c -o backlight -lpci -static
|
|
|
|
|
|
|
|
install: backlight applesmc
|
2015-03-24 23:14:29 +01:00
|
|
|
install -d $(DESTDIR)$(BINDIR) $(DESTDIR)$(INITDIR)
|
|
|
|
install -d $(DESTDIR)$(SBIN) $(DESTDIR)$(SBINDIR) $(DESTDIR)/lib/modprobe.d
|
|
|
|
install -d $(DESTDIR)$(SBIN) $(DESTDIR)$(SBINDIR)
|
|
|
|
install -d $(DESTDIR)$(SYSCONFDIR)/sysconfig
|
|
|
|
install -d $(DESTDIR)/lib/systemd/system
|
2013-01-24 01:00:00 +01:00
|
|
|
install -s -m 4755 applesmc $(DESTDIR)$(BINDIR)
|
|
|
|
install -s -m 4755 backlight $(DESTDIR)$(BINDIR)
|
|
|
|
install -m 0755 macbook-set-input $(DESTDIR)$(BINDIR)/
|
2015-03-24 23:14:29 +01:00
|
|
|
install -m 0644 applesmcd.service $(DESTDIR)/lib/systemd/system/applesmcd.service
|
|
|
|
install -m 0644 appleir.service $(DESTDIR)/lib/systemd/system/appleir.service
|
|
|
|
install -m 0755 applesmcd $(DESTDIR)$(SBINDIR)/
|
2013-04-14 16:41:19 +02:00
|
|
|
install -m 0644 macbook-modprobe $(DESTDIR)/lib/modprobe.d/macbook.conf
|
2013-01-24 01:00:00 +01:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f backlight
|
|
|
|
rm -f applesmc
|
|
|
|
rm -f *~
|
|
|
|
|
|
|
|
dist: clean
|
|
|
|
rm -rf macbook-tools-$(VERSION)
|
|
|
|
rm -rf macbook-tools-$(VERSION).tar.bz2
|
|
|
|
mkdir macbook-tools-$(VERSION)
|
|
|
|
find . -maxdepth 1 -exec cp {} macbook-tools-$(VERSION) \;
|
|
|
|
tar cvfj macbook-tools-$(VERSION).tar.bz2 macbook-tools-$(VERSION)
|
|
|
|
rm -rf macbook-tools-$(VERSION)
|
|
|
|
|
|
|
|
dist-rpm: dist
|
|
|
|
cp macbook-tools-$(VERSION).tar.bz2 $(RPMSOURCEDIR)
|