CFLAGS = -O2 -Wall

all: button_exec lcd_say

clean:
	-rm -f button_exec lcd_say

install:

install-tools:
	install -c lcd_say /usr/bin/

	install -c button_exec.pl /usr/bin/button_exec
	install -c button_exec.init /etc/init.d/button_exec
	cp button_exec.conf /etc

	ln -sf ../init.d/button_exec /etc/rc.d/rc0.d/K50button_exec
	ln -sf ../init.d/button_exec /etc/rc.d/rc1.d/K50button_exec
	ln -sf ../init.d/button_exec /etc/rc.d/rc2.d/S41button_exec
	ln -sf ../init.d/button_exec /etc/rc.d/rc3.d/S41button_exec
	ln -sf ../init.d/button_exec /etc/rc.d/rc4.d/S41button_exec
	ln -sf ../init.d/button_exec /etc/rc.d/rc5.d/S41button_exec
	ln -sf ../init.d/button_exec /etc/rc.d/rc6.d/K50button_exec

	install -c netload.pl /usr/bin/netload
	install -c netload.init /etc/init.d/netload
	ln -sf ../init.d/netload /etc/rc.d/rc0.d/K50netload
	ln -sf ../init.d/netload /etc/rc.d/rc1.d/K50netload
	ln -sf ../init.d/netload /etc/rc.d/rc2.d/S41netload
	ln -sf ../init.d/netload /etc/rc.d/rc3.d/S41netload
	ln -sf ../init.d/netload /etc/rc.d/rc4.d/S41netload
	ln -sf ../init.d/netload /etc/rc.d/rc5.d/S41netload
	ln -sf ../init.d/netload /etc/rc.d/rc6.d/K50netload