#
#  sysledd: Makefile
#
#  Copyright 2015 Kadir Mueller <kadir.mueller@theflatnet.de>
#
#  This program is free software; you may redistribute and/or modify it under
#  the terms of the GNU General Public License Version 2 as published by the
#  Free Software Foundation.
#
#  This program is distributed in the hope that it will be useful, but
#  WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
#  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
#  for complete details.
#

all: sysledd

sysledd: sysledd.c
	$(CC) $(CFLAGS) sysledd.c -o sysledd

clean:
	rm -f sysledd

install: all
	install -d -m 0755 $(DESTDIR)/usr/sbin
	install -m 0755 sysledd $(DESTDIR)/usr/sbin
	install -d -m 0755 $(DESTDIR)/etc/init.d
	install -m 0644 sysledd.init $(DESTDIR)/etc/init.d/sysledd
	chmod 0755 $(DESTDIR)/etc/init.d/sysledd
	install -d 0755 $(DESTDIR)/etc/rc.d
	ln -s ../init.d/sysledd $(DESTDIR)/etc/rc.d/S99sysledd

