# Copyright © 2011 Fabio Colinelli
# Copyright © 2011 Davide Pedrelli
#
# This program IS free software; you can redistribute it AND / OR modify
# it under the terms OF the GNU General PUBLIC License AS published by
# the Free Software Foundation; version 3 OF the License.
#
# 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 more details.
#
# You should have received a COPY OF the GNU General PUBLIC License
#
# along WITH this program; IF NOT, WRITE TO the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110 - 1301, USA.

PREFIX ?= /usr/local

build:
	gbc2 -a -t -p .
	gba2 .
	mv myunity*.gambas myunity

install: build
	install -d -m 755 $(PREFIX)/bin/
	install -d -m 755 $(PREFIX)/share/icons/hicolor/scalable/apps
	install -d -m 755 $(PREFIX)/share/applications/
	install -d -m 755 $(PREFIX)/share/man/man1
	install -m 755 myunity $(PREFIX)/bin/
	install -m 644 myunity.svg $(PREFIX)/share/icons/hicolor/scalable/apps
	install -m 644 myunity.desktop $(PREFIX)/share/applications/
	install -m 644 myunity.1 $(PREFIX)/share/man/man1

clean:
	rm -f myunity
