49 lines
1.6 KiB
Makefile
49 lines
1.6 KiB
Makefile
|
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
|
||
|
KDEAUTOSTART:=/opt/kde3/share/autostart/
|
||
|
|
||
|
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
|
||
|
install -d $(DESTDIR)$(BINDIR) $(DESTDIR)$(INITDIR) \
|
||
|
$(DESTDIR)$(SBIN) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(SYSCONFDIR)/modprobe.d \
|
||
|
$(DESTDIR)$(SBIN) $(DESTDIR)$(SBINDIR) \
|
||
|
$(DESTDIR)$(SYSCONFDIR)/sysconfig $(DESTDIR)$(KDEAUTOSTART)
|
||
|
install -s -m 4755 applesmc $(DESTDIR)$(BINDIR)
|
||
|
install -s -m 4755 backlight $(DESTDIR)$(BINDIR)
|
||
|
install -m 0755 macbook-set-input $(DESTDIR)$(BINDIR)/
|
||
|
install -m 0755 macbook-tools-init $(DESTDIR)$(INITDIR)/macbook-tools
|
||
|
install -m 644 macbook-tools-sysconfig $(DESTDIR)$(SYSCONFDIR)/sysconfig/macbook-tools
|
||
|
install -m 0755 macbook-lightd $(DESTDIR)$(SBINDIR)/
|
||
|
install -m 0644 macbook-modprobe $(DESTDIR)$(SYSCONFDIR)/modprobe.d/macbook.conf
|
||
|
install -m 0644 macbook_set_input.desktop $(DESTDIR)$(KDEAUTOSTART)/macbook_set_input.desktop
|
||
|
|
||
|
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)
|